rust-mcp-server-generator

Generate a complete Rust MCP server project with tools, prompts, resources, and tests using the rmcp SDK.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill rust-mcp-server-generator-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-mcp-server-generator
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/core/rust-mcp-server-generator
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill rust-mcp-server-generator-miyake-san

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Model Context Protocol server in Rust from scratch requires wiring up transports, handlers, tool routers, state management, and tests, which involves significant boilerplate and familiarity with the rmcp SDK. This Skill scaffolds the entire project structure so you can focus on implementing your actual tool logic. ## Core Features & Use Cases - Full Project Scaffolding: Generates Cargo.toml, source modules (handler, state, tools, prompts, resources), .gitignore, README, and integration tests. - rmcp SDK Patterns: Uses rmcp-macros attributes like #[tool], #[tool_router], and #[tool_handler] with schemars-based parameter schemas and async handlers. - Transport and Client Configuration: Supports stdio, SSE, and HTTP transports and includes a Claude Desktop mcpServers configuration snippet. - Use Case: You want to expose a weather lookup API as MCP tools for Claude Desktop. Provide the project name, transport type, and tool list, and receive a compilable Rust project with example tools, prompts, resources, and tests ready to extend. ## Quick Start Ask the assistant to generate a Rust MCP server project named weather-mcp with stdio transport and tools for weather lookup, forecast, and alerts.

Frequently Asked Questions about rust-mcp-server-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an MCP server in Rust?

Use the rmcp SDK with tokio to build an async server. Define tools with the #[tool] macro, register them through #[tool_router] and #[tool_handler], implement the ServerHandler trait, and serve over a stdio, SSE, or HTTP transport.

How do I add tools to a Rust rmcp server?

Define a parameter struct deriving Deserialize and JsonSchema from schemars, then annotate an async function with #[tool] inside a #[tool_router] impl block. Return Result types for error handling and the router exposes the tool automatically.

Does the rmcp SDK support HTTP and SSE transports?

Yes, the generated project supports stdio by default and optional SSE and HTTP transports behind an http cargo feature using axum and tower-http. Enable it with cargo run --features http and select the transport via a command-line flag.

How do I connect a Rust MCP server to Claude Desktop?

Add an entry to the mcpServers section of the Claude Desktop configuration pointing the command to your compiled release binary. Build with cargo build --release first, then reference the binary path with an empty args array for stdio transport.

How do I manage shared state in an rmcp server?

Store shared state in a struct using Arc<RwLock<T>> from tokio and clone it into your handler. Access it inside tool functions to read or mutate values across requests, as shown in the counter example.