Skip to main content
This repository archives the leaked source code of Anthropic’s Claude Code CLI. Contributions here are about documentation, tooling, and exploration aids — not modifying the original Claude Code source.
Do not modify anything in src/. It contains the original leaked source, preserved as-is. The backup branch holds the unmodified original.

What you can contribute

Documentation

Improve or expand pages in the docs/ directory — corrections, missing coverage, better examples, or entirely new guides.

MCP server

Enhance the exploration MCP server in mcp-server/ — new tools, better search, performance improvements, or bug fixes.

Analysis

Write-ups, architecture diagrams, or annotated walkthroughs of specific subsystems.

Tooling

Scripts or tools that aid in studying the source code.

Setup

Prerequisites

  • Node.js 18 or later
  • Git

Clone the repo

git clone https://github.com/nirholas/claude-code.git
cd claude-code

MCP server development

The MCP server in mcp-server/ is the primary piece of runnable code in this repo. It is a standalone Node.js package:
cd mcp-server
npm install
npm run dev    # Run with tsx — no build step needed
npm run build  # Compile to dist/

Linting and type checking

These commands run against the original src/ to verify nothing is broken, but they also apply to any new TypeScript you write:
# From the repo root
npm run lint        # Biome lint
npm run typecheck   # TypeScript type check

Code style

For any new code in mcp-server/, tooling scripts, or other additions:
  • TypeScript with strict mode enabled
  • ES modules (import/export, not require)
  • 2-space indentation (tabs are used in src/ to match the Biome config — don’t copy that convention into new files)
  • Descriptive variable names, minimal inline comments

Submitting changes

1

Fork the repository

Create a personal fork on GitHub.
2

Create a feature branch

git checkout -b my-feature
3

Make your changes

Edit docs, update the MCP server, or add tooling. Do not touch src/.
4

Commit with a clear message

git commit -m "docs: add subsystem guide for voice input"
5

Push and open a pull request

Push your branch to your fork and open a PR against the main branch.

Questions

Open an issue on GitHub or reach out to nichxbt on X.

See also

Exploring the source

Study paths, grep patterns, and key files for navigating the codebase.

MCP server

Connect any MCP-compatible client to explore the source interactively.

Build docs developers (and LLMs) love