claude-code

MCP.Pizza Chef: yasasbanukaofficial

This is an unofficial, archived copy of the source code behind Claude Code, Anthropic's command-line AI coding assistant, reportedly exposed through a public file on npm. It's not a ready-to-use app — you clone the code, install Bun or Node.js, build it yourself, and run it from a terminal. Inside you'll find the actual logic for how the assistant calls tools, edits files, and plans multi-step coding tasks. It's really meant for developers who want to study or tinker with how an AI coding agent is built, not for everyday non-technical use.

Coding
Other

Use This MCP client To

Read through a real AI coding agent's internal code Study how an AI assistant decides which tools to use Run a command-line coding helper on my own machine Learn how multi-step AI agents plan and execute tasks Explore hidden internal features of a well-known AI tool Build my own version of a terminal-based coding assistant

README

Claude Code's Entire Source Code Got Leaked via a Sourcemap in npm, Let's Talk About It

PS: This breakdown is also available on this blog with a better reading experience and UX :)

Note: There's a non-zero chance this repo might be taken down. If you want to play around with it later or archive it yourself, feel free to fork it and bookmark the external blog link!


⚠️ Important Disclaimer

I did not leak these files. I have simply provided an easy, documented way to access and study this codebase for research purposes. All files and information originate from public findings shared on Twitter/X. All credit for the discovery goes to the original source.


Earlier today (March 31st, 2026) - Chaofan Shou (@Fried_rice) discovered something that Anthropic probably didn't want the world to see: the entire source code of Claude Code, Anthropic's official AI coding CLI, was sitting in plain sight on the npm registry via a sourcemap file bundled into the published package.

The tweet announcing the leak

This repository is a backup of that leaked source, providing a full breakdown of what's in it, how the leak happened, and the internal systems that were never meant to be public.


🧐 How Did This Even Happen?

When you publish a JavaScript/TypeScript package to npm, the build toolchain often generates source map files (.map files). These files bridge minified production code and the original source for debugging.

The catch? Source maps contain the original source code embedded as strings inside a JSON file under the sourcesContent key.

{
  "version": 3,
  "sources": ["../src/main.tsx", "../src/tools/BashTool.ts", "..."],
  "sourcesContent": ["// The ENTIRE original source code of each file", "..."],
  "mappings": "AAAA,SAAS,OAAO..."
}

By forgetting to add *.map to .npmignore or failing to disable source maps in production builds (Bun's default behavior), the entire raw source was shipped to the npm registry.

Claude Code source files exposed in npm package


🛠 What's Under the Hood?

claude-code FAQ

Is this the official Claude Code app from Anthropic?
No — this is an unofficial mirror of source code that reportedly leaked from a public npm package, not an Anthropic product, and it could be removed at any time.
Do I need to know how to code to use this?
Yes — you have to clone the project, install Bun or Node.js, build it yourself, and run it from a command line, so it's really for developers.
Do I need an API key or account?
The README doesn't say directly, but since this is the engine behind an AI coding assistant, you'd need your own Anthropic (Claude) account and key to make it actually think and respond, similar to what you'd need with OpenAI or Gemini-based tools.
Can I use this to explore how an AI coding agent works internally?
Yes — it includes the full code for tool-calling, multi-agent coordination, and a terminal interface, so you can read through it like a blueprint.
Can I use this to run an AI assistant in my terminal?
Yes, in theory — after building it, it runs as a command-line tool similar to Claude Code, but it's unsupported and may be incomplete or broken.
Does this work inside Claude Desktop, Cursor, or VS Code?
No — it's a standalone terminal program, not a plugin for those apps.
Is this safe or supported long-term?
No — the author states it may be taken down, it's for research and archival purposes only, and there's no support from Anthropic.
What programming skills do I need to get it running?
You should be comfortable with terminal commands, installing Node.js or Bun, and running build scripts like npm install and npm run build.