Modules§
Structs§
- Json
RpcError - Json
RpcNotification - Json
RpcRequest - Json
RpcResponse - Parsed
Body - Result of parsing a POST body as JSON-RPC 2.0.
Enums§
- Json
RpcId - A parsed JSON-RPC 2.0 id (number or string).
- Json
RpcMessage - A classified JSON-RPC 2.0 message.
- McpMethod
- Known MCP methods — lets the proxy know exactly what function is being called.
Constants§
- COMPLETION_
COMPLETE - INITIALIZE
- INITIALIZED
- LOGGING_
SET_ LEVEL - PING
- PROMPTS_
GET - PROMPTS_
LIST - RESOURCES_
LIST - RESOURCES_
READ - RESOURCES_
SUBSCRIBE - RESOURCES_
UNSUBSCRIBE - TOOLS_
CALL - TOOLS_
LIST
Functions§
- error_
response - Build a JSON-RPC 2.0 error response as bytes.
idcan be a request id orValue::Nullif the request id couldn’t be parsed. - extract_
error_ code - Extract the JSON-RPC error code from a response body (if it’s an error response).
- parse_
body - Parse a POST body as JSON-RPC 2.0 — single message or batch.
Returns
Noneif the body is not valid JSON-RPC 2.0. - parse_
message - Parse a single JSON value as a JSON-RPC 2.0 message.
Returns
Noneif it doesn’t have"jsonrpc": "2.0".