AnyRouter MCP with Command Code

Add the AnyRouter MCP server to Command Code with one command or .mcp.json.

Register the AnyRouter MCP server in Command Code with one command.

  1. Add the server (add --scope project to write .mcp.json in the project instead of the local config):

    cmd mcp add --transport http anyrouter https://anyrouter.dev/api/v1/mcp
  2. Approve the OAuth consent. The next tool call opens anyrouter.dev/oauth/consent. Pick a permission level (Read-only is the default) and click Allow. See scopes and consent bundles.

  3. Check it: cmd mcp list shows anyrouter connected.

Or edit .mcp.json and restart Command Code:

{
  "mcpServers": {
    "anyrouter": {
      "transport": "http",
      "url": "https://anyrouter.dev/api/v1/mcp"
    }
  }
}

Revoke

cmd mcp remove anyrouter deletes the local registration. To revoke the token server-side, use the MCP dashboard; later tool calls return 401 Unauthorized until you reconnect.

Troubleshooting

SymptomFix
anyrouter missing from cmd mcp listYou likely added it with a different scope. Check .mcp.json, ~/.commandcode/mcp.json, and ~/.commandcode/projects/<slug>/mcp.json.
OAuth browser flow does not openRun cmd mcp auth anyrouter, or open /mcp inside a Command Code session and authenticate there.

AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer