Claude Code Source

v1.0.0Coding Agentsstable

Always up-to-date open-source mirror of Claude Code (currently v2.1.123). Run from source with Claude subscription/API, ChatGPT subscription (GPT-5.5 / GPT-5.4), OpenAI-compatible providers, or local Ollama. 18 deep-dive architecture articles include

ai-agentai-codinganthropicarchitecture-analysischatgpt
Share:
79
Stars
0
Downloads
0
Weekly
0/5

What is Claude Code Source?

Claude Code Source is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to always up-to-date open-source mirror of claude code (currently v2.1.123). run from source with claude subscription/api, chatgpt subscription (gpt-5.5 / gpt-5.4), openai-compatible providers, or local ...

Always up-to-date open-source mirror of Claude Code (currently v2.1.123). Run from source with Claude subscription/API, ChatGPT subscription (GPT-5.5 / GPT-5.4), OpenAI-compatible providers, or local Ollama. 18 deep-dive architecture articles include

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Always up-to-date open-source mirror of Claude Code (current

Use Cases

Open-source Claude Code alternative
Multi-provider LLM support (Claude, ChatGPT, Ollama)
Architecture documentation and deep dives
wuwangzhang1216

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx claude-code-source-all-in-one

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Claude Code Source

Claude Code Source All-In-One is an educational open-source mirror of Anthropic's Claude Code CLI (currently tracking v2.1.123) that lets developers run the AI coding agent from source against multiple LLM providers including Anthropic Claude, ChatGPT (GPT-5.5/5.4), OpenAI-compatible APIs, DeepSeek, and local Ollama models. The repository ships 18 bilingual deep-dive architecture articles dissecting every major subsystem of Claude Code — from the main agent loop and streaming to tool orchestration, sub-agents, and context compression. Developers use it to study production-grade AI agent internals, experiment with alternative LLM backends, or run Claude Code without an Anthropic subscription.

Prerequisites

  • Node.js 18 or higher installed
  • Bun 1.0 or higher installed (https://bun.sh)
  • At least one LLM provider credential: ANTHROPIC_API_KEY (sk-ant-...), OPENAI_API_KEY (sk-...), DEEPSEEK_API_KEY, or a running Ollama instance
  • Git to clone the repository
1

Clone the repository

Clone the claude-code-source-all-in-one repository to your local machine. This is the only way to run from source — there is no published npm package.

git clone https://github.com/wuwangzhang1216/claude-code-source-all-in-one.git
cd claude-code-source-all-in-one
2

Run the setup script to install dependencies and generate shims

The setup script installs all Node.js dependencies and generates the necessary shim files so you can launch the agent with the start.sh wrapper.

node scripts/setup.mjs
3

Authenticate with your chosen LLM provider

Use the start.sh script to log in. For Anthropic Claude, run the login command; for other providers, set the appropriate environment variable.

# For Anthropic (OAuth login)
./start.sh login

# For Anthropic via API key
export ANTHROPIC_API_KEY=sk-ant-your-key

# For OpenAI
export OPENAI_API_KEY=sk-your-key

# For DeepSeek
export DEEPSEEK_API_KEY=sk-your-deepseek-key
4

Launch the agent

Start the Claude Code agent from source. Without flags it defaults to Anthropic Claude. Pass --model to use a different provider.

# Default (Anthropic Claude)
./start.sh

# ChatGPT GPT-5.5
./start.sh --model gpt5.5

# DeepSeek
./start.sh --model deepseek:deepseek-chat

# Local Ollama
./start-ollama.sh qwen2.5-coder:7b
5

Explore the architecture articles

The repository includes 18 bilingual (English/Chinese) deep-dive articles covering every major subsystem. Open the article index to read about the main loop, streaming, tool orchestration, context compression, and more.

# View article index
cat claude-code-deep-analysis/README.en.md

Claude Code Source Examples

Client configuration

This project runs as a CLI tool, not a traditional MCP server. However, it can be registered as an MCP server for other clients using the npx command from the installation data.

{
  "mcpServers": {
    "claude-code-source": {
      "command": "npx",
      "args": ["claude-code-source-all-in-one"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-your-key"
      }
    }
  }
}

Prompts to try

Use the agent as you would Claude Code — ask it to write, edit, and reason about code in your project.

- "Explain how the main agent loop in query.ts works"
- "Implement a REST endpoint for user authentication in this project"
- "Review this file for bugs and suggest improvements"
- "How does context compression work in Claude Code?"

Troubleshooting Claude Code Source

start.sh fails with 'Bun not found' or 'node: command not found'

Install the required runtimes: Node.js 18+ from nodejs.org and Bun from bun.sh. Verify with 'node --version' and 'bun --version' before running setup.mjs.

ChatGPT login fails or GPT model returns errors

For ChatGPT subscription support, run './start.sh chatgpt-login' to complete the OAuth flow first. Ensure you have an active ChatGPT Plus or Pro subscription. For API key access use OPENAI_API_KEY instead.

Ollama model fails to connect

Ensure Ollama is running locally ('ollama serve') and the model is pulled ('ollama pull qwen2.5-coder:7b'). Then use './start-ollama.sh qwen2.5-coder:7b'. Ollama listens on localhost:11434 by default.

Frequently Asked Questions about Claude Code Source

What is Claude Code Source?

Claude Code Source is a Model Context Protocol (MCP) server that always up-to-date open-source mirror of claude code (currently v2.1.123). run from source with claude subscription/api, chatgpt subscription (gpt-5.5 / gpt-5.4), openai-compatible providers, or local ollama. 18 deep-dive architecture articles include It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Claude Code Source?

Follow the installation instructions on the Claude Code Source GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Claude Code Source?

Claude Code Source works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Claude Code Source free to use?

Yes, Claude Code Source is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "claude-code-source-all-in-one": { "command": "npx", "args": ["-y", "claude-code-source-all-in-one"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Claude Code Source?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides