Claude Code Router

Claude Code Router is an open-source routing harness developed by MusiStudio designed to orchestrate and proxy API requests generated by the Claude Code CLI. It functions as an intermediary middleware layer, intercepting outbound requests from Claude Code and distributing them across alternative backends, models, or custom API endpoints. In standard workflows, the router executes either as a local background daemon or within a containerized Docker setup. It reroutes API calls issued during coding sessions, allowing developers to direct model execution through various upstream providers, custom account authentications, or local proxy setups. Configuration is handled via structured configuration files and scripts that define routing pipelines and provider mappings. Unlike standalone coding agents that execute tasks directly, Claude Code Router acts specifically as an orchestrator and proxy pipeline for the official Claude Code CLI. This architecture enables developers to leverage the standard Claude Code developer interface while decoupling it from rigid upstream API limitations or direct single-provider endpoints. Claude Code Router is released under the permissive MIT open-source license. It is available as a community-driven repository with active Docker workflows, browser helper extensions, and customizable runtime plugins.

Tags: agent harness, ai agent, cli, coding agent, developer tools, OpenSource

Visit Claude Code Router

Key features

  • Request Interception & Routing — Proxies and distributes API traffic from the Claude Code CLI across multiple model endpoints. - Flexible Provider Management — Supports custom provider pipelines to redirect calls to compatible LLM backends. - Containerized Deployment — Includes Docker configurations and automated workflows for straightforward containerized hosting. - Browser Account Fetch Helper — Provides extension and runtime plugins to assist with authentication and session fetching. - Modular Architecture — Implements structured packages and plugin interfaces to customize request handling pipelines. - Permissive Open-Source Licensing — Distributed under the MIT license for free self-hosted customization and deployment.

Use cases

Use Case: Custom Model Proxying for Claude Code Developers using Claude Code who need to route requests through custom gateway endpoints, enterprise proxies, or alternative upstream provider APIs can direct the CLI traffic through Claude Code Router without altering their terminal interface.

Use Case: Local Multi-Provider Orchestration Teams managing multiple API keys, specialized regional endpoints, or varying provider pipelines can configure the router to distribute and handle traffic across different backend services depending on configuration rules.

Use Case: Isolated Containerized Environments Platform engineers can deploy Claude Code Router within Docker containers in development sandboxes, standardizing proxy configurations and connection handling across distributed engineering teams.

Who it is for

Claude Code Router is aimed at developers and DevOps engineers using Anthropic's Claude Code CLI who require granular control over their API routing, network proxies, or upstream model providers. It is not suitable for users seeking a turnkey, standalone coding agent that operates independently without configuring underlying proxy infrastructure.

Install guide

Installation Clone the repository directly from GitHub and install project dependencies using Node.js/npm (standard setup based on repository structure): bash git clone https://github.com/musistudio/claude-code-router.git cd claude-code-router npm install Alternatively, build and run using Docker: bash docker build -t claude-code-router -f docker/Dockerfile . docker run -d -p 8080:8080 --name claude-router claude-code-router

First Run Configure your provider credentials and routing settings in the configuration files located in the docs or packages directories before starting the router service: bash # Start the local router pipeline npm start Export the router proxy address in your environment so Claude Code routes its requests through the local daemon: bash export ANTHROPIC_BASE_URL="http://localhost:8080/v1"

Example Session Run the Claude Code CLI normally; requests will automatically route through the configured proxy harness: bash claude > Analyze the test suite failures in tests/auth.test.ts and propose a patch.

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • SWE-agent — SWE-agent is an open-source autonomous software engineering agent harness built and maintained by researchers from Princeton University and Stanford University.…
  • Agent Runbook — Agent Runbook is an open-source contract-based multi-agent skill framework developed by KnoxOps. It acts as an orchestrator and compiler that…
  • Weaver — Weaver is an open-source agent harness and orchestration framework maintained by sean35mm on GitHub. Built on top of the Bun…
  • Context Bridge — Context Bridge is an open-source CLI agent harness and context orchestration utility developed by serdardb. It is built to facilitate…
  • Hivelore — Hivelore is an open-source agent harness and contextual memory orchestrator created by Doucs91. It provides persistent project memory, decision tracking,…
  • Agentic Engineering Framework — Agentic Engineering Framework is an open-source orchestration harness and governance layer developed by Dimitri Geelen. It is designed to constrain,…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories