Reverse-engineered Claude Code SDK released in four languages

A developer has reverse-engineered Claude Code and rebuilt the entire SDK as single-file implementations in four programming languages. The project was created to use Claude Code's capabilities without depending on the 190MB Bun bundle or npm packages.
What was discovered
The subscription authentication protocol requires four components simultaneously:
- An OAuth token from macOS keychain
- Specific beta headers
- A billing header hidden inside the system prompt
- A browser access header
None of this authentication process is publicly documented.
Available SDKs
Node.js (claude-native.mjs)— 0 dependenciesPython (claude-native.py)— 0 dependenciesGo (claude-native.go)— 0 dependenciesRust (rust-sdk/)— uses serde + reqwest
Features included
- OAuth or API key authentication
- Full agent loop with streaming and tool use
- Built-in tools (bash, read, write, glob, grep)
- NDJSON bridge for automation (spawn as subprocess, JSON on stdin/stdout)
- Interactive REPL
- MCP server support
Usage example
The Python version can be used with:
cp claude-native.py your-project/
python3 claude-native.py -p "explain this code"
The project is MIT licensed and accepts feedback and pull requests. This type of reverse-engineering work is useful for developers who want to integrate Claude Code's capabilities into their own projects without the overhead of large dependencies.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Claude IDE Bridge: Open-source tool gives Claude AI direct access to your code editor
Claude IDE Bridge is an open-source, MIT-licensed tool that connects Claude AI directly to your code editor, allowing it to view open files, unsaved changes, and errors live rather than through pasted code snippets. The tool currently works with VS Code and Windsurf.

mcp-optimizer reduces token waste from idle MCP servers in Claude Code
mcp-optimizer is a plugin that addresses token waste from MCP servers in Claude Code by analyzing tool usage and generating optimized configurations. It includes four utilities: mcp-doctor for server health checks, mcp-audit for usage analysis, mcp-optimize for creating project-local configs, and mcp-to-skills for converting tools to on-demand Skills.

Claude Code skill combines DeepMind Aletheia and Anthropic harness approaches
A Claude Code skill implements a Planner→Generator→Evaluator→Reviser pipeline that synthesizes DeepMind's Aletheia math research agent with Anthropic's multi-agent coding architecture, adding blind pre-analysis where the evaluator reasons about correct approaches before seeing candidate code.

Claude-Real-Video: Scene-Aware Frame Extraction + Transcript for Any LLM
An open-source tool that extracts scene-aware, deduplicated frames and audio transcripts from videos, enabling any LLM to "watch" a video locally without uploading. Features scene-change detection, sliding-window dedup, and Whisper transcription.