Official agent skill

Rust MCP Server Generator

by github in github/awesome-copilot

Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK

OfficialMITAuto-check passedAgent Workflows

Install Rust MCP Server Generator

skills CLI
$ npx skills add github/awesome-copilot --skill rust-mcp-server-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot rust-mcp-server-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rust-mcp-server-generator .claude/skills/rust-mcp-server-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rust-mcp-server-generator
GitHub stars
40k
Used in
1 other repo
Token cost
~3.2k tokens
SKILL.md length
222 words
Files
1
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK

  • Works in 5 steps: Project name (e.g., "my-mcp-server") → Server description (e.g., "A weather… → Transport type (stdio, sse, http, or all) → …
  • Tasks that involve MCP servers
  • SKILL.md covers Project Requirements, Project Structure, File Templates and Usage, plus 6 more sections
  • Calls cargo

What it does

Rust MCP Server Generator is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Rust and Model Context Protocol. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/rust-mcp-server-generator”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rust MCP Server Generator loads about 3.2k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 222 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 222 words, ~3,190 tokens.

Download SKILL.mdSave it as .claude/skills/rust-mcp-server-generator/SKILL.md (or your agent's skills folder).
name
rust-mcp-server-generator
description
Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK

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:

{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
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
gitignore
/target
Cargo.lock
*.swp
*.swo
*~
.DS_Store
README.md
markdown
# {Project Name}

{Server description}

## Installation

```bash
cargo build --release

Usage

Stdio Transport
bash
cargo run
SSE Transport
bash
cargo run --features http -- --transport sse
HTTP Transport
bash
cargo run --features http -- --transport http

Configuration

Configure in your MCP client (e.g., Claude Desktop):

json
{
  "mcpServers": {
    "{project-name}": {
      "command": "path/to/target/release/{project-name}",
      "args": []
    }
  }
}

Tools

  • {tool_name}: {Tool description}

Development

Run tests:

bash
cargo test

Run with logging:

bash
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
rust
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(
        &self,
        _request: Option<PaginatedRequestParam>,
        _context: RequestContext<RoleServer>,
    ) -> Result<ListPromptsResult, ErrorData> {
        let prompts = vec![
            Prompt {
                name: "example-prompt".to_string(),
                description: Some("An example prompt".to_string()),
                arguments: Some(vec![
                    PromptArgument {
                        name: "topic".to_string(),
                        description: Some("The topic to discuss".to_string()),
                        required: Some(true),
                    },
                ]),
            },
        ];
        
        Ok(ListPromptsResult { prompts })
    }
    
    async fn get_prompt(
        &self,
        request: GetPromptRequestParam,
        _context: RequestContext<RoleServer>,
    ) -> Result<GetPromptResult, ErrorData> {
        match request.name.as_str() {
            "example-prompt" => {
                let topic = request.arguments
                    .as_ref()
                    .and_then(|args| args.get("topic"))
                    .ok_or_else(|| ErrorData::invalid_params("topic required"))?;
                
                Ok(GetPromptResult {
                    description: Some("Example prompt".to_string()),
                    messages: vec![
                        PromptMessage::user(format!("Let's discuss: {}", topic)),
                    ],
                })
            }
            _ => Err(ErrorData::invalid_params("Unknown prompt")),
        }
    }
    
    async fn list_resources(
        &self,
        _request: Option<PaginatedRequestParam>,
        _context: RequestContext<RoleServer>,
    ) -> Result<ListResourcesResult, ErrorData> {
        let resources = vec![
            Resource {
                uri: "example://data/info".to_string(),
                name: "Example Resource".to_string(),
                description: Some("An example resource".to_string()),
                mime_type: Some("text/plain".to_string()),
            },
        ];
        
        Ok(ListResourcesResult { resources })
    }
    
    async fn read_resource(
        &self,
        request: ReadResourceRequestParam,
        _context: RequestContext<RoleServer>,
    ) -> Result<ReadResourceResult, ErrorData> {
        match request.uri.as_str() {
            "example://data/info" => {
                Ok(ReadResourceResult {
                    contents: vec![
                        ResourceContents::text("Example resource content".to_string())
                            .with_uri(request.uri)
                            .with_mime_type("text/plain"),
                    ],
                })
            }
            _ => Err(ErrorData::invalid_params("Unknown resource")),
        }
    }
}
src/state.rs
rust
use std::sync::Arc;
use tokio::sync::RwLock;

#[derive(Clone)]
pub struct ServerState {
    // Add shared state here
    counter: Arc<RwLock<i32>>,
}

impl ServerState {
    pub fn new() -> Self {
        Self {
            counter: Arc::new(RwLock::new(0)),
        }
    }
    
    pub async fn increment(&self) -> i32 {
        let mut counter = self.counter.write().await;
        *counter += 1;
        *counter
    }
    
    pub async fn get(&self) -> i32 {
        *self.counter.read().await
    }
}
src/tools/mod.rs
rust
pub mod example;

pub use example::ExampleParams;
src/tools/example.rs
rust
use rmcp::model::Parameters;
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;

#[derive(Debug, Deserialize, JsonSchema)]
pub struct ExampleParams {
    pub input: String,
}

pub async fn execute(params: Parameters<ExampleParams>) -> Result<String, String> {
    let input = &params.inner().input;
    
    // Tool logic here
    Ok(format!("Processed: {}", input))
}

#[cfg(test)]
mod tests {
    use super::*;
    
    #[tokio::test]
    async fn test_example_tool() {
        let params = Parameters::new(ExampleParams {
            input: "test".to_string(),
        });
        
        let result = execute(params).await.unwrap();
        assert!(result.contains("test"));
    }
}
src/prompts/mod.rs
rust
// Prompt implementations can go here if needed
src/resources/mod.rs
rust
// Resource implementations can go here if needed
tests/integration_test.rs
rust
use rmcp::{
    model::*,
    protocol::*,
    server::{RequestContext, ServerHandler, RoleServer},
};

// Replace with your actual project name in snake_case
// Example: if project is "my-mcp-server", use my_mcp_server
use my_mcp_server::handler::McpHandler;

#[tokio::test]
async fn test_list_tools() {
    let handler = McpHandler::new();
    let context = RequestContext::default();
    
    let result = handler.list_tools(None, context).await.unwrap();
    
    assert!(!result.tools.is_empty());
    assert!(result.tools.iter().any(|t| t.name == "example_tool"));
}

#[tokio::test]
async fn test_call_tool() {
    let handler = McpHandler::new();
    let context = RequestContext::default();
    
    let request = CallToolRequestParam {
        name: "example_tool".to_string(),
        arguments: Some(serde_json::json!({
            "input": "test"
        })),
    };
    
    let result = handler.call_tool(request, context).await;
    assert!(result.is_ok());
}

#[tokio::test]
async fn test_list_prompts() {
    let handler = McpHandler::new();
    let context = RequestContext::default();
    
    let result = handler.list_prompts(None, context).await.unwrap();
    assert!(!result.prompts.is_empty());
}

#[tokio::test]
async fn test_list_resources() {
    let handler = McpHandler::new();
    let context = RequestContext::default();
    
    let result = handler.list_resources(None, context).await.unwrap();
    assert!(!result.resources.is_empty());
}

Implementation Guidelines

  1. Use rmcp-macros: Leverage #[tool], #[tool_router], and #[tool_handler] 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
rust
#[derive(Debug, Deserialize, JsonSchema)]
pub struct GreetParams {
    pub name: String,
}

#[tool(
    name = "greet",
    description = "Greets a user by name",
    annotations(read_only_hint = true, idempotent_hint = true)
)]
async fn greet(params: Parameters<GreetParams>) -> String {
    format!("Hello, {}!", params.inner().name)
}
Tool with Error Handling
rust
#[derive(Debug, Deserialize, JsonSchema)]
pub struct DivideParams {
    pub a: f64,
    pub b: f64,
}

#[tool(name = "divide", description = "Divides two numbers")]
async fn divide(params: Parameters<DivideParams>) -> Result<f64, String> {
    let p = params.inner();
    if p.b == 0.0 {
        Err("Cannot divide by zero".to_string())
    } else {
        Ok(p.a / p.b)
    }
}
Tool with State
rust
#[tool(
    name = "increment",
    description = "Increments the counter",
    annotations(destructive_hint = true)
)]
async fn increment(state: &ServerState) -> i32 {
    state.increment().await
}

Running the Generated Server

After generation:

bash
cd {project-name}
cargo build
cargo test
cargo run

For Claude Desktop integration:

json
{
  "mcpServers": {
    "{project-name}": {
      "command": "path/to/{project-name}/target/release/{project-name}",
      "args": []
    }
  }
}

Now generate the complete project based on the user's requirements!

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/rust-mcp-server-generator of github/awesome-copilot.

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Rust MCP Server Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rust MCP Server Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust MCP Server Generator this skillgithub/awesome-copilot40k1 repos~3.2kAutomated safety check: PassMIT
Lean Ctx Reviewyvgude/lean-ctx3.9k—~1.6kAutomated safety check: PassApache-2.0
Foremergenaw103/foremerge536—~2.4kAutomated safety check: PassApache-2.0
Embedded DebuggerAdancurusul/embedded-debugger-mcp199—~1.4kAutomated safety check: PassMIT
Agnixagent-sh/agnix444—~874Automated safety check: PassApache-2.0
Agnixagent-sh/agnix444—~563Automated safety check: PassApache-2.0

Similar skills

  • Lean Ctx Review

    yvgude/lean-ctx

    Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems.

    3.9k GitHub stars~1.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Foremerge

    naw103/foremerge

    Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server.

    536 GitHub stars~2.4k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Embedded Debugger

    Adancurusul/embedded-debugger-mcp

    Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp.

    199 GitHub stars~1.4k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    444 GitHub stars~874 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    444 GitHub stars~563 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Linggen

    linggen/linggen-memory

    Linggen — durable cross-host memory plus browser control, over two local MCP servers: ling-mem for memory, the Linggen engine for browser, X and agents.

    109 GitHub stars~8.6k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Rust MCP Server Generator

What does Rust MCP Server Generator do?

Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK. Rust MCP Server Generator is an agent skill from github/awesome-copilot, published by the product's own GitHub organization.

When should I use Rust MCP Server Generator?

Rust MCP Server Generator fits situations like: tasks that involve MCP servers.

How do I install Rust MCP Server Generator in Claude Code?

Run `npx skills add github/awesome-copilot --skill rust-mcp-server-generator -a claude-code`. Or copy the skill folder (skills/rust-mcp-server-generator in github/awesome-copilot) into .claude/skills/rust-mcp-server-generator in your project. Claude Code loads it when a task matches its description.

How do I install Rust MCP Server Generator in Codex?

Run `npx skills add github/awesome-copilot --skill rust-mcp-server-generator -a codex`. Or copy the skill folder (skills/rust-mcp-server-generator in github/awesome-copilot) into .agents/skills/rust-mcp-server-generator in your project. Codex loads it when a task matches its description.

Can I use Rust MCP Server Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill rust-mcp-server-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-mcp-server-generator, .gemini/skills/rust-mcp-server-generator, .github/skills/rust-mcp-server-generator and .opencode/skills/rust-mcp-server-generator in your project.

What does Rust MCP Server Generator need to run?

Going by SKILL.md and its folder, Rust MCP Server Generator needs the command-line tools its instructions call (cargo).

Does Rust MCP Server Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rust MCP Server Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rust MCP Server Generator use?

Rust MCP Server Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rust MCP Server Generator use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rust MCP Server Generator?

Skills that share tags, products or a category with Rust MCP Server Generator: Lean Ctx Review (yvgude/lean-ctx, 3.9k stars), Foremerge (naw103/foremerge, 536 stars), Embedded Debugger (Adancurusul/embedded-debugger-mcp, 199 stars) and Agnix (agent-sh/agnix, 444 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust MCP Server Generator?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.