async-mcp-0.0.1 has been yanked.
Async MCP
A minimalistic async Rust implementation of the Model Context Protocol (MCP). This library extends the synchronous implementation from mcp-sdk to support async operations and implements additional transports. Due to significant code changes, it is released as a separate crate.
Note: This project is still early in development.
Overview
This is an implementation of the Model Context Protocol defined by Anthropic.
Features
Supported Transports
- Server-Sent Events (SSE)
- Standard IO (Stdio)
- In-Memory Channel
Usage Examples
Server Implementation
Using Stdio Transport
let server = builder
.capabilities
.request_handler
.request_handler
.request_handler
.build;
Using SSE Transport
run_sse_server
.await?;
Client Implementation
Setting up Transport
// Stdio Transport
let transport = new?;
// In-Memory Transport
let transport = new;
// SSE Transport
let transport = new;
Making Requests
// Initialize transport
transport.open.await?;
// Create and start client
let client = new.build;
let client_clone = client.clone;
let _client_handle = spawn;
// Make a request
client
.request
.await?
Complete Examples
For full working examples, check out:
Related SDKs
Official
Community
For the complete feature set, please refer to the MCP specification.
Implementation Status
Core Protocol Features
- Basic Message Types
- Error and Signal Handling
- Transport Layer
- Stdio
- In-Memory Channel
- SSE
Server Features
- Tools Support
- Prompts
- Resources
- Pagination
- Completion
Client Features
Compatible with Claude Desktop:
- Stdio Support
- In-Memory Channel
- SSE Support
Monitoring
- Logging
- Metrics
Utilities
- Ping
- Cancellation
- Progress Tracking