skillfed

mcp-builder

mcp-builder teaches systematic design, implementation, testing, and deployment of Model Context Protocol servers. Learn to define tools for AI-driven operations, resources for read-only data access, and prompts for guided workflows, with patterns for input validation, error handling, security, and debugging across TypeScript and Python.

mcp-builder provides methodology for constructing production-grade MCP servers that connect AI assistants to external capabilities.

AI-generated summary based on this skill's SKILL.md

7,277 707 MIT updated by jnMetaCode

Install

jnMetaCode/superpowers-zh/mcp-builder · repository language: JavaScript

git clone https://github.com/jnMetaCode/superpowers-zh
cp -r superpowers-zh/skills/mcp-builder ~/.claude/skills/mcp-builder
npx skillfed install jnMetaCode/superpowers-zh/mcp-builder

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to build MCP servers with tools, resources, and prompts?

mcp-builder teaches you to construct production-grade Model Context Protocol servers by defining tools for AI-driven operations, resources for read-only data access, and prompts for guided workflows. The skill covers systematic design patterns, implementation strategies in TypeScript and Python, and best practices for structuring each component to integrate seamlessly with AI assistants.

What are MCP server best practices for AI assistant integration?

mcp-builder emphasizes protocol design patterns that enable robust AI assistant integration. Key practices include clear tool definitions with proper schemas, efficient resource organization, well-crafted prompts that guide assistant behavior, and adherence to Model Context Protocol standards. The skill teaches how to balance functionality with maintainability and scalability.

How do I implement error handling and security in MCP services?

mcp-builder covers robust input validation using tools like Zod, comprehensive error handling strategies, and security guidelines for MCP servers. You'll learn to validate all inputs, handle edge cases gracefully, implement proper authentication and authorization patterns, and protect sensitive data throughout your MCP service lifecycle.

How can I test and debug MCP servers effectively?

mcp-builder teaches testing and debugging strategies including MCP Inspector tool usage for real-time server inspection, integration test approaches, and systematic debugging techniques. You'll learn to validate server behavior, identify issues early, and ensure reliability before production deployment.

What's the proper project structure for MCP server development?

mcp-builder guides you through structuring TypeScript and Python MCP projects with proper dependency management, clear separation of concerns, and organized file layouts. The skill covers configuration best practices, module organization, and setup patterns that support both development and production environments.

How do I deploy an MCP server to production?

mcp-builder teaches production deployment strategies including npm package management, environment configuration, lifecycle management, and monitoring approaches. You'll learn to prepare your server for production use, handle versioning, manage dependencies, and ensure your MCP service runs reliably in live environments.

SKILL.md

rendered from the published skill — quoted content, verbatim

MCP 服务器构建

系统化设计、实现、测试和部署 Model Context Protocol 服务器的方法论。

1. 协议核心概念

MCP 定义三种原语:

  • Tools(工具):AI 助手主动调用的函数,有副作用。如搜索、创建、删除操作。
  • Resources(资源):AI 助手只读访问的数据源,用 URI 标识。如 users://{id}/profile
  • Prompts(提示词模板):预定义交互模板,引导用户触发工作流。

选择原则: 执行操作 → Tool | 读取数据 → Resource | 引导交互 → Prompt

2. 项目结构规范

TypeScript
my-mcp-server/
├── src/
│   ├── index.ts          # 入口,注册 tools/resources
│   ├── tools/             # 按功能拆分
│   ├── resources/
│   └── lib/               # 客户端封装、校验逻辑
├── tests/
├── package.json
└── tsconfig.json

关键依赖:@modelcontextprotocol/sdk + zod

Python
my-mcp-server/
├── src/my_mcp_server/
│   ├── server.py
│   ├── tools/
│   └── lib/
├── tests/
└── pyproject.toml

关键依赖:mcp + pydantic

3. Tool 设计原则

命名
  • snake_case 格式,动词开头:search_userscreate_issuedelete_file
  • 名称自解释,AI 助手靠名称选工具,模糊命名导致误调用
参数
  • 每个参数有类型约束和 .describe() 描述
  • 可选参数给默认值,减少 AI 决策负担
  • 用枚举代替布尔开关

```typescript server.tool("search_issues", { query: z.string().describe("搜索关键词"),

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/mcp-builder/SKILL.md

Related skills

Tags

protocol-design ai-integration server-architecture validation-schemas production-deployment error-resilience security-hardening testing-patterns developer-tooling