MuhammadHananAsghar/claude-code
Deep static analysis of Anthropic's Claude Code CLI — extracted from npm source map leak (March 31, 2026). Architecture docs, API endpoints, tool system, MCP, plan mode, remote sessions, and more.
Platform-specific configuration:
{
"mcpServers": {
"claude-code": {
"command": "npx",
"args": [
"-y",
"claude-code"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
> This is Anthropic's real Claude Code CLI source, extracted via an npm source map leak on March 31, 2026. > Discovered by @Fried_rice (Chaofan Shou). > Analysis by Muhammad Hanan Asghar.
> Static analysis only — the code cannot be compiled or run as-is.
---
| Evidence | Details | |----------|---------| | OAuth Client IDs | Hardcoded UUID: 9d1c250a-e61b-44d9-88ed-5944d1962f5e (prod) | | API Endpoints | api.anthropic.com, platform.claude.com/v1/oauth/token | | Internal Domains | .ant.dev (Anthropic-only infra), artifactory.infra.ant.dev | | Slack Channels | Multiple anthropic.slack.com/archives/C0xxxxx references | | SDK | Uses @anthropic-ai/sdk with proper client initialization |
1,679 of 1,884 .ts files use .js extensions in imports — the unmistakable fingerprint of source-map reconstruction. Normal TypeScript repos don't do this.
// Example from the extracted code:
import { getOauthConfig } from '../constants/oauth.js' // .js in .ts = source map extraction| Feature | Present | |---------|---------| | Tools (Read, Write, Edit, Bash, Grep, Glob, Agent) | ✅ 45 tools | | Slash commands (/commit, /compact, /config, etc.) | ✅ 103+ commands | | MCP server integration | ✅ | | Remote sessions (bridge / CCR) | ✅ | | Voice mode | ✅ | | Vim mode | ✅ | | Plan mode | ✅ | | Worktree isolation | ✅ | | Agent SDK | ✅ |
| Metric | Value | |--------|-------| | Total files | 1,902 | | Lines of TypeScript | 512,685 | | Built-in tools | 45 | | Slash commands | 103+ | | MCP transport types | 6 | | Internal feature flags | PROACTIVE, KAIROS, BRIDGE_MODE, DAEMON, VOICE_MODE | | Missing (expected) | package.json, tsconfig.json, build config — not stored in source maps |
---
| Documen
Loading reviews...