Available on crate feature
client only.Expand description
Stdio Transport for connecting to MCP server processes.
Communicates with MCP servers via standard input/output using JSON-RPC. This is used to connect to MCP servers that run as child processes.
§Architecture
Uses true async I/O with tokio::process for non-blocking communication:
- Separate async tasks for stdin writing and stdout reading
- Pending request tracking with oneshot channels for responses
- No mutex held across I/O operations, enabling concurrent requests
Structs§
- Async
Stdio Transport - Async-friendly stdio transport with timeout support.
- Stdio
Transport Adapter - Adapter that wraps AsyncStdioTransport and implements McpTransport.
- Tokio
Stdio Transport - True async stdio transport using tokio::process.