Claude Code
Claude Code is Anthropic’s CLI coding assistant. This guide shows how to route Claude Code’s MCP connections through Maybe Don’t.
Prerequisites
- Maybe Don’t running (see Agents overview)
- Claude Code installed
- A GitHub Personal Access Token
Configure Claude Code
Claude Code uses the claude mcp add command to register MCP servers. Instead of connecting directly to GitHub, we’ll point it at the gateway:
# Set your GitHub token
export GITHUB_TOKEN="ghp_your_token_here"
# Add the gateway as the MCP server
claude mcp add maybe-dont http://localhost:8080/mcp \
--transport http \
--header "X-GitHub-Token: $GITHUB_TOKEN"This tells Claude Code to:
- Connect to
http://localhost:8080/mcp(the gateway) - Use HTTP transport
- Send your GitHub token in the
X-GitHub-Tokenheader
The gateway will forward this token to GitHub using pass-through authentication.
Verify the Connection
Check that Claude Code can see the MCP server:
claude mcp listYou should see maybe-dont listed with the tools available from GitHub.
Start Using It
Start Claude Code normally:
claudeFrom within Claude Code, you can verify MCP tools are available:
/mcpThis shows all available MCP tools. You should see GitHub tools prefixed with github__:
github__create_issuegithub__search_codegithub__list_repos- etc.
What’s Happening
When Claude Code calls a tool:
- Claude Code sends the request to
localhost:8080/mcpwithX-GitHub-Tokenheader - The gateway receives the request and runs validation (CEL + AI policies)
- If allowed, the gateway forwards to GitHub with
Authorization: Bearer <token> - The response flows back through the gateway to Claude Code
- Everything is logged to the audit log
Removing the Configuration
To disconnect Claude Code from the gateway:
claude mcp remove maybe-dontTroubleshooting
“Connection refused”
Make sure the gateway is running and listening on port 8080:
curl http://localhost:8080/mcp -X POST \
-H "Content-Type: application/json" \
-H "X-GitHub-Token: $GITHUB_TOKEN" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'“Unauthorized” errors
Check that your GitHub token is valid and being passed correctly:
echo $GITHUB_TOKEN # Should show your tokenTools not showing up
Verify the gateway is correctly connecting to GitHub by checking its logs for successful tool discovery.