mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-03 05:31:51 +08:00
Enable stdio MCP tool and resource method calls
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
This commit is contained in:
@@ -47,7 +47,9 @@ pub use mcp_client::{
|
||||
pub use mcp_stdio::{
|
||||
spawn_mcp_stdio_process, JsonRpcError, JsonRpcId, JsonRpcRequest, JsonRpcResponse,
|
||||
McpInitializeClientInfo, McpInitializeParams, McpInitializeResult, McpInitializeServerInfo,
|
||||
McpStdioProcess,
|
||||
McpListResourcesParams, McpListResourcesResult, McpListToolsParams, McpListToolsResult,
|
||||
McpReadResourceParams, McpReadResourceResult, McpResource, McpResourceContents,
|
||||
McpStdioProcess, McpTool, McpToolCallContent, McpToolCallParams, McpToolCallResult,
|
||||
};
|
||||
pub use oauth::{
|
||||
code_challenge_s256, generate_pkce_pair, generate_state, loopback_redirect_uri,
|
||||
|
||||
Reference in New Issue
Block a user