MCP Rust SDK — MCP protocol
Official SDK for building MCP servers and clients in Rust
Basic Information
| Program name | MCP Rust SDK (MCP Rust SDK) |
|---|---|
| One-line introduction | Official SDK for building MCP servers and clients in Rust |
| Development / maintenance | Model Context Protocol project |
| Official homepage | https://modelcontextprotocol.io/docs/sdk |
| Official documentation | https://github.com/modelcontextprotocol/rust-sdk-sdk |
| Installation / distribution | cargo add rmcp |
| Runtime environment | Rust 1.75 or higher |
| License | MIT License |
| Stable version | v2026.10 (2026-10-17 GitHub push) — checked 2026-10-18 |
| GitHub repository | https://github.com/modelcontextprotocol/rust-sdk-sdk |
| Classification | MCP protocol (tags: MCP, SDK, Rust, server development, client) |
What is this program?
This is the official SDK for developers who want to build MCP servers in Rust. It provides type-safe abstractions for MCP core primitives (tools, resources, prompts).
This SDK runs on Rust 1.75 or higher and supports both stdio and Streamable HTTP transports. You can add MCP capabilities naturally to an existing Rust codebase.
What problems does it solve?
- ('In a Rust project', 'when you need to implement MCP servers and clients', 'guarantees protocol compliance with official primitives')
- ('Type safety', 'when you need to prevent incorrect protocol usage at compile time', 'catch mistakes early with the type system')
- ('Multiple transports', 'when you need to support both local stdio and remote HTTP', 'choose the transport that fits your deployment environment')
Key Features
Server implementation
Server API for registering tools, resources, and prompts
- Use case: Expose external tools through MCP
- Outcome: Type-safe server definition
- Limitations: Requires protocol learning
Client implementation
Client API for connecting to an MCP server
- Use case: Call servers from an agent
- Outcome: Connect via the standard protocol
- Limitations: Authentication setup required
Transport layer
Built-in stdio and Streamable HTTP transports
- Use case: Support both local and remote
- Outcome: Deploy without changing transports
- Limitations: Requires CORS and authentication for remote
Installation and running
cargo
Install with the Rust package manager.
cargo add rmcp
Real-world usage example
Starting the server
cargo run
Runs the MCP server over stdio.
Advantages and limitations
Advantages
- Official MCP project, ensures protocol compliance
- Idiomatic Rust development patterns
- Supports multiple transports
Points to consider before use
- Requires Rust runtime installation
- Timing for 2026 specification support varies by SDK
Comparison with similar programs
| Program | Characteristics | Suitable when |
|---|---|---|
| Other language SDKs | Implement the same MCP in a different language | Multi-language teams |
| Direct implementation | Parse the protocol directly | Minimal dependencies |
Official resources and further learning
- Official homepage — https://modelcontextprotocol.io/docs/sdk
- Official documentation / knowledge base — https://github.com/modelcontextprotocol/rust-sdk-sdk
- Installation / distribution — cargo add rmcp
- Release notes — https://github.com/modelcontextprotocol/rust-sdk-sdk/releases
- Source / development resources — https://github.com/modelcontextprotocol/rust-sdk-sdk
Version and supported environment information is from the official site as of 2026-10-18. Installation commands may vary depending on your distribution and version, so also check the official installation documentation.
Actual execution screenshot
Synthetic example — not an actual run result. The screen is a synthetic example and not an actual run result.
Actual production server
Source (HTML): https://games.aidebatehub.com/programs/mcp/protocol/rust-sdk.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments