[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77W2NKMW231NKFJX4NQYA2A":3,"skill-same:01M77W2NKMW231NKFJX4NQYA2A":46},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77W2NKMW231NKFJX4NQYA2A","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","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frust-mcp-server-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK\"\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",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Frust-mcp-server-generator",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill rust-mcp-server-generator",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill rust-mcp-server-generator",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill rust-mcp-server-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frust-mcp-server-generator\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]