Skip to main content
Version: 1.1.0 (latest)

Installation

To use rust-mcp-sdk in your Rust project, add it to your Cargo.toml:

[dependencies]
rust-mcp-sdk = "1.0"

Minimum Rust version: 1.80+

Feature Flagsโ€‹

All features are enabled by default. You can customize which features to include:

FeatureDescription
serverMCP server capabilities
clientMCP client capabilities
macrosProcedural macros (mcp_tool, mcp_resource, mcp_prompt, tool_box!, etc.)
sseServer-Sent Events transport
streamable-httpStreamable HTTP transport
stdioStandard I/O transport
authOAuth authentication support

The HTTP backend crates add TLS features of their own: rust-mcp-axum has ssl and tls-no-provider, rust-mcp-actix has ssl.

Minimal Installationsโ€‹

Server only:

[dependencies]
rust-mcp-sdk = { version = "1.0", default-features = false, features = ["server", "macros", "stdio"] }

Client only:

[dependencies]
rust-mcp-sdk = { version = "1.0", default-features = false, features = ["client", "stdio"] }

For Streamable HTTP transport, add the HTTP backend crate:

[dependencies]
rust-mcp-axum = "1.0" # or
rust-mcp-actix = "1.0"