Skip to content

claude-code-router

Local gateway that routes Claude Code, Codex and other agents to the providers you choose

Permissive (OSI) · MIT AI-native

Listed by , founder & editor

83

Health

Thriving

Overview

Stars

38,348

Last commit

3 days ago

Nov 2026

Repository age

1 year

since Feb 2025

Latest version

v3.1.6

Nov 2026

Contributors

–

23 active in 90 days

Releases

25

last 12 months

Docker pulls

30k

musistudio/claude-code-router

Language

TypeScript

Claude Code Router, or CCR, is a local model gateway and control plane for coding agents. It gives clients such as Claude Code, Codex, Grok CLI, Kimi CLI, Kilo Code and OpenCode one local endpoint, by default http://127.0.0.1:3456. You manage providers, models, accounts and routing rules in one place.

It speaks OpenAI Chat and Responses, Anthropic Messages and Gemini protocols, and works with OpenRouter, DeepSeek, SiliconFlow, Moonshot, Mistral, Z.AI and custom compatible providers. Routing supports retries, credential pools, key rotation and ordered fallback models. You can add vision, web search, MCP tools and ToolHub to existing models. Request logs show the resolved route, latency, token usage and cost estimates.

You can run it as a desktop app for Windows, macOS and Linux, as an npm CLI with a browser UI, or in Docker. It is written in TypeScript and MIT licensed.

Who it's for

Developers using several coding agents

One gateway replaces separate model settings in each client.

Skip if: You use a single agent with a single provider.

Users who hit rate limits or provider outages

Retries, key rotation and fallback models keep requests going.

Skip if: You prefer to handle failover in your own proxy.

Teams watching model spend

Logs show tokens, latency and cost estimates per request.

Skip if: You need centralized billing across many users.

The problem it solves

Each coding agent needs its own model and provider configuration, and switching providers means editing several files. CCR puts one local endpoint in front of them. You change providers, models and fallbacks in one app.

Strengths

  • Supports about ten agents, including Claude Code, Codex and OpenCode
  • Handles OpenAI, Anthropic and Gemini protocols plus custom providers
  • Retries, credential pools and ordered fallback models
  • Desktop app, npm CLI with browser UI, or Docker
  • MIT licensed with 25 releases in the past year

Trade-offs

  • The npm CLI requires Node.js 22 or newer
  • You supply your own provider API keys
  • The Docker script expects a local repository checkout
  • Scope is routing and control, not a coding agent itself

Self-host claude-code-router

Self-hostable
Yes
Docker image
musistudio/claude-code-router
Docker Compose
The repository ships a Compose file

Quick start

npm install -g @musistudio/claude-code-router@latest
ccr ui

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is Claude Code Router free?

Yes. It is MIT licensed. You still pay your model providers for usage.

Can I self-host it?

Yes. It runs locally as a desktop app, an npm CLI or in Docker.

Which agents does it work with?

Claude Code, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, Claude Design and WorkBuddy.

Which platforms does the desktop app support?

macOS (Apple Silicon and Intel), Windows and Linux.

Similar tools in LLM gateways and routers

archgw

LLM gateways and routers

AI-native proxy and data plane for routing, guarding and tracing agent traffic

7.1k 499 30 days ago Active Apache-2.0

gpt-load

LLM gateways and routers

Self-hosted gateway that pools LLM API keys and subscriptions behind one endpoint

7.2k 799 today Thriving MIT

Helicone

LLM gateways and routers

AI gateway with request logging and tracing for teams running LLM apps

6.3k 709 6 days ago Slowing Apache-2.0

Replaces LangSmith

new-api

LLM gateways and routers

Self-hosted AI gateway that routes many model providers through one API and web console

52k 13k today Thriving AGPL-3.0

GoModel

LLM gateways and routers

Go-based AI gateway giving one OpenAI and Anthropic compatible endpoint for many LLM

1.3k 136 today Thriving MIT

Portkey AI Gateway

LLM gateways and routers

Self-hostable MIT-licensed gateway for routing requests across LLM providers

13k 1.4k 6 months ago Dormant MIT