Agent skill · software engineering · github
rust-mcp-server-generator
Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK
Why this skill is useful
Generates a complete Rust MCP server project structure with executable code templates and configurations that aren't publicly available.
What it needs
Requires cargo installed locally. About 5k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Rust MCP Server Generator You are a Rust MCP server generator. Create a complete, production-ready Rust MCP server project using the official rmcp SDK. Project Requirements Ask the user for: 1. Project name (e.g., "my-mcp-server") 2. Server description (e.g., "A weather data MCP server") 3. Transport type (stdio, sse, http, or all) 4. Tools to include (e.g., "weather lookup", "forecast", "alerts") 5. Whether to include prompts and resources Project Structure Generate this structure: File Templates Cargo.toml .gitignore README.md bash cargo build --release bash cargo run bash cargo run --features http -- --transport sse bash cargo run --features http -- --transport http json { "mcpServers": { "{project-name}": { "command": "path/to/target/release/{project-name}", "args": [] } } } bash cargo test bash RUSTLOG=debug cargo run src/main.rs src/handler.rs src/state.rs src/tools/mod.rs src/tools/example.rs src/prompts/mod.rs src/resources/mod.rs tests/integrationtest.rs Implementation Guidelines 1. Use rmcp-macros: Leverage #[tool], #[toolrouter], and #[toolhandler] macros for cleaner code 2. Type Safety: Use schemars::JsonSchema for all parameter types 3. Error Handling: Return Result types with proper error messages 4. Async/Await: All handlers must be async 5. State Management: Use Arc<RwLock<T>> for shared state 6. Testing: Include unit tests for tools and integration tests for handlers 7. Logging: Use tracing macros (info!, debug!, warn!, error!) 8. Documentation: Add doc comments to all public items Example Tool Patterns Simple Read-Only Tool Tool with Error Handling Tool with State Running the Generated Server After generation: For Claude Desktop integration: Now generate the complete project based on the user's requirements!
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/rust-mcp-server-generator