docs: fix MCP setup instructions and add Claude Desktop support#32
Conversation
- Fix transport type from `streamableHttp` to `http` in .mcp.json example - Add `claude mcp add` CLI command for Claude Code - Add Claude Desktop section using `mcp-remote` (stdio bridge) - Clarify that YOUR_TOKEN comes from the token generation step - Note localhost:3100 as the URL for local instances Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mcheemaa
left a comment
There was a problem hiding this comment.
Verified E2E against a live Phantom instance. The http transport type is correct - connected via claude mcp add --transport http, tested 9/17 MCP tools successfully, all returning structured data with no errors. The streamableHttp in the current README would silently fail for anyone following the docs. One minor thing: the "Restart Claude Desktop after saving..." paragraph appears twice in the Claude Desktop section. I'll fix that in a follow-up. Thanks for the contribution, Daniel!
|
@mcheemaa question while I have your attention here - is there a way to have a phantom use claude code to take advantage of a subscription instead of using an api key? my phantom is getting expensive 😨 |
|
I’m curious about this as well. I was gonna try my oauth token and see if it worked or not. |
Yeap, you should ssh into your machine and install claude code and then do a login it should pick that up for most of the work. You can also contribute and make the judges use claude code as a sub process I am currently working on it and have some stuff in flight |
…t-setup docs: fix MCP setup instructions and add Claude Desktop support
…lted idempotency + recipient policy (#115) Adds the in-VM Phantom email-tool upgrade for operator-subsidized Resend email per Phase 10 architect (`phantom-cloud-deploy/local/2026-05-01-phase10-resend-architect.md`). What changed: - src/config/secret-names.ts (new, 67 LOC). Canonical phantom-side mirror of phantomd's AllowedSecretNames; exports the wire-stable constant RESEND_API_KEY_SECRET_NAME = "resend_api_key" matching phantomd PR #32. - src/email/key-fetcher.ts (new, 250 LOC). Gateway-backed ResendKeyFetcher (15-min cache, 401 invalidation, structured error kinds; mirrors src/config/metadata-fetcher.ts pattern) plus EnvKeyFetcher fallback for local dev / OSS Docker. - src/email/recipient-policy.ts (new, 156 LOC). owner / unrestricted / list policy with safe parsing; "workspace" mode reserved for v1.5+ and rejected today; default is owner-only when env is unset. - src/email/metrics.ts (new, 116 LOC). phantom_email_send_total{outcome, purpose} prom-client counter with 8 outcomes (the 7 error_kind values plus ok). Owns its own private Registry (matches Slack precedent). - src/email/tool.ts (extended, +337 LOC). Replaces process.env.RESEND_API_KEY read with the key-fetcher path; adds 3-tag set (tenant_id, agent_id, purpose), tenant-salted sha256 idempotency-key derivation per architect §9.6, and the 7-kind error taxonomy per architect §6.8. Lazy SDK import preserved. Existing daily cap and from-address invariants preserved. - src/index.ts (extended). Wires the new deps; merges Slack and Email registries via setMetricsRegistryProvider's array form. - src/core/server.ts (extended). /metrics route accepts a single registry or an array; concatenates text expositions by newline. - src/channels/slack-channel-factory.ts: docstring cross-reference to the new shared mirror; the slack-only AllowedSecretNamesMirror stays for backward-compat with existing tests. - 5 test files (1334 LOC across key-fetcher, recipient-policy, metrics, tool, and secret-names). 90 new test cases covering the 7 error_kind taxonomy, tenant-salt cross-tenant collision defense, plaintext-leak guards across every error path, cache TTL eviction, recipient policy parsing, and Resend tag sanitization. - CLAUDE.md: new Email section documenting the env-var contract, the 7 error_kind values, and the cross-repo wire spec; cross-repo invariant section updated for the new mirror home. Cross-repo invariant: the secret name string `"resend_api_key"` MUST be byte-equal across phantomd PR #32 (internal/secrets/types.go), this PR's src/config/secret-names.ts and src/email/key-fetcher.ts. Drift surfaces as HTTP 404 from the metadata gateway, which the EmailTool surfaces as error_kind = "key_unavailable". Tests: bun test 2210 pass / 0 fail across 162 files; bun run lint clean; bun run typecheck clean.
Summary
"type": "streamableHttp"to"type": "http"in the.mcp.jsonexample —streamableHttpis not a valid transport type in Claude Codeclaude mcp addCLI command: The existing docs only showed the JSON config approachmcp-remotebridge setupYOUR_TOKENcomes from thetoken createcommand outputhttp://localhost:3100/mcpfor local instancesContext
Ran into these issues while setting up a Phantom MCP connection in both Claude Code and Claude Desktop. The
streamableHttptype caused a silent config failure, and Claude Desktop rejected the HTTP config entirely since it only speaks stdio.🤖 Generated with Claude Code