Expand description
§MCP Transport Layer
This module implements the transport layer for the Model Context Protocol (MCP). It provides abstractions for sending and receiving JSON-RPC messages between clients and servers using different transport mechanisms.
The transport layer:
- Handles serialization and deserialization of messages
- Provides interfaces for sending and receiving messages
- Defines transport-specific implementations (SSE, stdio)
- Abstracts the underlying communication protocol
The core component is the Transport
trait, which defines the operations that
any MCP transport must support, regardless of the underlying mechanism.
Structs§
- Client
Stdio Transport - Client transport that communicates with an MCP server over standard I/O.
- Json
RpcError - Represents a JSON-RPC error.
- Json
RpcNotification - Represents a JSON-RPC notification.
- Json
RpcRequest - Represents a JSON-RPC request.
- Json
RpcResponse - Represents a JSON-RPC response.
- Json
RpcVersion - Represents a JSON-RPC protocol version.
- Server
Stdio Transport - Server transport that communicates with MCP clients over standard I/O.
Enums§
- Json
RpcMessage - Represents a JSON-RPC message.
Traits§
- Transport
- Core trait that defines operations for MCP transports.