rust-mcp-server-generator

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

1|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/matrixNeo76/rustcopy --skill rust-mcp-server-generator-matrixneo76
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-mcp-server-generator
Source: https://github.com/matrixNeo76/rustcopy/tree/main/.agents/skills/rust-mcp-server-generator
Command: npx skills add https://github.com/matrixNeo76/rustcopy --skill rust-mcp-server-generator-matrixneo76

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Model Context Protocol server in Rust from scratch requires wiring up transports, tool routers, prompt handlers, resource handlers, and tests against the rmcp SDK, which involves significant boilerplate and API knowledge. This Skill scaffolds the entire project structure with working code templates so you start from a compiling, testable server instead of a blank directory. ## Core Features & Use Cases - Full Project Scaffolding: Generates Cargo.toml, main.rs, handler.rs, state.rs, and modular tools, prompts, and resources directories following rmcp SDK conventions. - Multiple Transport Support: Templates cover stdio, SSE, and HTTP transports with optional axum and tower-http dependencies behind a feature flag. - Built-in Testing Patterns: Includes unit tests for tools and integration tests for listing tools, calling tools, and listing prompts and resources. - Use Case: You want to expose a weather API to Claude Desktop as MCP tools. Provide the project name, transport type, and tool list, and receive a complete Rust server with a greet-style tool pattern, JSON Schema parameter validation, and a Claude Desktop configuration snippet. ## 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 and JsonSchema-derived parameter structs, register them through a ToolRouter, implement ServerHandler for prompts and resources, and serve over stdio, SSE, or HTTP transport.

What Rust crate implements the Model Context Protocol?▼

The official rmcp crate implements the Model Context Protocol in Rust, paired with rmcp-macros for tool routing attributes. It supports server capabilities for tools, prompts, and resources, with optional axum-based HTTP transports behind a feature flag.

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

Build the release binary with cargo build --release, then add an entry to the mcpServers section of the Claude Desktop config pointing the command field at the compiled binary path. Stdio transport requires no additional arguments.

Does the rmcp SDK support HTTP and SSE transports?▼

Yes, rmcp supports SSE and HTTP transports in addition to stdio. Enable them with the http feature, which pulls in axum and tower-http for the web server and CORS handling, then select the transport via a command-line flag.

How do I test MCP tools in Rust?▼

Write unit tests inside each tool module using tokio::test, calling the execute function with constructed Parameters. For integration tests, instantiate the handler directly and call list_tools, call_tool, list_prompts, and list_resources with a default RequestContext.