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>
Claude Code Router Desktop is a local control plane for coding agents. It gives Claude Code, Codex, Grok CLI, ZCode, and compatible API clients one stable local endpoint, then lets you decide which provider, model, routing policy, tool stack, and account should handle each request.
Instead of wiring every agent to every model service by hand, CCR centralizes the model layer on your own machine: provider presets, custom endpoints, credential pools, fallback chains, Fusion-enhanced models, MCP tools, request logs, account usage, and desktop launch profiles all live in one app.
<p align="center"> </p>| Goal | CCR gives you |
|---|---|
| Keep the same agent workflow while switching models | Local profiles for Claude Code, Codex, Grok CLI, and ZCode, with CLI/app launch entries and per-profile model selection |
| Try many providers without rebuilding config every time | Built-in provider presets, custom OpenAI/Anthropic/Gemini-compatible endpoints, protocol probing, model discovery, and connectivity checks |
| Make routing a runtime policy | Built-in agent routing, conditional rules, request rewrites, model-prefix routing, retries, and fallback model chains |
| Control cost and quota pressure | Credential pools, key rotation, local usage limits, account balance snapshots, token/cost dashboards, and tray status |
| Upgrade a model without replacing it | Fusion models that add vision, web search, or selected MCP tools to an existing base model |
| Keep large tool sets usable | ToolHub, a compact MCP entry point that lets agents resolve and invoke the tools needed for the current task |
| Debug what actually happened | Request logs, resolved provider/model fields, latency, token usage, estimated cost, network capture, and agent observability |
Read the full documentation at ccrdesk.top, including the CLI reference and Docker deployment guide.
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>.AppImage~/.claude-code-router/config.sqlite%APPDATA%\claude-code-router\config.sqliteCCR stores runtime configuration in SQLite. A legacy config.json is read only once for migration when no SQLite config exists.
After the service is started from the Server page, CCR listens on http://127.0.0.1:3456 by default. The Server page controls the gateway Host, Port, proxy mode, system proxy, network capture, and CA certificate status.
The npm CLI requires Node.js 22 or newer and provides the browser management UI, gateway, and Agent Config launch commands without Electron:
npm install -g @musistudio/claude-code-router
ccr ui
The CLI management UI defaults to http://127.0.0.1:3458, while its model gateway defaults to http://127.0.0.1:3456. See the complete CLI reference for background/foreground service commands, options, profile launching, authentication, and data locations.
To run the browser UI and gateway behind one Nginx port with persistent Docker storage:
docker compose up -d --build
Docker exposes both management and gateway routes at http://127.0.0.1:3458 by default. Read the Docker deployment guide before remote exposure; it covers the internal port topology, management and gateway authentication, CCR_PUBLIC_BASE_URL, volumes, backup/restore, upgrades, and health checks.
CCR can be configured entirely from the desktop UI. Use this setup order for a clean first run.
Open Providers, click Add Provider, then choose a built-in preset, import a supported local agent login state, or select Other / custom API endpoint. Fill in the provider name, base URL, protocol, API key, and model list. Run protocol probing and model connectivity checks when available, then save the provider.
Open Routing to enable built-in agent routes, add conditional rules, configure request rewrites, and set fallback behavior. Use Add Routing Rule for request conditions, model-prefix routing, or rule-level fallback targets.
Open Server and click Start. After the page shows Running, CCR listens on http://127.0.0.1:3456 by default. Enable Auto start if you want CCR to start the local gateway whenever the desktop app opens.
Open Agent Config and choose the client you want to use. Configure Claude Code, Codex, Grok CLI, or ZCode, select the target model and effect scope, then apply the config. For app entries, use Open Agent to launch the target app through CCR.
Use Settings → Logs & Observability to enable request logs and agent observability. Use Logs to confirm request model, resolved provider, resolved model, status, tokens, latency, and errors. Use the dashboard and tray window for token, cost, model distribution, and account status.
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.