From 91b4dcb9612caac9d4500abae3cead2c92943067 Mon Sep 17 00:00:00 2001 From: Daniel Walker <15964+lasergoat@users.noreply.github.com> Date: Wed, 1 Apr 2026 22:23:15 -0500 Subject: [PATCH] docs: fix MCP setup instructions and add Claude Desktop support - 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) --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 81dd0c8..8c5685e 100644 --- a/README.md +++ b/README.md @@ -222,9 +222,9 @@ Because the agent that can only use pre-built tools hits a ceiling. Phantom buil -## Connect from Claude Code +## Connect from Claude -Generate a token, then add Phantom to your MCP config. +First, generate a token. The command outputs a bearer token — save it for the next step. **Bare metal:** ```bash @@ -238,13 +238,25 @@ docker exec phantom bun run phantom token create --client claude-code --scope op **Or just ask your Phantom in Slack:** "Create an MCP token for Claude Code." It will generate the token and give you the config snippet. -Then add this to your Claude Code MCP config: +Then use the token to connect. Replace `YOUR_TOKEN` below with the token from the command above. For local instances, use `http://localhost:3100/mcp` instead of the `ghostwright.dev` URL. + +### Claude Code (CLI) + +Add via the CLI: + +```bash +claude mcp add phantom https://your-phantom.ghostwright.dev/mcp \ + --transport http \ + --header "Authorization: Bearer YOUR_TOKEN" +``` + +Or add directly to your project's `.mcp.json`: ```json { "mcpServers": { "phantom": { - "type": "streamableHttp", + "type": "http", "url": "https://your-phantom.ghostwright.dev/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" @@ -254,7 +266,35 @@ Then add this to your Claude Code MCP config: } ``` -Now Claude Code can query your Phantom's memory, ask it questions, check status, and use any dynamic tools the agent has built. +### Claude Desktop + +Claude Desktop only supports stdio transport, so you need [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) to bridge the connection. + +Add this to your `claude_desktop_config.json` (Settings → Developer → Edit Config): + +```json +{ + "mcpServers": { + "phantom": { + "command": "npx", + "args": [ + "mcp-remote", + "https://your-phantom.ghostwright.dev/mcp", + "--header", + "Authorization: Bearer YOUR_TOKEN" + ] + } + } +} +``` + +Restart Claude Desktop after saving. The first connection may take a moment while `mcp-remote` is downloaded. + +Restart Claude Desktop after saving. The first connection may take a moment while `mcp-remote` is downloaded. + +### Verify + +Once connected, Claude can query your Phantom's memory, ask it questions, check status, and use any dynamic tools the agent has built. ## Self-Evolution