{"id":25939026,"url":"https://github.com/modelcontextprotocol/rust-sdk","last_synced_at":"2026-03-04T00:26:53.706Z","repository":{"id":278815043,"uuid":"934753959","full_name":"modelcontextprotocol/rust-sdk","owner":"modelcontextprotocol","description":"The official Rust SDK for the Model Context Protocol","archived":false,"fork":false,"pushed_at":"2025-05-07T07:22:24.000Z","size":209,"stargazers_count":993,"open_issues_count":35,"forks_count":140,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-07T08:29:05.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modelcontextprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-18T10:55:26.000Z","updated_at":"2025-05-07T07:22:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"0599bc95-8196-465e-8854-700783748ba5","html_url":"https://github.com/modelcontextprotocol/rust-sdk","commit_stats":null,"previous_names":["modelcontextprotocol/rust-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelcontextprotocol%2Frust-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelcontextprotocol%2Frust-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelcontextprotocol%2Frust-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelcontextprotocol%2Frust-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelcontextprotocol","download_url":"https://codeload.github.com/modelcontextprotocol/rust-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053178,"owners_count":22006717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-04T04:02:19.885Z","updated_at":"2026-02-27T22:29:39.783Z","avatar_url":"https://github.com/modelcontextprotocol.png","language":"Rust","readme":"\u003cdiv align = \"right\"\u003e\n\u003ca href=\"docs/readme/README.zh-cn.md\"\u003e简体中文\u003c/a\u003e\n\u003c/div\u003e\n\n# RMCP\n[![Crates.io Version](https://img.shields.io/crates/v/rmcp)](https://crates.io/crates/rmcp)\n[![docs.rs](https://img.shields.io/docsrs/rmcp)](https://docs.rs/rmcp/latest/rmcp)\n[![CI](https://github.com/modelcontextprotocol/rust-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/modelcontextprotocol/rust-sdk/actions/workflows/ci.yml)\n[![License](https://img.shields.io/crates/l/rmcp)](LICENSE)\n\nAn official Rust Model Context Protocol SDK implementation with tokio async runtime.\n\nThis repository contains the following crates:\n\n- [rmcp](crates/rmcp): The core crate providing the RMCP protocol implementation - see [rmcp](crates/rmcp/README.md)\n- [rmcp-macros](crates/rmcp-macros): A procedural macro crate for generating RMCP tool implementations - see [rmcp-macros](crates/rmcp-macros/README.md)\n\n## Usage\n\n### Import the crate\n\n```toml\nrmcp = { version = \"0.16.0\", features = [\"server\"] }\n## or dev channel\nrmcp = { git = \"https://github.com/modelcontextprotocol/rust-sdk\", branch = \"main\" }\n```\n### Third Dependencies\n\nBasic dependencies:\n- [tokio](https://github.com/tokio-rs/tokio)\n- [serde](https://github.com/serde-rs/serde)\nJson Schema generation (version 2020-12):\n- [schemars](https://github.com/GREsau/schemars)\n\n### Build a Client\n\n\u003cdetails\u003e\n\u003csummary\u003eStart a client\u003c/summary\u003e\n\n```rust, ignore\nuse rmcp::{ServiceExt, transport::{TokioChildProcess, ConfigureCommandExt}};\nuse tokio::process::Command;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let client = ().serve(TokioChildProcess::new(Command::new(\"npx\").configure(|cmd| {\n        cmd.arg(\"-y\").arg(\"@modelcontextprotocol/server-everything\");\n    }))?).await?;\n    Ok(())\n}\n```\n\u003c/details\u003e\n\n### Build a Server\n\n\u003cdetails\u003e\n\u003csummary\u003eBuild a transport\u003c/summary\u003e\n\n```rust, ignore\nuse tokio::io::{stdin, stdout};\nlet transport = (stdin(), stdout());\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBuild a service\u003c/summary\u003e\n\nYou can easily build a service by using [`ServerHandler`](crates/rmcp/src/handler/server.rs) or [`ClientHandler`](crates/rmcp/src/handler/client.rs).\n\n```rust, ignore\nlet service = common::counter::Counter::new();\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eStart the server\u003c/summary\u003e\n\n```rust, ignore\n// this call will finish the initialization process\nlet server = service.serve(transport).await?;\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInteract with the server\u003c/summary\u003e\n\nOnce the server is initialized, you can send requests or notifications:\n\n```rust, ignore\n// request\nlet roots = server.list_roots().await?;\n\n// or send notification\nserver.notify_cancelled(...).await?;\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWaiting for service shutdown\u003c/summary\u003e\n\n```rust, ignore\nlet quit_reason = server.waiting().await?;\n// or cancel it\nlet quit_reason = server.cancel().await?;\n```\n\u003c/details\u003e\n\n\n## Examples\n\nSee [examples](examples/README.md).\n\n## Feature Documentation\n\nSee [docs/FEATURES.md](docs/FEATURES.md) for detailed documentation on core MCP features: resources, prompts, sampling, roots, logging, completions, notifications, and subscriptions.\n\n## OAuth Support\n\nSee [Oauth_support](docs/OAUTH_SUPPORT.md) for details.\n\n## Related Resources\n\n- [MCP Specification](https://modelcontextprotocol.io/specification/2025-11-25)\n- [Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.ts)\n\n## Related Projects\n\n### Extending `rmcp`\n\n- [rmcp-actix-web](https://gitlab.com/lx-industries/rmcp-actix-web) - An `actix_web` backend for `rmcp`\n- [rmcp-openapi](https://gitlab.com/lx-industries/rmcp-openapi) - Transform OpenAPI definition endpoints into MCP tools\n\n### Built with `rmcp`\n\n- [goose](https://github.com/block/goose) - An open-source, extensible AI agent that goes beyond code suggestions\n- [apollo-mcp-server](https://github.com/apollographql/apollo-mcp-server) - MCP server that connects AI agents to GraphQL APIs via Apollo GraphOS\n- [rustfs-mcp](https://github.com/rustfs/rustfs/tree/main/crates/mcp) - High-performance MCP server providing S3-compatible object storage operations for AI/LLM integration\n- [containerd-mcp-server](https://github.com/jokemanfire/mcp-containerd) - A containerd-based MCP server implementation\n- [rmcp-openapi-server](https://gitlab.com/lx-industries/rmcp-openapi/-/tree/main/crates/rmcp-openapi-server) - High-performance MCP server that exposes OpenAPI definition endpoints as MCP tools\n- [nvim-mcp](https://github.com/linw1995/nvim-mcp) - A MCP server to interact with Neovim\n- [terminator](https://github.com/mediar-ai/terminator) - AI-powered desktop automation MCP server with cross-platform support and \u003e95% success rate\n- [stakpak-agent](https://github.com/stakpak/agent) - Security-hardened terminal agent for DevOps with MCP over mTLS, streaming, secret tokenization, and async task management\n- [video-transcriber-mcp-rs](https://github.com/nhatvu148/video-transcriber-mcp-rs) - High-performance MCP server for transcribing videos from 1000+ platforms using whisper.cpp\n- [NexusCore MCP](https://github.com/sjkim1127/Nexuscore_MCP) - Advanced malware analysis \u0026 dynamic instrumentation MCP server with Frida integration and stealth unpacking capabilities\n- [spreadsheet-mcp](https://github.com/PSU3D0/spreadsheet-mcp) - Token-efficient MCP server for spreadsheet analysis with automatic region detection, recalculation, screenshot, and editing support for LLM agents\n- [hyper-mcp](https://github.com/hyper-mcp-rs/hyper-mcp) - A fast, secure MCP server that extends its capabilities through WebAssembly (WASM) plugins\n- [rudof-mcp](https://github.com/rudof-project/rudof/tree/master/rudof_mcp) - RDF validation and data processing MCP server with ShEx/SHACL validation, SPARQL queries, and format conversion. Supports stdio and streamable HTTP transports with full MCP capabilities (tools, prompts, resources, logging, completions, tasks)\n\n\n## Development\n\n### Tips for Contributors\n\nSee [docs/CONTRIBUTE.MD](docs/CONTRIBUTE.MD) to get some tips for contributing.\n\n### Using Dev Container\n\nIf you want to use dev container, see [docs/DEVCONTAINER.md](docs/DEVCONTAINER.md) for instructions on using Dev Container for development.\n","funding_links":[],"categories":["SDKs","Rust","📚 Projects (1974 total)","Mcp Server Directories \u0026 Lists","Data Science","📦 Other","MCP Frameworks and libraries","MCP Ecosystem"],"sub_categories":["Official","MCP Servers","Machine Learning","Rust","Core \u0026 Frameworks","Codex Resources"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelcontextprotocol%2Frust-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelcontextprotocol%2Frust-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelcontextprotocol%2Frust-sdk/lists"}