Module json_rpc

Module json_rpc 

Source
Expand description

JSON-RPC implementation for MCP communication.

This module provides types and utilities for JSON-RPC 2.0 communication with MCP servers. It includes structures for requests, responses, notifications, and error handling, along with helper methods for creating common MCP request types.

The implementation follows the JSON-RPC 2.0 specification and adapts it specifically for the Model Context Protocol’s requirements.

Modules§

error_codes
Standard JSON-RPC error codes as defined in the JSON-RPC 2.0 specification and the Model Context Protocol (MCP) documentation

Structs§

JsonRpcError
A JSON-RPC error
JsonRpcNotification
A JSON-RPC notification (request without ID)
JsonRpcRequest
A JSON-RPC request
JsonRpcResponse
A JSON-RPC response

Enums§

JsonRpcMessage
A JSON-RPC message

Constants§

JSON_RPC_VERSION
JSON-RPC protocol version