Claude Code Router
A local model gateway and control plane that connects AI coding agents like Claude Code, Codex, and Grok CLI to any provider, with routing, failover, and observability.
At a Glance
About Claude Code Router
Claude Code Router (CCR) is an open-source local model gateway built by musistudio that lets developers connect multiple AI coding agents—Claude Code, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, and Claude Design—to any compatible model provider from a single control plane. The project is licensed under the MIT License and available on GitHub, where it has accumulated over 36,000 stars. It runs locally as a desktop app, npm CLI, or Docker container, exposing a stable endpoint at http://127.0.0.1:3456 that agents connect to instead of provider APIs directly.
What It Is
Claude Code Router is a local reverse proxy and management layer for AI coding agents. Instead of configuring each agent separately with its own API keys and provider settings, CCR sits between the agents and the providers, handling protocol translation, credential management, routing logic, and observability. It supports OpenAI Chat/Responses, Anthropic Messages, Gemini Generate Content/Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible endpoints.
Core Capabilities
CCR organizes its functionality into several distinct areas:
- Agent profiles: Pre-configured connection settings for Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, and ZCode, including model overrides, scopes, environment settings, and CLI/app launch entries.
- Provider management: Built-in presets and custom endpoints with protocol probing, model discovery, connectivity checks, local login import where supported, and credential pools with key rotation.
- Routing and fallback: Conditional routing based on headers and request bodies, model prefixes, request rewrites, retries, and ordered fallback models to keep requests running when a provider fails.
- Fusion and tool extensions: Adds vision, web search, MCP tools, and ToolHub capabilities to models that don't natively support them; includes built-in browser automation and Chrome login-state import.
- Access control: Separate CCR client keys with expiration and local request, token, and image limits.
- Observability: Per-request logs showing resolved provider, model, credential, status, latency, token usage, estimated cost, tool calls, and agent traces.
- AgentClaw: Agent relay integration through messaging platforms including Weixin iLink, WeCom, Slack, Discord, Telegram, LINE, Feishu, and DingTalk.
Deployment Model
CCR offers three installation paths:
- Desktop app: An Electron-based application for macOS (Apple Silicon and Intel), Windows, and Linux with a system tray, onboarding flow, and local configuration database.
- npm CLI: Requires Node.js 22 or newer; starts the gateway and a browser-based management UI at
http://127.0.0.1:3458without Electron overhead. - Docker: Containerized deployment suitable for remote hosts; exposes the management UI and gateway through
http://127.0.0.1:3458by default.
All three paths share the same gateway endpoint at port 3456 and the same provider/agent configuration model.
Update: v3.0.18
The latest release is v3.0.18, published on July 31, 2026. The repository was last pushed on August 4, 2026, indicating active development. The project was created in February 2025 and has grown to over 36,000 GitHub stars and 3,000 forks, with Kimi (Moonshot AI's K3 model) listed as a named sponsor and built-in provider preset. The README notes that Kimi K3 ships as a built-in provider preset with native subscription endpoint passthrough and account balance visibility in the CCR dashboard.
Why It Got Attention
CCR addresses a practical friction point for developers using multiple AI coding agents: each agent typically requires its own provider configuration, API keys, and model settings. By centralizing these into one local gateway, CCR lets users switch providers or models without editing agent configuration files, pool credentials across accounts, add capabilities like vision or web search to models that lack them natively, and inspect every request in a unified log. The project's rapid star growth on GitHub reflects demand for provider-agnostic tooling in the AI coding agent ecosystem.
Community Discussions
Be the first to start a conversation about Claude Code Router
Share your experience with Claude Code Router, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under the MIT License. Self-host via desktop app, npm CLI, or Docker.
- Desktop app for macOS, Windows, Linux
- npm CLI mode
- Docker deployment
- All routing, fallback, and observability features
- Agent profiles for all supported agents
Capabilities
Key Features
- Local model gateway at http://127.0.0.1:3456
- Agent profiles for Claude Code, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, Claude Design
- Provider presets and custom endpoints with protocol probing
- Credential pools and key rotation
- Conditional routing by headers and request body
- Ordered fallback models and retries
- Fusion: adds vision, web search, MCP tools to any model
- ToolHub integration
- Built-in browser automation
- Chrome login-state import
- CCR client keys with expiration and usage limits
- Per-request observability: provider, model, latency, tokens, cost
- AgentClaw relay for Slack, Discord, Telegram, WeCom, Feishu, DingTalk, LINE
- Desktop app (macOS, Windows, Linux)
- npm CLI mode
- Docker deployment
- Browser-based management UI
