Claude Code
Router9 and Claude Code — MCP tools today, model routing pending
Claude Code is Anthropic's terminal coding agent. A harness connects to Router9 in two independent ways — the model it talks to and the MCP tools it can call — and for Claude Code today only the second one applies.
Model routing — not currently supported
Claude Code speaks Anthropic's Messages API to its model (the ANTHROPIC_BASE_URL endpoint). Router9 is an OpenAI Chat Completions gateway and does not expose an Anthropic-native API — /v1/messages and /v1/anthropic both return 404. There is therefore no ANTHROPIC_BASE_URL you can point Claude Code at to route its model through Router9, and this page intentionally does not show one.
See Choosing models for the harnesses that route through Router9 today (opencode, Goose, Hermes, and any Chat Completions client).
Use Claude Code on its own Anthropic model and let Router9 provide tools over MCP, as below.
MCP Setup — supported
MCP is independent of the model, so Claude Code can call Router9's hosted Skills (image, audio, memory, artifacts) while running on its own model. Add Router9 as a remote HTTP MCP server with one command:
claude mcp add --transport http router9 https://api.router9.com/v1/mcp \
--header "Authorization: Bearer sk-r9k-your-key"By default the server is added to the local scope (this project, your machine only). Use --scope user to make it available in every project, or --scope project to share it with your team through a checked-in .mcp.json.
Verify the connection with claude mcp list — Router9 reports ✓ Connected — or from inside a session with the /mcp command, where the Skills then show up as mcp__router9__* tools.
You can also write the configuration by hand in .mcp.json (project scope) or ~/.claude.json (user scope):
{
"mcpServers": {
"router9": {
"type": "http",
"url": "https://api.router9.com/v1/mcp",
"headers": {
"Authorization": "Bearer sk-r9k-your-key"
}
}
}
}Prefer not to commit your key? Claude Code expands environment variables in
.mcp.json, so"Authorization": "Bearer ${ROUTER9_API_KEY}"works too.
See Install MCP Server for the full tool list.
Skills (optional): Router9 offers image and audio Skills as agent tools. MCP is the recommended way to expose them; otherwise call them directly as REST endpoints (
/v1/image/*,/v1/audio/*,/v1/search/) with yoursk-r9k-key — see the API Reference.
Tips
- Windows, macOS and Linux all use the same
claude mcp addcommand and the same~/.claude.json/.mcp.jsonformat. - The MCP connection and the model are configured independently — Router9 tools work regardless of which Anthropic model Claude Code runs.