mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 07:41:52 +08:00
The runtime already framed JSON-RPC initialize traffic over stdio, so this extends the same transport with typed helpers for tools/list, tools/call, resources/list, and resources/read plus fake-server tests that exercise real request/response roundtrips. Constraint: Must build on the existing stdio JSON-RPC framing rather than introducing a separate MCP client layer Rejected: Leave method payloads as untyped serde_json::Value blobs | weakens call sites and test assertions Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep new MCP stdio methods aligned with upstream MCP camelCase field names when adding more request/response types Tested: cargo fmt --manifest-path rust/Cargo.toml --all; cargo clippy --manifest-path rust/Cargo.toml -p runtime --all-targets -- -D warnings; cargo test --manifest-path rust/Cargo.toml -p runtime Not-tested: Live integration against external MCP servers