Expand description
JSON-RPC 2.0 message types used by MCP.
Re-exportsยง
use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use serde_json::Value;๐
Structsยง
- Json
RpcRequest - A JSON-RPC request from the
claudebinary. - Json
RpcResponse - A JSON-RPC response from the MCP server back to the
claudebinary. Outbound only - we construct these, never parse them. - McpError
- Standard MCP error body.
- Server
Info - Server metadata in
initializeresponse. - Tool
Description - A tool as described in the
tools/listresponse.
Enumsยง
- Json
RpcResult - Typed successful-response payload. Outbound only, like its envelope: a
Deserializehere would make the fieldlessEmptymatch any object, so every unrecognised result would parse successfully rather than erroring.
Constantsยง
- LATEST_
PROTOCOL_ VERSION - Answered when the client asks for a revision we do not speak.
- SUPPORTED_
PROTOCOL_ VERSIONS - MCP protocol revisions this server speaks, newest first.