[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-f3dcf907-3901-4e1d-85c3-589644268c4c":3,"$fLROwCf1DC2mRe78W3cpCJTMMqR1W2fhxP3VYUXwfOUM":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"f3dcf907-3901-4e1d-85c3-589644268c4c","mcp-tool-developer","从头开始构建模型上下文协议（MCP）服务器和工具。使用TypeScript\u002FPython进行全栈MCP开发，测试，部署和注册发布。","cat_life_career","mod_other","sickn33,other","---\nname: mcp-tool-developer\ndescription: \"Build Model Context Protocol (MCP) servers and tools from scratch. Full-stack MCP development with TypeScript\u002FPython, testing, deployment, and registry publishing.\"\ncategory: developer-tools\nrisk: safe\nsource: community\nsource_repo: demo112\u002Fyunqu-ai-skills\nsource_type: community\ndate_added: \"2026-05-13\"\nauthor: yundu-ai\ntags: [mcp, ai-agent, tool-development, typescript, python, llm, model-context-protocol]\ntools: [claude, cursor, gemini]\n---\n\n# MCP Tool Developer\n\n## Overview\n\nExpert at building Model Context Protocol (MCP) servers that give AI agents new capabilities. Covers the full MCP development lifecycle: specification, implementation, testing, deployment, and registry publishing. Supports both TypeScript and Python with production-ready patterns.\n\nThis skill understands MCP specification primitives (tools, resources, prompts, sampling), transport options (stdio, SSE, Streamable HTTP), and the tool design patterns that make MCP servers reliable and composable.\n\n## When to Use This Skill\n\n- Use when building a new MCP server from scratch\n- Use when wrapping an existing API as an MCP tool\n- Use when debugging MCP server issues\n- Use when designing the tool schema for an MCP server\n- Use when publishing an MCP server to a registry\n\n## How It Works\n\n### Step 1: Define the MCP Server Scope\n\nIdentify what capabilities the server should expose:\n- **Tools** - Functions the LLM can call (primary use case)\n- **Resources** - Data the LLM can read (files, APIs, databases)\n- **Prompts** - Reusable prompt templates\n\nChoose the transport:\n- **stdio** - For local CLI tools (Claude Code, Cursor)\n- **SSE (Server-Sent Events)** - For remote\u002Fhosted tools\n- **Streamable HTTP** - New in MCP spec for modern deployments\n\n### Step 2: Design the Tool Schema\n\nDefine input\u002Foutput schemas before writing implementation:\n\n```typescript\n{\n  name: \"tool_name\",\n  description: \"What this tool does (visible to the LLM)\",\n  inputSchema: {\n    type: \"object\",\n    properties: { ... },\n    required: [ ... ]\n  }\n}\n```\n\n### Step 3: Implement the Server\n\nCreate the server with proper error handling, validation, and logging. Use the official MCP SDK for TypeScript (@modelcontextprotocol\u002Fsdk) or Python (mcp).\n\n### Step 4: Test and Deploy\n\nTest with the MCP Inspector, validate tool schemas, handle edge cases, then deploy locally or remotely.\n\n## Examples\n\n### Example 1: TypeScript MCP Server\n\n```typescript\nimport { McpServer } from \"@modelcontextprotocol\u002Fsdk\u002Fserver\u002Fmcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol\u002Fsdk\u002Fserver\u002Fstdio.js\";\nimport { z } from \"zod\";\n\nconst server = new McpServer({ name: \"my-tools\", version: \"1.0.0\" });\n\nserver.tool(\"greet\", \"Greet someone by name\",\n  { name: z.string().describe(\"Person's name\") },\n  async ({ name }) => ({ content: [{ type: \"text\", text: `Hello, ${name}!` }] })\n);\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n```\n\n### Example 2: API Wrapper Pattern\n\nWrap an external API as an MCP tool with auth, rate limiting, and error handling:\n- Map API endpoints to tools\n- Handle auth via environment variables\n- Transform API responses to LLM-friendly format\n- Add retry logic with exponential backoff\n\n## Best Practices\n\n- Build small, focused tools that can be chained rather than monolithic tools\n- Return structured errors, not crashes - tools should fail gracefully\n- Define schemas before implementation\n- Include descriptions that help the LLM understand when and how to use each tool\n- Validate all inputs against the schema\n- Add rate limiting for external API calls\n- Use environment variables for secrets, never hardcode credentials\n\n## Limitations\n\n- This skill provides guidance and code generation; actual runtime testing requires a development environment\n- MCP specification is evolving; always check the latest spec version\n- Security review is essential before deploying tools that handle sensitive data\n\n## Security and Safety Notes\n\n- Never hardcode API keys or credentials in tool implementations\n- Use environment variables or secret managers for all authentication\n- Validate and sanitize all inputs to prevent injection attacks\n- Rate limit external API calls to prevent abuse\n- Review tool permissions carefully - tools can access files, networks, and execute code\n\n## Common Pitfalls\n\n- **Problem:** LLM calls tools with wrong parameters\n  **Solution:** Improve tool descriptions and add examples in the description field. The LLM reads descriptions to decide how to call tools.\n\n- **Problem:** Tool times out on large inputs\n  **Solution:** Add input size validation and pagination. Stream large responses instead of buffering.\n\n## Related Skills\n\n- `api-integration-architect` - For API design patterns used in MCP tools\n- `security-audit-code-reviewer` - For reviewing MCP server code security\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,79,1942,"2026-05-16 13:28:24",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"ededa4f4-dee2-49df-b2b9-772d62ed3f26","1.0.0","mcp-tool-developer.zip",2323,"uploads\u002Fskills\u002Ff3dcf907-3901-4e1d-85c3-589644268c4c\u002Fmcp-tool-developer.zip","b87e6ffc1996ac9540b8fd6e4b24fb1fdb9dae67ee0cb8b0b9379cad7375bbdd","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":4867}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]