Claude Code Source
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
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
Maintainer
Works with
Installation
Manual Installation
npx claude-code-source-all-in-oneConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-oneRun 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.mjsAuthenticate 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-keyLaunch 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:7bExplore 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.mdClaude 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.
Claude Code Source Alternatives — Similar Coding Agents Servers
Looking for alternatives to Claude Code Source? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
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.
Set Up Claude Code Source in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.