Module protocol

Source
Expand description

§MCP Protocol Implementation

This module implements the core JSON-RPC protocol layer used by the MCP system. It provides the infrastructure for sending and receiving JSON-RPC requests, notifications, and responses between MCP clients and servers.

The protocol layer is transport-agnostic and can work with any transport implementation that conforms to the Transport trait.

Key components include:

  • Protocol: The main protocol handler
  • ProtocolBuilder: A builder for configuring protocols
  • Request and notification handlers
  • Timeout and error handling

Structs§

Protocol
The core protocol handler for MCP.
ProtocolBuilder
Builder for creating configured protocols.
RequestOptions
Options for customizing requests.

Constants§

DEFAULT_REQUEST_TIMEOUT_MSEC
The default request timeout, in milliseconds