rust-mcp-sdk
Verified Safeby rust-mcp-stack
Overview
A high-performance, asynchronous Rust SDK for building Model Context Protocol (MCP) servers and clients, supporting various transports and authentication methods.
Installation
cargo run --example hello-world-server-streamable-httpEnvironment Variables
- AUTH_SERVER
- CLIENT_ID
- CLIENT_SECRET
- ENVIRONMENT_URL
- RESOURCE_ID
- RUST_LOG
Security Notes
The SDK provides robust security features including OAuth 2.0/OpenID Connect authentication (JWKS, introspection, UserInfo), DNS rebinding protection, and TLS/SSL support. It leverages standard Rust security practices and async primitives. A potential risk lies in the `StdioTransport::create_with_server_launch` function, which executes arbitrary commands and arguments. While this is a core feature for launching external MCP servers, users of the SDK must ensure that any external input used to construct these commands/arguments is thoroughly sanitized to prevent command injection vulnerabilities. No obvious hardcoded secrets or malicious patterns were found in the provided source code snippets.
Similar Servers
rust-mcp-schema
Provides a type-safe Rust implementation of the Model Context Protocol (MCP) schema, enabling developers to build robust MCP servers and clients.
mcp-framework
A Rust framework for building AI agents with built-in Model Context Protocol (MCP) support, multi-LLM integration, and a web-based inspector for debugging.
rust-mcp-server
Acts as a bridge for Large Language Models (LLMs) like GitHub Copilot to interact with and perform actions on local Rust development environments, automating tasks like building, testing, and analyzing code.
mcp-swift-sdk
Implement and integrate Model Context Protocol (MCP) servers and clients in Swift, enabling AI agents and applications to discover and interact with tools, resources, and conversational prompts over HTTP.