Rust MCP SDK
A high-performance, asynchronous Rust toolkit for building MCP servers and MCP clients - with 100% conformance to the official MCP test suites.
What is MCP?โ
The Model Context Protocol (MCP) is an open standard for connecting LLM applications to tools and data. It is a uniform way for AI applications (like Claude, ChatGPT, or your own agent) to discover and use capabilities you expose.
With MCP you can build:
- Servers that expose tools (functions the LLM can call), resources (data the LLM can read), and prompts (reusable interaction templates)
- Clients that connect to servers, discover their capabilities, and invoke them
rust-mcp-sdk handles the protocol, transports, session management, authentication, and schema generation - you focus on your application logic.
Why rust-mcp-sdk?โ
| โ | 100% MCP Conformance - passes all official server and client conformance tests |
| โ | Latest protocol - MCP spec 2025-11-25 |
| โ | All transports - Stdio, Streamable HTTP, and backward-compatible SSE |
| โ | Framework agnostic - native Axum & Actix-web integrations, plus BYO-server mode |
| โ | Procedural macros - mcp_tool, tool_box!, mcp_elicit generate schemas from your structs |
| โ | OAuth 2.1 - server and client auth with DCR, PKCE, token refresh, and ready-made providers |
| โ | Production ready - DNS rebinding protection, resumability, health checks, tasks, telemetry hooks |
Quick linksโ
๐ฅ Installation
Add the SDK to your project in one command.
๐ Quickstart
Build and run your first MCP server in ~10 minutes.
๐ Tutorials
Scenario-based walkthroughs for real-world goals.
๐ก Examples
Runnable examples for every transport and use case.
Next stepโ
๐ Install the SDK and then follow the Quickstart.