Reading the leaked Claude Code source through an MCP server
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
At a glance
- What is it?
- codeaashu/claude-code publishes the leaked src/ directory of Anthropic's Claude Code CLI, discovered on 2026-03-31 through a source map in the npm package. The part with lasting value is not the source itself but the MCP server the repository ships for searching it.
- Who is it for?
- Read this repository if you want to see how a mature terminal coding agent is put together: the permission model, the tool catalog, the bridge to editors. Do not build on it, given the NOASSERTION licence on someone else's source and the fact that it is a 2026-03-31 snapshot of a product that keeps shipping.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 19 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What the repository contains and how it got there
Claude Code is Anthropic's command line tool for working with Claude from a terminal: editing files, running commands, searching codebases and driving git workflows. This repository holds a copy of its src/ directory.
The README states that Chaofan Shou, posting as @Fried_rice, found that the published npm package for Claude Code shipped a .map file pointing at the full, unobfuscated TypeScript source, downloadable as a zip from Anthropic's R2 storage bucket. The leak is dated 2026-03-31 in the README, and the quote and link to the original post are reproduced in it. The repository keeps the original unmodified leaked source on a branch named backup, which is the place to go if you want the material as it arrived rather than the annotated version on the default branch.
Worth saying plainly: this is a third party mirror of source that was not published on purpose. Nothing here is an official release channel.
The MCP server is the useful part
The repository ships a Model Context Protocol server so any MCP compatible client can query the source instead of opening files one at a time. The README names Claude Code, Claude Desktop, VS Code Copilot and Cursor as clients.
Eight tools are documented. list_tools enumerates the agent tools with their source files, list_commands does the same for slash commands, get_tool_source returns the full source of one tool with BashTool and FileEditTool given as examples, and get_command_source does the same for a command such as review or mcp. read_source_file reads any file under src/ by path, search_source greps the whole tree, list_directory browses it, and get_architecture returns a high level overview.
Four prompts sit alongside them: explain_tool, explain_command, architecture_overview and how_does_it_work, the last of which takes a subsystem name such as permissions, MCP or bridge. In practice the pair that changes how you read a large unfamiliar codebase is search_source plus read_source_file, since it turns a grep session into a question you ask an assistant.
Installing the explorer from npm or from source
The server is published on npm as warrioraashuu-codemaster, so the shortest path needs no clone. This registers it with Claude Code:
claude mcp add warrioraashuu-codemaster -- npx -y warrioraashuu-codemasterIf you want the local build instead, clone the repository, build the server under mcp-server, and register the compiled entry point. The README gives it as a one-liner:
git clone https://github.com/codeaashu/claude-code.git ~/claude-code \
&& cd ~/claude-code/mcp-server \
&& npm install && npm run build \
&& claude mcp add claude-code-explorer -- node ~/claude-code/mcp-server/dist/index.jsAfter that, asking the client to list tools or grep the source should route to the server. The README notes that npm run build has to run before registration, since the registered path is dist/index.js.
For VS Code, the README says to add this to .vscode/mcp.json, where the environment variable tells the server where the source root lives:
{
"servers": {
"claude-code-explorer": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/mcp-server/dist/index.js"],
"env": { "CLAUDE_CODE_SRC_ROOT": "${workspaceFolder}/src" }
}
}
}Claude Desktop uses the mcpServers shape instead, with absolute paths, and Cursor uses the same format in ~/.cursor/mcp.json.
What the docs directory covers
Five guides live under docs/. architecture.md covers the core pipeline, startup sequence, state management, rendering and data flow. tools.md is a catalog of the agent tools with categories and the permission model. commands.md covers the slash commands by category. subsystems.md goes into the Bridge, MCP, permissions, plugins, skills, tasks, memory and voice subsystems. exploration-guide.md is the one to read first, since it gives study paths, grep patterns and the key files.
One inconsistency is worth flagging before you rely on counts. The docs table describes commands.md as a reference for about 85 slash commands, while the MCP tool table describes list_commands as listing about 50. Both numbers come from the same README. Either one of the two is stale, or they count different things, and the repository does not say which.
Scale and stack of the leaked tree
The README puts the source at roughly 1,900 files and more than 512,000 lines of TypeScript, written in strict mode. The runtime is Bun, which matters if you intend to run any of it rather than read it, and the terminal UI is React rendered through Ink.
The repository listing around that source includes docs/, prompts/, mcp-server/, docker/, web/, scripts/, plus Skill.md and agent.md at the root, a Dockerfile, vercel.json, server.json and a gitpretty-apply.sh script. The npm badge on the README points at warrioraashuu-codemaster, not at the repository name, which is easy to trip over when you are looking for the package.
Provenance, licence and why they matter here
GitHub reports the licence as NOASSERTION even though the listing includes a LICENSE file. That combination means whatever text is in that file was not matched to a recognised licence, and the source itself belongs to Anthropic. Reading it to learn how agent tooling is built is one thing; copying it into a product is a different question that this review will not answer.
The second problem is time. This is a snapshot dated 2026-03-31, and the tool it came from ships continuously. Any behaviour you deduce from this tree may already be wrong upstream, and there is no version tag or release in the repository to anchor it to.
A smaller note on the README itself: it carries a promotional block for an unrelated service, RepoXray, in the middle of the page. It does not affect the source, but it is a signal about how the repository is maintained. The last push was on 2026-08-29.
Learning the same patterns without the leak
The alternative is to study Anthropic's official Claude Code documentation and release notes instead of this tree. The difference is one of layer. Official material describes the interface: what commands exist, what permissions do, how configuration is read. It tells you nothing about how those features are implemented, which is exactly the layer this repository exposes.
If the implementation layer is what you want, the honest options are this snapshot, with its licensing and staleness problems, or building your own agent tooling and hitting the same design problems yourself. What this repository is genuinely good for is answering narrow questions about structure, such as how the permission prompt is wired or how the bridge talks to an IDE, where reading a real implementation beats reading a changelog.
Editorial conclusion
Read this repository if you want to see how a mature terminal coding agent is put together: the permission model, the tool catalog, the bridge to editors. Do not build on it, given the NOASSERTION licence on someone else's source and the fact that it is a 2026-03-31 snapshot of a product that keeps shipping. Start with docs/exploration-guide.md, and if you only want to query the source, install the npm package and skip the clone.
Frequently asked questions
What can Claude Code really do?
The README describes it as Anthropic's command line tool for working with Claude from a terminal: editing files, running commands, searching codebases and managing git workflows. The repository documents about 40 agent tools and a catalog of slash commands behind that interface.
Is this the official Claude Code repository?
No. It is a third party mirror of leaked source, and the README says the original unmodified leaked source is kept on the backup branch.
Can I search the source without cloning the repository?
Yes, by installing the MCP server published on npm as warrioraashuu-codemaster, which exposes search_source, read_source_file and list_tools to any MCP compatible client.
What runtime does the leaked source need?
The README lists Bun as the runtime, with the terminal interface built on React and Ink over strict TypeScript.
Does the repository have a usable licence?
GitHub reports NOASSERTION for the repository even though a LICENSE file appears in the listing, so no licence was recognised and the source belongs to Anthropic.
Community notes