[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AE650RWW062YSGNJPCV631":3,"skill-same:01M6AE650RWW062YSGNJPCV631":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6AE650RWW062YSGNJPCV631","rust-mcp-server-generator","Rust MCP 服务器生成器","Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK","使用官方 rmcp SDK 生成一个完整的 Rust Model Context Protocol 服务器项目，包含工具（tools）、提示（prompts）、资源（resources）和测试。","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41162,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Frust-mcp-server-generator\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"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",5360,"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-15 04:42:30",{"source":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add github\u002Fawesome-copilot --skill rust-mcp-server-generator",{"tool":72,"command":73},"bunx","bunx skills add github\u002Fawesome-copilot --skill rust-mcp-server-generator",{"tool":75,"command":76},"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,[],[81,89,96,106,130,157],{"skillNo":82,"name":83,"nameZh":17,"description":84,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7B5D8BRA66G07045DF7WDYA","sap-cloud-integration","SAP Cloud Integration (CPI, part of SAP Integration Suite) runtime-specific guidance for building and troubleshooting iFlows. Use when writing or reviewing CPI Groovy scripts, choosing headers vs. exchange properties, designing exception subprocesses, JMS retry, idempotency or data store patterns, or diagnosing adapter errors (SFTP, HTTP\u002FOAuth, SOAP, IDoc, OData, AS2, Cloud Connector) from Message Processing Log (MPL) text. Not for SAP PI\u002FPO, ABAP development, or generic Java\u002FGroovy outside CPI.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsap-cloud-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":90,"name":91,"nameZh":17,"description":92,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"01M7B5CYRGSG571NH7EJWT5066","on-device-delegate","Saves cloud-model context by briefing one bounded, read-heavy sub-task (more than about 25 KB of prose, or many files that no single command can answer) to the local-coding plugin's on-device worker, which runs on the local MAI Code 1.1 Flash model. Use for log and test triage, summarizing many files, or extracting facts from large inputs. When the user names this skill, call the skill tool in the same response as your first other tool call, never as a separate step.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fon-device-delegate\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":17,"description":99,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":100,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":105},"01M74CBQ0M3ZKGQH8XKQZ2FHB1","scout-issue","Use when a developer wants to find the best GitHub issues to contribute to in a repository. Invoke with \u002Fscout-issue or ask to find good first issues, beginner-friendly issues, or open source work. Asks about experience level, technical skills, time, and contribution type, then searches GitHub issues, scores them, and presents ranked recommendations with match analysis.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":107,"name":108,"nameZh":17,"description":109,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":51},"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",[],[113,114,115,116,43,39,117,118,119,120,121,122,123,124,125,42,126,127,128,129],"supabase rls policies","supabase rls","supabase","rls","when","review","change","read","write","security","isolation","tables","as","prove","use","users","functions",{"skillNo":131,"name":132,"nameZh":17,"description":133,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":51},"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",[],[137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156],"distribution","skill distribution audit","audit","output","reconcile","release","template","duplicate","investigate","drift","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection",{"skillNo":158,"name":159,"nameZh":17,"description":160,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":161,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":51},"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",[],[165,166,167,168,169,170,171,150,43,172,173,174,175,176,177,178,127,179,180,181],"code","logicapps custom code net10 migration","migration","custom","Legacy","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","debugging","workflows"]