Skip to main content

Module protocol

Module protocol 

Source
Expand description

JSON-RPC 2.0 Protocol Handler for Model Context Protocol (MCP).

Complies with MCP specification (protocol version “2024-11-05”). Strictly adheres to JSON-RPC 2.0 notification rules: notifications (requests without id) NEVER receive a response, preventing client socket closure. Follows AGENTS.md §0-B (<500 lines).

Constants§

MCP_PROTOCOL_VERSION

Functions§

process_jsonrpc_message
Handle a single incoming JSON-RPC 2.0 line. Returns Some(response_json) if the request requires a response, or None if it was a notification.