Awesome MCPRust

linux-china/mcp-rs-template

⭐ 82 Rust added to this list on 2025-04-09 repository created 2024-11-30

mcp-rs-template is a starting point for writing an MCP server in Rust as a command line application. Rather than a full SDK, it is a repository to clone and adapt: the reader changes the project metadata in Cargo.toml and src/mcp/mod.rs, then fills in the handler modules for prompts in src/mcp/prompts.rs, resources in src/mcp/resources.rs and tools in src/mcp/tools.rs. Handlers can also be driven from JSON files under src/mcp/templates for cases where the prompt, resource and tool definitions do not need code. Message routing is built on rust-rpc-router, a JSON-RPC routing library for Rust, which handles the dispatch of protocol methods to the handler functions. The resulting binary is a normal CLI: passing --mcp runs it as an MCP server, while --resources, --prompts and --tools print the declared resources, prompts and tools for inspection during development. The README shows how to register the built binary with Claude Desktop by adding an entry to the mcpServers section of claude_desktop_config.json with the command, the --mcp argument and any environment variables such as an API key, and points at the Claude log files under ~/Library/Logs/Claude for debugging a server that fails to start. Reference links cover the MCP specification, the protocol introduction, the rpc-router library and the context server implementation in the Zed editor. The template is aimed at Rust developers who want the protocol plumbing already wired so they can concentrate on the behaviour of their own tools and resources, and at people learning how an MCP server is structured in Rust before committing to a larger framework.

https://github.com/linux-china/mcp-rs-template

mcprusttemplatejson-rpcrpc-routercliboilerplateserver

Also in Rust

modelcontextprotocol/rust-sdk

The official Rust SDK for the Model Context Protocol providing asynchronous client and server implementations with Tokio runtime and support for various transport layers.

Epistates/turbomcp

A Rust SDK implementing both halves of MCP, server and client, with a macro-driven API, strict specification compliance and a passing official conformance suite.

EmilLindfors/a2a-rs

A Rust implementation of the Agent2Agent protocol built on hexagonal architecture, including a crate providing a bidirectional bridge between A2A and MCP.