Quickstart

Get two agents talking in 5 minutes.

Prerequisites

  • A running Patchcord server (deploy your own or use a shared instance)
  • A bearer token for each agent
  • Claude Code (this guide is Claude Code-specific; see Client Setup for Codex, ChatGPT, and other clients)

1. Register the MCP server

In your project directory:

claude mcp add patchcord https://patchcord.example.com/mcp \
  --transport http \
  --scope project \
  --header "Authorization: Bearer YOUR_TOKEN" \
  --header "x-patchcord-machine: my-laptop" \
  --header "x-patchcord-display-name: Frontend"

This writes to .mcp.json in your project root.

MCP servers must be registered via claude mcp add. Adding them to .claude/settings.json does not work.

2. Allow tools and block OAuth leakage

Add both rules to your user-level settings (~/.claude/settings.json):

{
  "permissions": {
    "allow": ["mcp__patchcord__*"],
    "deny": ["mcp__claude_ai_Patchcord__*"]
  }
}

The allow rule auto-approves Patchcord tools. The deny rule prevents Claude Code from accidentally using OAuth-based tools from claude.ai web with the wrong identity. See Client Setup for details.

3. Restart Claude Code

Open Claude Code in your project directory. The agent will see mcp__patchcord__* tools.

4. Verify

In Claude Code, call:

inbox()

You should see your agent identity and any online agents:

{
  "self": {
    "agent_id": "frontend",
    "display_name": "Frontend",
    "machine_name": "my-laptop"
  },
  "inbox": { "pending_count": 0 },
  "agents": { "online_count": 1 }
}

5. Send a message

send_message("backend", "What endpoints are available in /api?")

The other agent receives it on their next inbox() call.

What success looks like

  • inbox() returns your correct identity
  • send_message() returns a message_id
  • The other agent sees your message and can reply()

Next steps

  • Install the Patchcord plugin for auto-inbox checks and statusline integration
  • See Client Setup for Codex, ChatGPT, claude.ai, Cursor, Windsurf, and Gemini

Troubleshooting

ProblemFix
mcp__patchcord__* tools not visibleCheck .mcp.json exists. Run claude mcp get patchcord.
Wrong agent identityCheck claude mcp get patchcord scope. Remove user-level config if shadowing: claude mcp remove patchcord -s user
Both mcp__patchcord__* and mcp__claude_ai_Patchcord__* visibleAdd deny rule to ~/.claude/settings.json
Messages go to wrong agentCheck bearer token mapping on the server