README.md
</a>
<sub>
<a href="https://www.kimi.com/code?aff=ccr"><strong>Kimi Code Subscription</strong></a>
·
<a href="https://platform.kimi.ai?aff=ccr"><strong>API Global</strong></a>
·
<a href="https://platform.kimi.com?aff=ccr">API China</a>
</sub>
</td>
Connect Claude Code, Codex, Grok CLI, ZCode, and compatible API clients to the providers you choose—then route, fail over, extend, and observe every request from one app.
<p> <a href="https://github.com/musistudio/claude-code-router/releases"></a> <a href="#quick-start"></a> <a href="https://ccrdesk.top/"></a> </p> <p> <a href="README_zh.md"></a> <a href="https://discord.gg/rdftVMaUcS"></a> <a href="https://x.com/musistudio2026"></a> <a href="https://github.com/musistudio/claude-code-router/blob/main/LICENSE"></a> </p> </div>Claude Code Router (CCR) is a local model gateway and control plane for coding agents. It gives Claude Code, Codex, Grok CLI, ZCode, and compatible API clients one stable local endpoint, while you manage the providers, models, accounts, routing rules, and tools behind it from one place.
Use CCR to:
CCR supports OpenAI Chat / Responses, Anthropic Messages, Gemini Generate Content / Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible providers.
http://127.0.0.1:3456 by default.Your agent is now connected to CCR. To add conditions, retries, request rewrites, or fallback models, open Routing.
<details> <summary><strong>Desktop packages and local data locations</strong></summary>Claude-Code-Router_<version>-mac-Apple-Silicon-arm64.dmg or .zipClaude-Code-Router_<version>-mac-Intel-x64.dmg or .zipClaude Code Router_<version>.exeClaude Code Router_<version>.AppImageRuntime configuration is stored in SQLite at ~/.claude-code-router/config.sqlite on macOS/Linux and %APPDATA%\claude-code-router\config.sqlite on Windows. A legacy config.json is read once for migration only when no SQLite configuration exists.
The npm CLI requires Node.js 22 or newer. It starts the same gateway and a browser-based management UI without Electron:
npm install -g @musistudio/claude-code-router
ccr ui
Open http://127.0.0.1:3458, then follow the same Providers → Server → Agent Config flow above. The model gateway remains at http://127.0.0.1:3456. See the CLI reference for service modes, authentication, and profile commands.
docker compose up -d --build
Docker exposes the management UI and gateway routes through http://127.0.0.1:3458 by default. Read the Docker deployment guide before exposing CCR remotely.
Claude Code · Codex · Grok CLI · ZCode · Compatible API clients
│
▼
Claude Code Router :3456
Profiles · Routing · Credentials · Tools · Logs
│
▼
Selected provider, model, and account
| Area | Highlights |
|---|---|
| Agents | Profiles for Claude Code, Codex, Grok CLI, and ZCode; model overrides; scopes; environment settings; CLI and app launch entries; multi-instance workflows |
| Providers | Presets and custom endpoints; protocol probing; model discovery; connectivity checks; local login import where supported; single keys and credential pools |
| Models & routing | Searchable catalog; model descriptions for task selection; conditions on headers and bodies; prefixes; rewrites; retries; ordered fallbacks |
| Tools & extensions | Fusion models; ToolHub; built-in browser automation; Chrome login-state import; wrapper and core gateway plugins; local routes and virtual models |
| Access & quotas | Separate CCR client keys with expiration and local request, token, and image limits |
| Observability | Request and response details; resolved provider, model, and credential; status; latency; tokens; estimated cost; tool calls; agent traces |
| Network & relay | Local HTTP / HTTPS proxy, optional CA, network capture, and bot relay through Weixin iLink, WeCom, Slack, Discord, Telegram, LINE, Feishu, and DingTalk |
The complete documentation lives at ccrdesk.top.
Codex support is powered by musistudio/codexl.
</a>
<sub>One-time support via Ko-fi</sub>
</td>
<td align="center" width="220">
<a href="https://paypal.me/musistudio1999">
</a>
<sub>International sponsorship</sub>
</td>
</td>
<td align="center" width="220">
<strong>WeChat Pay</strong>
</td>
<strong>Z智谱</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://aihubmix.com/">
<strong>AIHubmix</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://ai.burncloud.com">
<strong>BurnCloud</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://share.302.ai/ZGVF9w">
<strong>302.AI</strong>
</a>
</td>
<strong>RunAPI</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://teamorouter.com/">
<strong>TeamoRouter</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://code0.ai/agent/register/9n9jOsSnYQoemIVL?utm_source=claudecoderouter&utm_medium=partner&utm_campaign=claudecoderouter_2026&utm_content=default">
<strong>code0.ai</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://console.claudeapi.com/agent/register/LbmB7Y9kPloyzhwF?utm_source=claudecoderouter&utm_medium=partner&utm_campaign=claudecoderouter_2026&utm_content=default">
<strong>claudeapi</strong>
</a>
</td>
<strong>Qiniu Cloud AI</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=9HHHAB5QLAES">
<strong>Fenno.ai</strong>
</a>
</td>
<td align="center" width="330">
<a href="https://unity2.ai/register?source=claudecoderouter">
<strong>Unity2.Ai</strong>
</a>
</td>
<sub>If your name is masked, please contact me via my homepage email to update it with your GitHub username.</sub>
</div>This project is licensed under the MIT License.