rust-mcp-server-generator
Scaffolds production-ready Rust MCP server projects with tools, prompts, resources, and full test coverage.
Works with
1
total installs
1
this week
28.7K
GitHub stars
0
upvotes
Install Skill
Run in your terminal
1
installs
1
this week
28.7K
stars
What it does
Generates complete project structure with Cargo.toml, handler implementations, and integration tests using the official rmcp SDK
Supports multiple transport types (stdio, SSE, HTTP) with configurable features and async/await patterns throughout
Includes macros for tool definition ( #[tool] , #[tool_router] , #[tool_handler] ) and type-safe parameter handling via schemars::JsonS
Installation Guide
How to use rust-mcp-server-generator on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your machine
- ›Node.js 16+ with npm — verify with
node --version - ›Active project directory where you want to add
rust-mcp-server-generator
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches rust-mcp-server-generator from github/awesome-copilot and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate rust-mcp-server-generator. Access via /rust-mcp-server-generator in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
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:
- Project name (e.g., "my-mcp-server")
- Server description (e.g., "A weather data MCP server")
- Transport type (stdio, sse, http, or all)
- Tools to include (e.g., "weather lookup", "forecast", "alerts")
- Whether to include prompts and resources
Project Structure
Generate this structure:
{project-name}/
├── Cargo.toml
├── .gitignore
├── README.md
├── src/
│ ├── main.rs
│ ├── handler.rs
│ ├── tools/
│ │ ├── mod.rs
│ │ └── {tool_name}.rs
│ ├── prompts/
│ │ ├── mod.rs
│ │ └── {prompt_name}.rs
│ ├── resources/
│ │ ├── mod.rs
│ │ └── {resource_name}.rs
│ └── state.rs
└── tests/
└── integration_test.rs
File Templates
Cargo.toml
[package]
name = "{project-name}"
version = "0.1.0"
edition = "2021"
[dependencies]
rmcp = { version = "0.8.1", features = ["server"] }
rmcp-macros = "0.8"
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = "0.3"
schemars = { version = "0.8", features = ["derive"] }
async-trait = "0.1"
# Optional: for HTTP transports
axum = { version = "0.7", optional = true }
tower-http = { version = "0.5", features = ["cors"], optional = true }
[dev-dependencies]
tokio-test = "0.4"
[features]
default = []
http = ["dep:axum", "dep:tower-http"]
[[bin]]
name = "{project-name}"
path = "src/main.rs"
.gitignore
/target
Cargo.lock
*.swp
*.swo
*~
.DS_Store
README.md
# {Project Name}
{Server description}
## Installation
```bash
cargo build --release
Usage
Stdio Transport
cargo run
SSE Transport
cargo run --features http -- --transport sse
HTTP Transport
cargo run --features http -- --transport http
Configuration
Configure in your MCP client (e.g., Claude Desktop):
{
"mcpServers": {
"{project-name}": {
"command": "path/to/target/release/{project-name}",
"args": []
}
}
}
Tools
- {tool_name}: {Tool description}
Development
Run tests:
cargo test
Run with logging:
RUST_LOG=debug cargo run
### src/main.rs
```rust
use anyhow::Result;
use rmcp::{
protocol::ServerCapabilities,
server::Server,
transport::StdioTransport,
};
use tokio::signal;
use tracing_subscriber;
mod handler;
mod state;
mod tools;
mod prompts;
mod resources;
use handler::McpHandler;
#[tokio::main]
async fn main() -> Result<()> {
// Initialize tracing
tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO)
.with_target(false)
.init();
tracing::info!("Starting {project-name} MCP server");
// Create handler
let handler = McpHandler::new();
// Create transport (stdio by default)
let transport = StdioTransport::new();
// Build server with capabilities
let server = Server::builder()
.with_handler(handler)
.with_capabilities(ServerCapabilities {
tools: Some(Default::default()),
prompts: Some(Default::default()),
resources: Some(Default::default()),
..Default::default()
})
.build(transport)?;
tracing::info!("Server started, waiting for requests");
// Run server until Ctrl+C
server.run(signal::ctrl_c()).await?;
tracing::info!("Server shutting down");
Ok(())
}
src/handler.rs
use rmcp::{
model::*,
protocol::*,
server::{RequestContext, ServerHandler, RoleServer, ToolRouter},
ErrorData,
};
use rmcp::{tool_router, tool_handler};
use async_trait::async_trait;
use crate::state::ServerState;
use crate::tools;
pub struct McpHandler {
state: ServerState,
tool_router: ToolRouter,
}
#[tool_router]
impl McpHandler {
// Include tool definitions from tools module
#[tool(
name = "example_tool",
description = "An example tool",
annotations(read_only_hint = true)
)]
async fn example_tool(params: Parameters<tools::ExampleParams>) -> Result<String, String> {
tools::example::execute(params).await
}
pub fn new() -> Self {
Self {
state: ServerState::new(),
tool_router: Self::tool_router(),
}
}
}
#[tool_handler]
#[async_trait]
impl ServerHandler for McpHandler {
async fn list_prompts(
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Get started →Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
excalidraw-diagram-generator
8github/awesome-copilot
java-springboot
40github/awesome-copilot
premium-frontend-ui
178github/awesome-copilot
dotnet-best-practices
16github/awesome-copilot
polyglot-test-agent
11github/awesome-copilot
typescript-best-practices
96jwynia/agent-skills
Reviews
- JJin Smith★★★★★Dec 24, 2024
Keeps context tight: rust-mcp-server-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.
- MMichael Khan★★★★★Dec 8, 2024
I recommend rust-mcp-server-generator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- AArya Farah★★★★★Dec 4, 2024
rust-mcp-server-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.
- KKabir Martin★★★★★Nov 23, 2024
Solid pick for teams standardizing on skills: rust-mcp-server-generator is focused, and the summary matches what you get after install.
- EEvelyn Harris★★★★★Oct 14, 2024
rust-mcp-server-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- EEvelyn White★★★★★Sep 17, 2024
Registry listing for rust-mcp-server-generator matched our evaluation — installs cleanly and behaves as described in the markdown.
- SSakshi Patil★★★★★Sep 1, 2024
rust-mcp-server-generator reduced setup friction for our internal harness; good balance of opinion and flexibility.
- CChaitanya Patil★★★★★Aug 20, 2024
We added rust-mcp-server-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- KKabir Thompson★★★★★Aug 8, 2024
Useful defaults in rust-mcp-server-generator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- MMichael Haddad★★★★★Jul 27, 2024
We added rust-mcp-server-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 34
Discussion
Comments — not star reviews- No comments yet — start the thread.