Skip to content

docs: fix MCP setup instructions and add Claude Desktop support#32

Merged
mcheemaa merged 2 commits into
ghostwright:mainfrom
lasergoat:fix/readme-mcp-client-setup
Apr 5, 2026
Merged

docs: fix MCP setup instructions and add Claude Desktop support#32
mcheemaa merged 2 commits into
ghostwright:mainfrom
lasergoat:fix/readme-mcp-client-setup

Conversation

@lasergoat
Copy link
Copy Markdown
Contributor

Summary

  • Fixed transport type: Changed "type": "streamableHttp" to "type": "http" in the .mcp.json example — streamableHttp is not a valid transport type in Claude Code
  • Added claude mcp add CLI command: The existing docs only showed the JSON config approach
  • Added Claude Desktop section: Desktop only supports stdio transport, so this documents the mcp-remote bridge setup
  • Clarified token flow: Made it explicit that YOUR_TOKEN comes from the token create command output
  • Added localhost note: Mentioned http://localhost:3100/mcp for local instances

Context

Ran into these issues while setting up a Phantom MCP connection in both Claude Code and Claude Desktop. The streamableHttp type caused a silent config failure, and Claude Desktop rejected the HTTP config entirely since it only speaks stdio.

🤖 Generated with Claude Code

lasergoat and others added 2 commits April 1, 2026 22:23
- 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>
Copy link
Copy Markdown
Member

@mcheemaa mcheemaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mcheemaa merged commit 4e6d358 into ghostwright:main Apr 5, 2026
1 check passed
@lasergoat lasergoat deleted the fix/readme-mcp-client-setup branch April 5, 2026 15:53
@lasergoat
Copy link
Copy Markdown
Contributor Author

@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 😨

@coe0718
Copy link
Copy Markdown
Contributor

coe0718 commented Apr 5, 2026

I’m curious about this as well. I was gonna try my oauth token and see if it worked or not.

@mcheemaa
Copy link
Copy Markdown
Member

mcheemaa commented Apr 5, 2026

@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 😨

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

mutusfa pushed a commit to mutusfa/phantom that referenced this pull request Apr 14, 2026
…t-setup

docs: fix MCP setup instructions and add Claude Desktop support
mcheemaa added a commit that referenced this pull request May 1, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants