rust-mcp-transport.
rust-mcp-transport
is a part of the rust-mcp-sdk ecosystem, offering transport implementations for the MCP (Model Context Protocol). It enables asynchronous data exchange and efficient MCP message handling between MCP Clients and Servers.
Usage Example
For MCP Server
use ;
// create a stdio transport to be used in a MCP Server
let transport = new?;
Refer to the Hello World MCP Server example for a complete demonstration.
For MCP Client
use ;
// create a stdio transport that launches `server-everything` MCP Server
let transport = create_with_server_launch?;
With environment variables:
use ;
// environment variables will be available to the MCP server at launch time
let environment_value = from;
// configure an arbitrary MCP Server to launch with argument and environment variables
let transport = create_with_server_launch?;
Refer to the Simple MCP Client example for a complete demonstration.
Check out rust-mcp-sdk , a high-performance, asynchronous toolkit for building MCP servers and clients. Focus on your app's logic while rust-mcp-sdk takes care of the rest!