Skip to content

Repository files navigation

Claude Code — Leaked Source

The full source code of Anthropic's Claude Code CLI, leaked on March 31, 2026.

TypeScript Bun React + Ink Files MCP Server


What is Claude Code?

Claude Code is Anthropic's official CLI tool for interacting with Claude directly from the terminal. It handles file editing, command execution, codebase searching, and git workflows. This repository contains the leaked src/ directory for educational exploration.

Property Details
Leaked 2026-03-31
Language TypeScript (strict)
Runtime Bun
Scale ~1,900 files · 512,000+ lines of code

🔍 Explore with MCP Server

This repository includes an MCP server that allows any MCP-compatible client (Claude Code, Claude Desktop, VS Code, Cursor) to explore the source code interactively.

Quick Setup

# 1. Clone the repo
git clone https://github.com/scmishra-cse/claude-code.git
cd claude-code/mcp-server

# 2. Install & build
npm install && npm run build

# 3. Add to Claude Code
claude mcp add claude-code-explorer -- node $(pwd)/dist/index.js

Key Tools

  • search_source: Grep across the entire source tree.
  • read_source_file: Read any file from src/ by path.
  • list_tools / list_commands: Explore the ~40 tools and ~50 commands available in Claude Code.

Directory Structure

src/
├── main.tsx                 # CLI entrypoint (Commander + React/Ink)
├── QueryEngine.ts           # Core LLM API caller
├── tools/                   # Agent tool implementations (~40)
├── commands/                # Slash command implementations (~50)
├── services/                # External service integrations
├── bridge/                  # IDE integration (VS Code, JetBrains)
├── mcp/                     # Model Context Protocol implementation
└── components/              # Terminal UI components (Ink)

Disclaimer

This repository archives source code leaked from Anthropic's npm registry on 2026-03-31. All original source code is the property of Anthropic. This is not an official release and is not licensed for redistribution.

About

Under the hood of Claude Code. Deconstructing the leaked TypeScript source of Anthropic's AI agent CLI. Educational archive & exploration toolkit.

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages