M
modelcontextprotocol/rust-sdk
The official Rust SDK for the Model Context Protocol
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
Client config (built from the install command this repo gives)
{
"mcpServers": {
"modelcontextprotocol-rust-sdk": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Parsed from the README we fetched on 2026-11-05; we have not executed it.
command/args come from the install command the repository states. When it is ambiguous, the project README wins.
VS Code (.vscode/mcp.json - the key is servers)
{
"servers": {
"modelcontextprotocol-rust-sdk": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Same server, but VS Code keeps it under <code>servers</code>.
Claude Code (command line)
claude mcp add --transport stdio modelcontextprotocol-rust-sdk -- npx @modelcontextprotocol/inspector
Claude Code does not read a config file; add the server with this command.
Key names differ by client: Clients & CLI
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
- Install
npx @modelcontextprotocol/inspector
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
npx @modelcontextprotocol/inspector. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# RMCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An official Rust Model Context Protocol SDK implementation with tokio async runtime.
> Migrating to 3.x? See the migration guide for breaking changes and upgrade instructions.
This repository contains the following crates:
rmcp: The core crate providing the RMCP protocol implementation - see rmcp
rmcp-macros: A procedural macro crate for generating RMCP tool implementations - see rmcp-macros
This SDK implements the stable MCP 2026-07-28 specification while
remaining fully compatible with the 2025-11-25 release and earlier
versions. Features introduced in 2026-07-28 — server discovery & negotiation,
transport-neutral subscriptions, long-running tasks, response caching,
multi-round-trip requests, and standard HTTP routing headers — are documented
below. For the full MCP specification, see
modelcontextprotocol.io.
## Table of Contents
Usage
Tools
Resources
Prompts
Sampling
Elicitation
Roots
Logging
Completions
Notifications
Subscriptions
Multi-Round-Trip Requests
Tasks
Caching
Standard HTTP Headers
Stateless Streamable HTTP
Transports
Pagination
Capability & Protocol Version Negotiation
JSON Schema 2020-12
Examples
OAuth Support
Related Resources
Related Projects
Development
## Usage
### Import the crate
Add the latest published version with cargo:
sh
cargo add rmcp --features server
Or use the dev channel:
sh
cargo add rmcp --features server --git https://github.com/modelcontextprotocol/rust-sdk --branch main
### Third Dependencies
Basic dependencies:
tokio
serde
Json Schema generation (version 2020-12):
schemars
### Build a Client
Start a client
rust, ignore
use rmcp::{ServiceExt, transport::{TokioChildProcess, ConfigureCommandExt}};
use tokio::process::Command;
#[tokio::main]
async fn main() -> Result > {
let client = ().serve(TokioChildProcess::new(Command::new("npx").configure(|cmd| {
cmd.arg("-y").arg("@modelcontextprotocol/server-everything");
}))?).await?;
Ok(())
### Client lifecycle modes
serve() uses the legacy MCP lifecycle: the client sends initialize, receives
the negotiated server information, and then sends notifications/initialized.
Use ClientServiceExt::servewithlifecycle to
select another lifecycle explicitly:
rust, ignore
use rmcp::{ClientLifecycleMode, ClientServiceExt, ProtocolVersion, model::ClientConfig};
// Start directly with server/discover and include client metadata on every request.
let client = ClientConfig::default()
.servewithlifecycle(
transport,
ClientLifecycleMode::Discover {
preferredversions: vec![ProtocolVersion::V20260728],
},
.await?;
// Or probe the discover lifecycle and fall back when a legacy server reports
// that server/discover is not implemented or does not respond within 10 seconds.
let client = ClientConfig::default()
.servewithlifecycle(
transport,
ClientLifecycleMode::Auto {
preferredversions: vec![ProtocolVersion::V20260728],
legacyversion: Some(ProtocolVersion::V20251125),
},
.await?;
ClientLifecycleMode::Initialize is equivalent to the existing serve() behavior.
Discover startup does not send notifications/initialized; discovery completes
startup, and each subsequent request carries its protocol version, client
information, and capabilities in meta.
### Build a Server
Build a transport
rust, ignore
use tokio::io::{stdin, stdout};
> Migrating to 3.x? See the migration guide for breaking changes and upgrade instructions.
This repository contains the following crates:
rmcp: The core crate providing the RMCP protocol implementation - see rmcp
rmcp-macros: A procedural macro crate for generating RMCP tool implementations - see rmcp-macros
This SDK implements the stable MCP 2026-07-28 specification while
remaining fully compatible with the 2025-11-25 release and earlier
versions. Features introduced in 2026-07-28 — server discovery & negotiation,
transport-neutral subscriptions, long-running tasks, response caching,
multi-round-trip requests, and standard HTTP routing headers — are documented
below. For the full MCP specification, see
modelcontextprotocol.io.
## Table of Contents
Usage
Tools
Resources
Prompts
Sampling
Elicitation
Roots
Logging
Completions
Notifications
Subscriptions
Multi-Round-Trip Requests
Tasks
Caching
Standard HTTP Headers
Stateless Streamable HTTP
Transports
Pagination
Capability & Protocol Version Negotiation
JSON Schema 2020-12
Examples
OAuth Support
Related Resources
Related Projects
Development
## Usage
### Import the crate
Add the latest published version with cargo:
sh
cargo add rmcp --features server
Or use the dev channel:
sh
cargo add rmcp --features server --git https://github.com/modelcontextprotocol/rust-sdk --branch main
### Third Dependencies
Basic dependencies:
tokio
serde
Json Schema generation (version 2020-12):
schemars
### Build a Client
Start a client
rust, ignore
use rmcp::{ServiceExt, transport::{TokioChildProcess, ConfigureCommandExt}};
use tokio::process::Command;
#[tokio::main]
async fn main() -> Result > {
let client = ().serve(TokioChildProcess::new(Command::new("npx").configure(|cmd| {
cmd.arg("-y").arg("@modelcontextprotocol/server-everything");
}))?).await?;
Ok(())
### Client lifecycle modes
serve() uses the legacy MCP lifecycle: the client sends initialize, receives
the negotiated server information, and then sends notifications/initialized.
Use ClientServiceExt::servewithlifecycle to
select another lifecycle explicitly:
rust, ignore
use rmcp::{ClientLifecycleMode, ClientServiceExt, ProtocolVersion, model::ClientConfig};
// Start directly with server/discover and include client metadata on every request.
let client = ClientConfig::default()
.servewithlifecycle(
transport,
ClientLifecycleMode::Discover {
preferredversions: vec![ProtocolVersion::V20260728],
},
.await?;
// Or probe the discover lifecycle and fall back when a legacy server reports
// that server/discover is not implemented or does not respond within 10 seconds.
let client = ClientConfig::default()
.servewithlifecycle(
transport,
ClientLifecycleMode::Auto {
preferredversions: vec![ProtocolVersion::V20260728],
legacyversion: Some(ProtocolVersion::V20251125),
},
.await?;
ClientLifecycleMode::Initialize is equivalent to the existing serve() behavior.
Discover startup does not send notifications/initialized; discovery completes
startup, and each subsequent request carries its protocol version, client
information, and capabilities in meta.
### Build a Server
Build a transport
rust, ignore
use tokio::io::{stdin, stdout};
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/modelcontextprotocol-rust-sdk/)
- Source
- awesome · https://github.com/modelcontextprotocol/rust-sdk
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.