rust-mcp-sdk
Verified Safeby rust-mcp-stack
Overview
A high-performance, asynchronous Rust SDK for building Model Context Protocol (MCP) servers and clients, simplifying protocol handling, enabling tool-based interactions, and supporting multiple transports and authentication methods.
Installation
cargo run -p hello-world-server-streamable-http --releaseEnvironment Variables
- OAUTH_CLIENT_ID
- OAUTH_CLIENT_SECRET
- ENVIRONMENT_URL
- RESOURCE_ID
Security Notes
The SDK is built in Rust, offering strong type safety and memory safety guarantees. It explicitly includes features for DNS rebinding protection, SSL/TLS, and OAuth authentication for servers, using best practices like dynamic client registration and robust token verification (JWKS, introspection). Client credentials for OAuth are read from environment variables in examples. However, the project is explicitly marked as "under development," suggesting potential for undiscovered vulnerabilities. Proper configuration of SSL certificates, allowed hosts/origins, and strong OAuth providers is critical for secure deployment. The `OAuthProxy` for non-DCR providers is noted as "still in development" and should be avoided for now.
Similar Servers
tmcp
Build Model Context Protocol (MCP) servers for AI agents, providing schema-agnostic tools, resources, and prompts, with optional OAuth 2.1 authentication and distributed session management.
rust-mcp-schema
Provides a type-safe Rust implementation of the Model Context Protocol (MCP) schema for building LLM applications and integrating with external data sources and tools. It facilitates serialization and deserialization of MCP messages.
turbomcp
High-performance Rust SDK for building Model Context Protocol (MCP) servers with automatic schema generation and multi-transport support, focusing on LLM integration and developer experience.
mcpc
A framework for building agentic Model Context Protocol (MCP) servers by composing existing MCP tools. It enables the creation of portable, interoperable AI agents with flexible execution modes and robust logging/tracing capabilities.