Add a minimal runtime MCP client bootstrap layer that turns typed MCP configs into concrete transport targets with normalized names, tool prefixes, signatures, and auth requirements. This is intentionally scaffolding rather than a live connection manager: it creates the real data model the runtime will need to launch stdio, remote, websocket, sdk, and claude.ai proxy clients without prematurely coupling the code to any specific async transport implementation. Constraint: Keep the slice real and minimal without adding connection lifecycle complexity yet Constraint: Runtime verification must stay green under fmt, clippy, and tests Rejected: Implement live connection/session orchestration in the same commit | too much surface area for a clean foundational slice Rejected: Leave bootstrap shaping implicit in future transport code | would duplicate transport mapping and weaken testability Confidence: high Scope-risk: narrow Reversibility: clean Directive: Build future MCP launch/execution code by consuming McpClientBootstrap/McpClientTransport rather than re-parsing config enums ad hoc Tested: cargo fmt --all; cargo clippy -p runtime --all-targets -- -D warnings; cargo test -p runtime Not-tested: live MCP server processes; remote stream handshakes; tool/resource enumeration against real servers
Rust port foundation
This directory contains the first compatibility-first Rust foundation for a drop-in Claude Code CLI replacement.
Current milestone
This initial milestone focuses on harness-first scaffolding, not full feature parity:
- a Cargo workspace aligned to major upstream seams
- a placeholder CLI crate (
rusty-claude-cli) - runtime, command, and tool registry skeleton crates
- a
compat-harnesscrate that reads the upstream TypeScript sources in../src/ - tests that prove upstream manifests/bootstrap hints can be extracted from the leaked TypeScript codebase
Workspace layout
rust/
├── Cargo.toml
├── README.md
├── crates/
│ ├── rusty-claude-cli/
│ ├── runtime/
│ ├── commands/
│ ├── tools/
│ └── compat-harness/
└── tests/
How to use
From this directory:
cargo fmt --all
cargo check --workspace
cargo test --workspace
cargo run -p rusty-claude-cli -- --help
cargo run -p rusty-claude-cli -- dump-manifests
cargo run -p rusty-claude-cli -- bootstrap-plan
Design notes
The shape follows the PRD's harness-first recommendation:
- Extract observable upstream command/tool/bootstrap facts first.
- Keep Rust module boundaries recognizable.
- Grow runtime compatibility behind proof artifacts.
- Document explicit gaps instead of implying drop-in parity too early.
Relationship to the root README
The repository root README explains the leaked TypeScript codebase. This document tracks the Rust replacement effort that lives in rust/.