← Back to directory
C

Claude Code Source Restoration (CC)

Community
A runnable TypeScript source reconstruction of Claude Code CLI from source maps, for research only.
GitHub source repository ↗
★ 276 Stars Category · Dev Tools Popular Source revision 17f86397c5aa
14FMRS · D
Reliability
1/20
Security and permissions
4/20
Maintenance
2/20
Documentation
3/20
Setup experience
4/20

This MCP server is an unofficial source reconstruction of Claude Code, suitable for research and education but not for production. It runs on Bun and provides a complete source tree and development entry. Users should be aware of copyright and completeness issues.

Read the FMRS scoring method →

This is an unofficial repository that reconstructs the Claude Code CLI source code from the source maps of the public npm package @anthropic-ai/claude-code. It includes 1,987 TypeScript/TSX files and can be installed and run with Bun. It is intended for research and learning about Claude Code's internal implementation. Due to source map limitations, some modules are replaced with compatible shims or degraded implementations, so behavior may differ from the original.

Tools

The tool list has not been reviewed yet.

Setup

  1. Ensure Bun >= 1.3.5 and Node.js >= 24 are installed.
  2. Clone the repo: git clone https://github.com/lsm1103/CC and enter the directory.
  3. Install dependencies: bun install.
  4. Verify installation: bun run version should output the version.
  5. Start the development CLI: bun run dev.

Fit and risk

Best for

  • Developers interested in Claude Code's internals
  • Researchers analyzing large TypeScript projects
  • Technical users who want to study or extend Claude Code's source

Not for

  • Production use, as it is unofficial and incomplete
  • Users seeking official support or stability
  • Commercial use, as copyright belongs to Anthropic

Required permissions

  • This repo itself doesn't require API permissions, but running Claude Code features may need an Anthropic API key
  • Filesystem read/write permissions to install dependencies and run the CLI
  • Network access to call Anthropic API or fetch resources

Risks and side effects

  • The reconstructed version may contain unknown bugs or security vulnerabilities; not recommended for production
  • Source may be incomplete; some features may be missing or behave incorrectly
  • Copyright risk; for personal research and study only, not for commercial use

Troubleshooting

  1. Check that Bun and Node.js versions meet requirements
  2. Ensure network connectivity during `bun install`; if dependency issues occur, delete bun.lock and reinstall
  3. Check runtime logs for missing native modules or shim errors
  4. If the CLI fails to start, confirm an Anthropic API key is set (if needed)

Use cases

Researching the internal architecture and source code of Claude Code
Learning about Anthropic API clients, MCP integration, terminal UI, and more
Testing and debugging this reconstructed version locally

Supported clients

Supported clients have not been confirmed yet.