[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AE650RWW062YSGNJPCV631":3,"skill-same:01M6AE650RWW062YSGNJPCV631":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6AE650RWW062YSGNJPCV631","rust-mcp-server-generator",null,"Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41046,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Frust-mcp-server-generator\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"rust","mcp server","generator","server","rust mcp server generator","MCP","Tools","with tools","with","resources","complete","tests","project","context","model","protocol","generate","official","model context protocol","sdk","2026-11-10 10:12:30",false,"---\nname: rust-mcp-server-generator\ndescription: 'Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK'\n---\n\n# Rust MCP Server Generator\n\nYou are a Rust MCP server generator. Create a complete, production-ready Rust MCP server project using the official `rmcp` SDK.\n\n## Project Requirements\n\nAsk the user for:\n1. **Project name** (e.g., \"my-mcp-server\")\n2. **Server description** (e.g., \"A weather data MCP server\")\n3. **Transport type** (stdio, sse, http, or all)\n4. **Tools to include** (e.g., \"weather lookup\", \"forecast\", \"alerts\")\n5. **Whether to include prompts and resources**\n\n## Project Structure\n\nGenerate this structure:\n\n```\n{project-name}\u002F\n├── Cargo.toml\n├── .gitignore\n├── README.md\n├── src\u002F\n│   ├── main.rs\n│   ├── handler.rs\n│   ├── tools\u002F\n│   │   ├── mod.rs\n│   │   └── {tool_name}.rs\n│   ├── prompts\u002F\n│   │   ├── mod.rs\n│   │   └── {prompt_name}.rs\n│   ├── resources\u002F\n│   │   ├── mod.rs\n│   │   └── {resource_name}.rs\n│   └── state.rs\n└── tests\u002F\n    └── integration_test.rs\n```\n\n## File Templates\n\n### Cargo.toml\n\n```toml\n[package]\nname = \"{project-name}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\nrmcp = { version = \"0.8.1\", features = [\"server\"] }\nrmcp-macros = \"0.8\"\ntokio = { version = \"1\", features = [\"full\"] }\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\nanyhow = \"1.0\"\ntracing = \"0.1\"\ntracing-subscriber = \"0.3\"\nschemars = { version = \"0.8\", features = [\"derive\"] }\nasync-trait = \"0.1\"\n\n# Optional: for HTTP transports\naxum = { version = \"0.7\", optional = true }\ntower-http = { version = \"0.5\", features = [\"cors\"], optional = true }\n\n[dev-dependencies]\ntokio-test = \"0.4\"\n\n[features]\ndefault = []\nhttp = [\"dep:axum\", \"dep:tower-http\"]\n\n[[bin]]\nname = \"{project-name}\"\npath = \"src\u002Fmain.rs\"\n```\n\n### .gitignore\n\n```gitignore\n\u002Ftarget\nCargo.lock\n*.swp\n*.swo\n*~\n.DS_Store\n```\n\n### README.md\n\n```markdown\n# {Project Name}\n\n{Server description}\n\n## Installation\n\n```bash\ncargo build --release\n```\n\n## Usage\n\n### Stdio Transport\n\n```bash\ncargo run\n```\n\n### SSE Transport\n\n```bash\ncargo run --features http -- --transport sse\n```\n\n### HTTP Transport\n\n```bash\ncargo run --features http -- --transport http\n```\n\n## Configuration\n\nConfigure in your MCP client (e.g., Claude Desktop):\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"path\u002Fto\u002Ftarget\u002Frelease\u002F{project-name}\",\n      \"args\": []\n    }\n  }\n}\n```\n\n## Tools\n\n- **{tool_name}**: {Tool description}\n\n## Development\n\nRun tests:\n\n```bash\ncargo test\n```\n\nRun with logging:\n\n```bash\nRUST_LOG=debug cargo run\n```\n```\n\n### src\u002Fmain.rs\n\n```rust\nuse anyhow::Result;\nuse rmcp::{\n    protocol::ServerCapabilities,\n    server::Server,\n    transport::StdioTransport,\n};\nuse tokio::signal;\nuse tracing_subscriber;\n\nmod handler;\nmod state;\nmod tools;\nmod prompts;\nmod resources;\n\nuse handler::McpHandler;\n\n#[tokio::main]\nasync fn main() -> Result\u003C()> {\n    \u002F\u002F Initialize tracing\n    tracing_subscriber::fmt()\n        .with_max_level(tracing::Level::INFO)\n        .with_target(false)\n        .init();\n    \n    tracing::info!(\"Starting {project-name} MCP server\");\n    \n    \u002F\u002F Create handler\n    let handler = McpHandler::new();\n    \n    \u002F\u002F Create transport (stdio by default)\n    let transport = StdioTransport::new();\n    \n    \u002F\u002F Build server with capabilities\n    let server = Server::builder()\n        .with_handler(handler)\n        .with_capabilities(ServerCapabilities {\n            tools: Some(Default::default()),\n            prompts: Some(Default::default()),\n            resources: Some(Default::default()),\n            ..Default::default()\n        })\n        .build(transport)?;\n    \n    tracing::info!(\"Server started, waiting for requests\");\n    \n    \u002F\u002F Run server until Ctrl+C\n    server.run(signal::ctrl_c()).await?;\n    \n    tracing::info!(\"Server shutting down\");\n    Ok(())\n}\n```\n\n### src\u002Fhandler.rs\n\n```rust\nuse rmcp::{\n    model::*,\n    protocol::*,\n    server::{RequestContext, ServerHandler, RoleServer, ToolRouter},\n    ErrorData,\n};\nuse rmcp::{tool_router, tool_handler};\nuse async_trait::async_trait;\n\nuse crate::state::ServerState;\nuse crate::tools;\n\npub struct McpHandler {\n    state: ServerState,\n    tool_router: ToolRouter,\n}\n\n#[tool_router]\nimpl McpHandler {\n    \u002F\u002F Include tool definitions from tools module\n    #[tool(\n        name = \"example_tool\",\n        description = \"An example tool\",\n        annotations(read_only_hint = true)\n    )]\n    async fn example_tool(params: Parameters\u003Ctools::ExampleParams>) -> Result\u003CString, String> {\n        tools::example::execute(params).await\n    }\n    \n    pub fn new() -> Self {\n        Self {\n            state: ServerState::new(),\n            tool_router: Self::tool_router(),\n        }\n    }\n}\n\n#[tool_handler]\n#[async_trait]\nimpl ServerHandler for McpHandler {\n    async fn list_prompts(\n        &self,\n        _request: Option\u003CPaginatedRequestParam>,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CListPromptsResult, ErrorData> {\n        let prompts = vec![\n            Prompt {\n                name: \"example-prompt\".to_string(),\n                description: Some(\"An example prompt\".to_string()),\n                arguments: Some(vec![\n                    PromptArgument {\n                        name: \"topic\".to_string(),\n                        description: Some(\"The topic to discuss\".to_string()),\n                        required: Some(true),\n                    },\n                ]),\n            },\n        ];\n        \n        Ok(ListPromptsResult { prompts })\n    }\n    \n    async fn get_prompt(\n        &self,\n        request: GetPromptRequestParam,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CGetPromptResult, ErrorData> {\n        match request.name.as_str() {\n            \"example-prompt\" => {\n                let topic = request.arguments\n                    .as_ref()\n                    .and_then(|args| args.get(\"topic\"))\n                    .ok_or_else(|| ErrorData::invalid_params(\"topic required\"))?;\n                \n                Ok(GetPromptResult {\n                    description: Some(\"Example prompt\".to_string()),\n                    messages: vec![\n                        PromptMessage::user(format!(\"Let's discuss: {}\", topic)),\n                    ],\n                })\n            }\n            _ => Err(ErrorData::invalid_params(\"Unknown prompt\")),\n        }\n    }\n    \n    async fn list_resources(\n        &self,\n        _request: Option\u003CPaginatedRequestParam>,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CListResourcesResult, ErrorData> {\n        let resources = vec![\n            Resource {\n                uri: \"example:\u002F\u002Fdata\u002Finfo\".to_string(),\n                name: \"Example Resource\".to_string(),\n                description: Some(\"An example resource\".to_string()),\n                mime_type: Some(\"text\u002Fplain\".to_string()),\n            },\n        ];\n        \n        Ok(ListResourcesResult { resources })\n    }\n    \n    async fn read_resource(\n        &self,\n        request: ReadResourceRequestParam,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CReadResourceResult, ErrorData> {\n        match request.uri.as_str() {\n            \"example:\u002F\u002Fdata\u002Finfo\" => {\n                Ok(ReadResourceResult {\n                    contents: vec![\n                        ResourceContents::text(\"Example resource content\".to_string())\n                            .with_uri(request.uri)\n                            .with_mime_type(\"text\u002Fplain\"),\n                    ],\n                })\n            }\n            _ => Err(ErrorData::invalid_params(\"Unknown resource\")),\n        }\n    }\n}\n```\n\n### src\u002Fstate.rs\n\n```rust\nuse std::sync::Arc;\nuse tokio::sync::RwLock;\n\n#[derive(Clone)]\npub struct ServerState {\n    \u002F\u002F Add shared state here\n    counter: Arc\u003CRwLock\u003Ci32>>,\n}\n\nimpl ServerState {\n    pub fn new() -> Self {\n        Self {\n            counter: Arc::new(RwLock::new(0)),\n        }\n    }\n    \n    pub async fn increment(&self) -> i32 {\n        let mut counter = self.counter.write().await;\n        *counter += 1;\n        *counter\n    }\n    \n    pub async fn get(&self) -> i32 {\n        *self.counter.read().await\n    }\n}\n```\n\n### src\u002Ftools\u002Fmod.rs\n\n```rust\npub mod example;\n\npub use example::ExampleParams;\n```\n\n### src\u002Ftools\u002Fexample.rs\n\n```rust\nuse rmcp::model::Parameters;\nuse serde::{Deserialize, Serialize};\nuse schemars::JsonSchema;\n\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct ExampleParams {\n    pub input: String,\n}\n\npub async fn execute(params: Parameters\u003CExampleParams>) -> Result\u003CString, String> {\n    let input = &params.inner().input;\n    \n    \u002F\u002F Tool logic here\n    Ok(format!(\"Processed: {}\", input))\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    \n    #[tokio::test]\n    async fn test_example_tool() {\n        let params = Parameters::new(ExampleParams {\n            input: \"test\".to_string(),\n        });\n        \n        let result = execute(params).await.unwrap();\n        assert!(result.contains(\"test\"));\n    }\n}\n```\n\n### src\u002Fprompts\u002Fmod.rs\n\n```rust\n\u002F\u002F Prompt implementations can go here if needed\n```\n\n### src\u002Fresources\u002Fmod.rs\n\n```rust\n\u002F\u002F Resource implementations can go here if needed\n```\n\n### tests\u002Fintegration_test.rs\n\n```rust\nuse rmcp::{\n    model::*,\n    protocol::*,\n    server::{RequestContext, ServerHandler, RoleServer},\n};\n\n\u002F\u002F Replace with your actual project name in snake_case\n\u002F\u002F Example: if project is \"my-mcp-server\", use my_mcp_server\nuse my_mcp_server::handler::McpHandler;\n\n#[tokio::test]\nasync fn test_list_tools() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_tools(None, context).await.unwrap();\n    \n    assert!(!result.tools.is_empty());\n    assert!(result.tools.iter().any(|t| t.name == \"example_tool\"));\n}\n\n#[tokio::test]\nasync fn test_call_tool() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let request = CallToolRequestParam {\n        name: \"example_tool\".to_string(),\n        arguments: Some(serde_json::json!({\n            \"input\": \"test\"\n        })),\n    };\n    \n    let result = handler.call_tool(request, context).await;\n    assert!(result.is_ok());\n}\n\n#[tokio::test]\nasync fn test_list_prompts() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_prompts(None, context).await.unwrap();\n    assert!(!result.prompts.is_empty());\n}\n\n#[tokio::test]\nasync fn test_list_resources() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_resources(None, context).await.unwrap();\n    assert!(!result.resources.is_empty());\n}\n```\n\n## Implementation Guidelines\n\n1. **Use rmcp-macros**: Leverage `#[tool]`, `#[tool_router]`, and `#[tool_handler]` macros for cleaner code\n2. **Type Safety**: Use `schemars::JsonSchema` for all parameter types\n3. **Error Handling**: Return `Result` types with proper error messages\n4. **Async\u002FAwait**: All handlers must be async\n5. **State Management**: Use `Arc\u003CRwLock\u003CT>>` for shared state\n6. **Testing**: Include unit tests for tools and integration tests for handlers\n7. **Logging**: Use `tracing` macros (`info!`, `debug!`, `warn!`, `error!`)\n8. **Documentation**: Add doc comments to all public items\n\n## Example Tool Patterns\n\n### Simple Read-Only Tool\n\n```rust\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct GreetParams {\n    pub name: String,\n}\n\n#[tool(\n    name = \"greet\",\n    description = \"Greets a user by name\",\n    annotations(read_only_hint = true, idempotent_hint = true)\n)]\nasync fn greet(params: Parameters\u003CGreetParams>) -> String {\n    format!(\"Hello, {}!\", params.inner().name)\n}\n```\n\n### Tool with Error Handling\n\n```rust\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct DivideParams {\n    pub a: f64,\n    pub b: f64,\n}\n\n#[tool(name = \"divide\", description = \"Divides two numbers\")]\nasync fn divide(params: Parameters\u003CDivideParams>) -> Result\u003Cf64, String> {\n    let p = params.inner();\n    if p.b == 0.0 {\n        Err(\"Cannot divide by zero\".to_string())\n    } else {\n        Ok(p.a \u002F p.b)\n    }\n}\n```\n\n### Tool with State\n\n```rust\n#[tool(\n    name = \"increment\",\n    description = \"Increments the counter\",\n    annotations(destructive_hint = true)\n)]\nasync fn increment(state: &ServerState) -> i32 {\n    state.increment().await\n}\n```\n\n## Running the Generated Server\n\nAfter generation:\n\n```bash\ncd {project-name}\ncargo build\ncargo test\ncargo run\n```\n\nFor Claude Desktop integration:\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"path\u002Fto\u002F{project-name}\u002Ftarget\u002Frelease\u002F{project-name}\",\n      \"args\": []\n    }\n  }\n}\n```\n\nNow generate the complete project based on the user's requirements!\n","# Rust MCP Server Generator\n\nYou are a Rust MCP server generator. Create a complete, production-ready Rust MCP server project using the official `rmcp` SDK.\n\n## Project Requirements\n\nAsk the user for:\n1. **Project name** (e.g., \"my-mcp-server\")\n2. **Server description** (e.g., \"A weather data MCP server\")\n3. **Transport type** (stdio, sse, http, or all)\n4. **Tools to include** (e.g., \"weather lookup\", \"forecast\", \"alerts\")\n5. **Whether to include prompts and resources**\n\n## Project Structure\n\nGenerate this structure:\n\n```\n{project-name}\u002F\n├── Cargo.toml\n├── .gitignore\n├── README.md\n├── src\u002F\n│   ├── main.rs\n│   ├── handler.rs\n│   ├── tools\u002F\n│   │   ├── mod.rs\n│   │   └── {tool_name}.rs\n│   ├── prompts\u002F\n│   │   ├── mod.rs\n│   │   └── {prompt_name}.rs\n│   ├── resources\u002F\n│   │   ├── mod.rs\n│   │   └── {resource_name}.rs\n│   └── state.rs\n└── tests\u002F\n    └── integration_test.rs\n```\n\n## File Templates\n\n### Cargo.toml\n\n```toml\n[package]\nname = \"{project-name}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\nrmcp = { version = \"0.8.1\", features = [\"server\"] }\nrmcp-macros = \"0.8\"\ntokio = { version = \"1\", features = [\"full\"] }\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\nanyhow = \"1.0\"\ntracing = \"0.1\"\ntracing-subscriber = \"0.3\"\nschemars = { version = \"0.8\", features = [\"derive\"] }\nasync-trait = \"0.1\"\n\n# Optional: for HTTP transports\naxum = { version = \"0.7\", optional = true }\ntower-http = { version = \"0.5\", features = [\"cors\"], optional = true }\n\n[dev-dependencies]\ntokio-test = \"0.4\"\n\n[features]\ndefault = []\nhttp = [\"dep:axum\", \"dep:tower-http\"]\n\n[[bin]]\nname = \"{project-name}\"\npath = \"src\u002Fmain.rs\"\n```\n\n### .gitignore\n\n```gitignore\n\u002Ftarget\nCargo.lock\n*.swp\n*.swo\n*~\n.DS_Store\n```\n\n### README.md\n\n```markdown\n# {Project Name}\n\n{Server description}\n\n## Installation\n\n```bash\ncargo build --release\n```\n\n## Usage\n\n### Stdio Transport\n\n```bash\ncargo run\n```\n\n### SSE Transport\n\n```bash\ncargo run --features http -- --transport sse\n```\n\n### HTTP Transport\n\n```bash\ncargo run --features http -- --transport http\n```\n\n## Configuration\n\nConfigure in your MCP client (e.g., Claude Desktop):\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"path\u002Fto\u002Ftarget\u002Frelease\u002F{project-name}\",\n      \"args\": []\n    }\n  }\n}\n```\n\n## Tools\n\n- **{tool_name}**: {Tool description}\n\n## Development\n\nRun tests:\n\n```bash\ncargo test\n```\n\nRun with logging:\n\n```bash\nRUST_LOG=debug cargo run\n```\n```\n\n### src\u002Fmain.rs\n\n```rust\nuse anyhow::Result;\nuse rmcp::{\n    protocol::ServerCapabilities,\n    server::Server,\n    transport::StdioTransport,\n};\nuse tokio::signal;\nuse tracing_subscriber;\n\nmod handler;\nmod state;\nmod tools;\nmod prompts;\nmod resources;\n\nuse handler::McpHandler;\n\n#[tokio::main]\nasync fn main() -> Result\u003C()> {\n    \u002F\u002F Initialize tracing\n    tracing_subscriber::fmt()\n        .with_max_level(tracing::Level::INFO)\n        .with_target(false)\n        .init();\n    \n    tracing::info!(\"Starting {project-name} MCP server\");\n    \n    \u002F\u002F Create handler\n    let handler = McpHandler::new();\n    \n    \u002F\u002F Create transport (stdio by default)\n    let transport = StdioTransport::new();\n    \n    \u002F\u002F Build server with capabilities\n    let server = Server::builder()\n        .with_handler(handler)\n        .with_capabilities(ServerCapabilities {\n            tools: Some(Default::default()),\n            prompts: Some(Default::default()),\n            resources: Some(Default::default()),\n            ..Default::default()\n        })\n        .build(transport)?;\n    \n    tracing::info!(\"Server started, waiting for requests\");\n    \n    \u002F\u002F Run server until Ctrl+C\n    server.run(signal::ctrl_c()).await?;\n    \n    tracing::info!(\"Server shutting down\");\n    Ok(())\n}\n```\n\n### src\u002Fhandler.rs\n\n```rust\nuse rmcp::{\n    model::*,\n    protocol::*,\n    server::{RequestContext, ServerHandler, RoleServer, ToolRouter},\n    ErrorData,\n};\nuse rmcp::{tool_router, tool_handler};\nuse async_trait::async_trait;\n\nuse crate::state::ServerState;\nuse crate::tools;\n\npub struct McpHandler {\n    state: ServerState,\n    tool_router: ToolRouter,\n}\n\n#[tool_router]\nimpl McpHandler {\n    \u002F\u002F Include tool definitions from tools module\n    #[tool(\n        name = \"example_tool\",\n        description = \"An example tool\",\n        annotations(read_only_hint = true)\n    )]\n    async fn example_tool(params: Parameters\u003Ctools::ExampleParams>) -> Result\u003CString, String> {\n        tools::example::execute(params).await\n    }\n    \n    pub fn new() -> Self {\n        Self {\n            state: ServerState::new(),\n            tool_router: Self::tool_router(),\n        }\n    }\n}\n\n#[tool_handler]\n#[async_trait]\nimpl ServerHandler for McpHandler {\n    async fn list_prompts(\n        &self,\n        _request: Option\u003CPaginatedRequestParam>,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CListPromptsResult, ErrorData> {\n        let prompts = vec![\n            Prompt {\n                name: \"example-prompt\".to_string(),\n                description: Some(\"An example prompt\".to_string()),\n                arguments: Some(vec![\n                    PromptArgument {\n                        name: \"topic\".to_string(),\n                        description: Some(\"The topic to discuss\".to_string()),\n                        required: Some(true),\n                    },\n                ]),\n            },\n        ];\n        \n        Ok(ListPromptsResult { prompts })\n    }\n    \n    async fn get_prompt(\n        &self,\n        request: GetPromptRequestParam,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CGetPromptResult, ErrorData> {\n        match request.name.as_str() {\n            \"example-prompt\" => {\n                let topic = request.arguments\n                    .as_ref()\n                    .and_then(|args| args.get(\"topic\"))\n                    .ok_or_else(|| ErrorData::invalid_params(\"topic required\"))?;\n                \n                Ok(GetPromptResult {\n                    description: Some(\"Example prompt\".to_string()),\n                    messages: vec![\n                        PromptMessage::user(format!(\"Let's discuss: {}\", topic)),\n                    ],\n                })\n            }\n            _ => Err(ErrorData::invalid_params(\"Unknown prompt\")),\n        }\n    }\n    \n    async fn list_resources(\n        &self,\n        _request: Option\u003CPaginatedRequestParam>,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CListResourcesResult, ErrorData> {\n        let resources = vec![\n            Resource {\n                uri: \"example:\u002F\u002Fdata\u002Finfo\".to_string(),\n                name: \"Example Resource\".to_string(),\n                description: Some(\"An example resource\".to_string()),\n                mime_type: Some(\"text\u002Fplain\".to_string()),\n            },\n        ];\n        \n        Ok(ListResourcesResult { resources })\n    }\n    \n    async fn read_resource(\n        &self,\n        request: ReadResourceRequestParam,\n        _context: RequestContext\u003CRoleServer>,\n    ) -> Result\u003CReadResourceResult, ErrorData> {\n        match request.uri.as_str() {\n            \"example:\u002F\u002Fdata\u002Finfo\" => {\n                Ok(ReadResourceResult {\n                    contents: vec![\n                        ResourceContents::text(\"Example resource content\".to_string())\n                            .with_uri(request.uri)\n                            .with_mime_type(\"text\u002Fplain\"),\n                    ],\n                })\n            }\n            _ => Err(ErrorData::invalid_params(\"Unknown resource\")),\n        }\n    }\n}\n```\n\n### src\u002Fstate.rs\n\n```rust\nuse std::sync::Arc;\nuse tokio::sync::RwLock;\n\n#[derive(Clone)]\npub struct ServerState {\n    \u002F\u002F Add shared state here\n    counter: Arc\u003CRwLock\u003Ci32>>,\n}\n\nimpl ServerState {\n    pub fn new() -> Self {\n        Self {\n            counter: Arc::new(RwLock::new(0)),\n        }\n    }\n    \n    pub async fn increment(&self) -> i32 {\n        let mut counter = self.counter.write().await;\n        *counter += 1;\n        *counter\n    }\n    \n    pub async fn get(&self) -> i32 {\n        *self.counter.read().await\n    }\n}\n```\n\n### src\u002Ftools\u002Fmod.rs\n\n```rust\npub mod example;\n\npub use example::ExampleParams;\n```\n\n### src\u002Ftools\u002Fexample.rs\n\n```rust\nuse rmcp::model::Parameters;\nuse serde::{Deserialize, Serialize};\nuse schemars::JsonSchema;\n\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct ExampleParams {\n    pub input: String,\n}\n\npub async fn execute(params: Parameters\u003CExampleParams>) -> Result\u003CString, String> {\n    let input = &params.inner().input;\n    \n    \u002F\u002F Tool logic here\n    Ok(format!(\"Processed: {}\", input))\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    \n    #[tokio::test]\n    async fn test_example_tool() {\n        let params = Parameters::new(ExampleParams {\n            input: \"test\".to_string(),\n        });\n        \n        let result = execute(params).await.unwrap();\n        assert!(result.contains(\"test\"));\n    }\n}\n```\n\n### src\u002Fprompts\u002Fmod.rs\n\n```rust\n\u002F\u002F Prompt implementations can go here if needed\n```\n\n### src\u002Fresources\u002Fmod.rs\n\n```rust\n\u002F\u002F Resource implementations can go here if needed\n```\n\n### tests\u002Fintegration_test.rs\n\n```rust\nuse rmcp::{\n    model::*,\n    protocol::*,\n    server::{RequestContext, ServerHandler, RoleServer},\n};\n\n\u002F\u002F Replace with your actual project name in snake_case\n\u002F\u002F Example: if project is \"my-mcp-server\", use my_mcp_server\nuse my_mcp_server::handler::McpHandler;\n\n#[tokio::test]\nasync fn test_list_tools() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_tools(None, context).await.unwrap();\n    \n    assert!(!result.tools.is_empty());\n    assert!(result.tools.iter().any(|t| t.name == \"example_tool\"));\n}\n\n#[tokio::test]\nasync fn test_call_tool() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let request = CallToolRequestParam {\n        name: \"example_tool\".to_string(),\n        arguments: Some(serde_json::json!({\n            \"input\": \"test\"\n        })),\n    };\n    \n    let result = handler.call_tool(request, context).await;\n    assert!(result.is_ok());\n}\n\n#[tokio::test]\nasync fn test_list_prompts() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_prompts(None, context).await.unwrap();\n    assert!(!result.prompts.is_empty());\n}\n\n#[tokio::test]\nasync fn test_list_resources() {\n    let handler = McpHandler::new();\n    let context = RequestContext::default();\n    \n    let result = handler.list_resources(None, context).await.unwrap();\n    assert!(!result.resources.is_empty());\n}\n```\n\n## Implementation Guidelines\n\n1. **Use rmcp-macros**: Leverage `#[tool]`, `#[tool_router]`, and `#[tool_handler]` macros for cleaner code\n2. **Type Safety**: Use `schemars::JsonSchema` for all parameter types\n3. **Error Handling**: Return `Result` types with proper error messages\n4. **Async\u002FAwait**: All handlers must be async\n5. **State Management**: Use `Arc\u003CRwLock\u003CT>>` for shared state\n6. **Testing**: Include unit tests for tools and integration tests for handlers\n7. **Logging**: Use `tracing` macros (`info!`, `debug!`, `warn!`, `error!`)\n8. **Documentation**: Add doc comments to all public items\n\n## Example Tool Patterns\n\n### Simple Read-Only Tool\n\n```rust\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct GreetParams {\n    pub name: String,\n}\n\n#[tool(\n    name = \"greet\",\n    description = \"Greets a user by name\",\n    annotations(read_only_hint = true, idempotent_hint = true)\n)]\nasync fn greet(params: Parameters\u003CGreetParams>) -> String {\n    format!(\"Hello, {}!\", params.inner().name)\n}\n```\n\n### Tool with Error Handling\n\n```rust\n#[derive(Debug, Deserialize, JsonSchema)]\npub struct DivideParams {\n    pub a: f64,\n    pub b: f64,\n}\n\n#[tool(name = \"divide\", description = \"Divides two numbers\")]\nasync fn divide(params: Parameters\u003CDivideParams>) -> Result\u003Cf64, String> {\n    let p = params.inner();\n    if p.b == 0.0 {\n        Err(\"Cannot divide by zero\".to_string())\n    } else {\n        Ok(p.a \u002F p.b)\n    }\n}\n```\n\n### Tool with State\n\n```rust\n#[tool(\n    name = \"increment\",\n    description = \"Increments the counter\",\n    annotations(destructive_hint = true)\n)]\nasync fn increment(state: &ServerState) -> i32 {\n    state.increment().await\n}\n```\n\n## Running the Generated Server\n\nAfter generation:\n\n```bash\ncd {project-name}\ncargo build\ncargo test\ncargo run\n```\n\nFor Claude Desktop integration:\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"path\u002Fto\u002F{project-name}\u002Ftarget\u002Frelease\u002F{project-name}\",\n      \"args\": []\n    }\n  }\n}\n```\n\nNow generate the complete project based on the user's requirements!\n",{"name":5,"description":7},"main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Frust-mcp-server-generator",5340,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-11 13:41:32",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add github\u002Fawesome-copilot --skill rust-mcp-server-generator",{"tool":68,"command":69},"bunx","bunx skills add github\u002Fawesome-copilot --skill rust-mcp-server-generator",{"tool":71,"command":72},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill rust-mcp-server-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Frust-mcp-server-generator\u002FSKILL.md",true,[],[77,105,133,163,195,212],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":87,"publishedAt":47},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[83,86],{"categoryNo":84,"categoryName":85,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[88,89,90,91,39,92,93,94,95,96,97,98,99,100,38,101,102,103,104,35],"supabase","rls","supabase rls","supabase rls policies","when","review","change","read","write","security","isolation","tables","as","prove","use","users","functions",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":112,"publishedAt":47},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[111],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132],"distribution","skill distribution audit","audit","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection","drift","output","investigate","duplicate","template","release","reconcile",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":137,"sourceHtmlUrl":138,"categories":139,"keywords":145,"publishedAt":47},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[140],{"categoryNo":141,"categoryName":142,"taxonomyType":143,"taxonomyTypeDesc":144},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[146,147,148,149,150,151,119,39,152,153,154,155,156,157,158,102,159,160,161,162],"custom","code","logicapps custom code net10 migration","migration","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","Legacy","debugging","workflows",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":167,"sourceHtmlUrl":168,"categories":169,"keywords":172,"publishedAt":47},"01M6AEBN37RQMXJ3298PEY7PG1","winmd-api-search","Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI\u002FML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FSKILL.md",[170,171],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":141,"categoryName":142,"taxonomyType":143,"taxonomyTypeDesc":144},[173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,92,188,189,190,191,192,119,193,194],"winmd api search","search","api","windows","desktop","file access","enumeration","ui","ml","file","networking","capabilities","notifications","explore","access","features","full","camera","events","platform","methods","controls",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":199,"licenseFileUrl":200,"sourceHtmlUrl":201,"categories":202,"keywords":208,"publishedAt":47},"01M6AE571R3SC1ZGE202B3NB5S","resemble-detect","Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using Resemble AI","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FSKILL.md",[203,204,207],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":205,"categoryName":206,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[209,116,182,210,211],"resemble detect","https","identity",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":199,"licenseFileUrl":216,"sourceHtmlUrl":217,"categories":218,"keywords":223,"publishedAt":47},"01M6AE30BSK2HCY4TQQ22Z8JRD","quality-playbook","Run a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FSKILL.md",[219,222],{"categoryNo":220,"categoryName":221,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[224,225,226,227,147,93,9,115,228,229,210,230,231,232,233,234,235,236,237,238,239,240,38,241,41,242,243],"playbook","quality playbook","quality","code review","tdd","run","report","spec","bug report","council","engineering","functional","spec audit","bug","verified","multi-model","three","coverage","regression","structural"]