mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
Claude Code lists a claude.ai account's connectors at api.anthropic.com/v1/mcp_servers and reaches each at mcp-proxy.anthropic.com/v1/mcp/<id>, with the login's access token. The OAuth login's binding named api.anthropic.com alone, so the connectors' requests carried the placeholder and were refused. ClaudeOAuthBindings gives the OAuth login a second binding, claude-connectors: the same placeholder, into Authorization for mcp-proxy.anthropic.com below /v1/mcp/ alone. It has a name of its own because the proxy looks a value up by its binding's name, and secrets.Store.Get gives claude-oauth a Claude Code token in the login's place but never gives one to claude-connectors, so a token, saved or in devvm's environment (whose scope isn't checked), still goes only to api.anthropic.com. The bindings file stays version 1. Tests: TestClaudeCapture and the claude-oauth golden check both bindings; TestClaudeBindings checks the connectors' binding gets the OAuth login and never a saved or environment token (with the claude-oauth control); network.txtar checks the VM's secrets.json and secrets.policy. e2e's network section adds the connectors' host to its fake upstream: with the claude secret, neither its placeholder nor the OAuth login's gets the token there (the API, the control, does), and after the host's refresh the connectors' host gets the refreshed access token. Docs: the Claude Code login, the attack vectors' new entry for connectors (deny mcp-proxy.anthropic.com to keep them from a VM), How it works' bindings and threat lines, the agents' table, and Contributing's e2e network section, whose refresh sentence was stale (the refresh succeeds). Co-Authored-By: Claude Opus 5.5 <[email protected]>