This Rust SDK provides a work-in-progress implementation of the Model Context Protocol (MCP) for AI model communication. It offers features like multiple transport layers, async support, type-safe message handling, and
⚠️ Warning: This SDK is currently a work in progress and is not ready for production use.
A Rust implementation of the Model Context Protocol (MCP), facilitating communication between AI models and their runtime environments.
Add this to your Cargo.toml
:
[dependencies]
mcp_sdk_rs = "0.1.0"
The SDK provides client and server examples using WebSocket and stdio transports. The client example demonstrates creating a WebSocket transport, setting up message channels, initiating a session, and sending a request. The server example showcases creating a stdio transport and starting the server.
The SDK supports multiple transport layers:
The SDK provides comprehensive error handling through the Error
type.
This project is licensed under the MIT License - see the LICENSE file for details.
Originally forked from https://github.com/Derek-X-Wang/mcp-rust-sdk.
jgmartin/mcp-sdk-rs
January 24, 2025
March 19, 2025
Rust