| Crates.io | rust-mcp-transport |
| lib.rs | rust-mcp-transport |
| version | 0.6.0 |
| created_at | 2025-03-29 22:53:09.348954+00 |
| updated_at | 2025-09-19 10:30:42.807742+00 |
| description | Transport implementations for the MCP (Model Context Protocol) within the rust-mcp-sdk ecosystem, enabling asynchronous data exchange and efficient message handling between MCP clients and servers. |
| homepage | |
| repository | https://github.com/rust-mcp-stack/rust-mcp-sdk |
| max_upload_size | |
| id | 1611806 |
| size | 259,449 |
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.
use rust_mcp_transport::{StdioTransport, TransportOptions};
// create a stdio transport to be used in a MCP Server
let transport = StdioTransport::new(TransportOptions { timeout: 60_000 })?;
Refer to the Hello World MCP Server example for a complete demonstration.
use rust_mcp_transport::{StdioTransport, TransportOptions};
// create a stdio transport that launches `server-everything` MCP Server
let transport = StdioTransport::create_with_server_launch(
"npx",
vec!["-y".to_string(), "@modelcontextprotocol/server-everything"],
None,
TransportOptions { timeout: 60_000 }
)?;
With environment variables:
use rust_mcp_transport::{StdioTransport, TransportOptions};
// environment variables will be available to the MCP server at launch time
let environment_value = HashMap::from([(
"API_KEY".to_string(),
"A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6".to_string(),
)]);
// configure an arbitrary MCP Server to launch with argument and environment variables
let transport = StdioTransport::create_with_server_launch(
"your-mcp-server",
vec!["argument".to_string()],
Some(environment_value),
TransportOptions::default(),
)?;
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!