musistudio/claude-code-router
One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control.
Claude Code Router (CCR)
What it is – A local gateway and control‑plane desktop (and CLI) app that lets you treat dozens of coding‑oriented AI agents (Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, WorkBuddy, etc.) as if they all spoke the same API. You configure providers (OpenAI, Anthropic, Gemini, Moonshot, Kimi, Mistral, custom endpoints, …) once, then point any supported client at http://127.0.0.1:3456.
Why you might care
- Single source of truth for API keys, model selections, and routing rules.
- Zero‑code provider switching – change models or fall‑back providers without editing each agent’s config.
- Reliability features – automatic retries, credential pools, key rotation, ordered fall‑backs.
- Observability – live logs show resolved provider, model, token usage, latency, cost estimates, and tool calls.
- Extensibility – plug‑in “Fusion” vision models, web‑search, custom tools, and a “ToolHub” for extra capabilities.
- Multi‑platform – shipped as an Electron desktop app for Windows/macOS/Linux, a pure‑Node CLI (
npm i -g @musistudio/claude-code-router), and a Docker compose deployment.
How it works (high‑level flow)
[Agent (Claude Code, Codex, etc.)] → CCR gateway (localhost:3456)
├─ Profiles – per‑agent configuration (model, env, scopes)
├─ Routing – conditional rewrites, retries, fall‑backs
├─ Credentials – provider presets, key pools
└─ Tools – Fusion vision, web search, custom plugins
↓
[Selected provider endpoint] (OpenAI, Anthropic, Kimi, etc.)
Getting started
- Download the desktop binary for your OS (Windows .exe, macOS .dmg, Linux .AppImage) from the GitHub releases page.
- Open the app, add a provider preset or custom endpoint, paste the API key, and save.
- Click Server → Start – the gateway starts on
127.0.0.1:3456. - In Agent Config pick the agent you want (e.g., Claude Code) and select a model profile.
- Run the agent as usual; CCR will route the request and log details.
CLI alternative – after npm i -g @musistudio/claude-code-router run ccr ui to launch the same web UI (default at http://127.0.0.1:3458). Docker users can docker compose up -d to spin up both UI and gateway.
Key capabilities
| Area | What you get |
|---|---|
| Agents | Ready‑made profiles for 10+ coding agents, model overrides, multi‑instance workflows |
| Providers | Built‑in presets for OpenAI, Anthropic, Gemini, Moonshot, Kimi, Mistral, OpenRouter, DeepSeek, etc.; custom endpoint support |
| Routing | Conditional routing rules, request/response rewrites, retry policies, ordered fall‑backs |
| Tools & Extensions | Fusion vision models, web‑search, browser automation, Chrome login import, plug‑in architecture |
| Observability | Per‑request logs with provider, model, token count, latency, estimated cost, tool calls |
| Access control | Local client keys with quotas, expiration, and per‑request limits |
| AgentClaw | Relay agents to chat platforms (WeChat, Slack, Discord, Telegram, LINE, Feishu, DingTalk) |
Documentation & support – Full guides, API reference, and troubleshooting are hosted at ccrdesk.top. A Discord community and sponsor links are listed in the README.
License – The repository is released under the MIT License.
All information above is taken directly from the project's README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project