Reverse-engineered Claude Code SDK released in four languages

✍️ OpenClawRadar📅 Published: March 24, 2026🔗 Source
Reverse-engineered Claude Code SDK released in four languages
Ad

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 dependencies
  • Python (claude-native.py) — 0 dependencies
  • Go (claude-native.go) — 0 dependencies
  • Rust (rust-sdk/) — uses serde + reqwest
Ad

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

Ad

👀 See Also