Skip to content

Methodology for building production-ready MCP servers, covering tool design, error handling, testing, and deployment.

CCM score
68 of 100
skills.sh installs
979
GitHub stars
8.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the protocol primitives (Tools, Resources, Prompts), project layout for TypeScript and Python, and tool naming, parameter, and description conventions
  • Includes Zod and Pydantic validation patterns, four error-handling rules with isError: true responses, lifecycle and graceful shutdown, and security guidance
  • Enforces stdio-safe logging by forbidding console.log and tests tools with unit, integration, and MCP Inspector checks before release
  • Designed for developers shipping MCP servers to npm, pip, or Docker and connecting them to AI assistants

Install

$ npx -y skills add jnmetacode/superpowers-zh --skill mcp-builder -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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_users、create_issue、delete_file
  • 名称自解释,AI 助手靠名称选工具,模糊命名导致误调用

参数

  • 每个参数有类型约束和 .describe() 描述
  • 可选参数给默认值,减少 AI 决策负担
  • 用枚举代替布尔开关

Details

Repository
github.com/jnmetacode/superpowers-zh
Categories
Skill & Plugin Building, Backend & APIs
First seen
Jun 3, 2026

Questions

What is the mcp-builder skill for?

mcp-builder is a methodology skill for building production-grade MCP servers, covering tool design, error handling, transport choice and testing. It helps an AI assistant connect to external capabilities through MCP tools that you build yourself.

How do I install the mcp-builder skill?

Run npx -y skills add jnmetacode/superpowers-zh --skill mcp-builder -y in a project to install it. After that, mcp-builder guides the agent through designing, implementing and testing an MCP server.

Which skills lead the Skill & Plugin Building category that mcp-builder belongs to?

Among Skill & Plugin Building skills, mcp-builder sits alongside find-skills, writing-for-agents, lark-skill-maker, skill-creator and discover-azure-skills. Where mcp-builder stands apart is its focus on MCP servers, covering tool naming, Zod or Pydantic validation, stdio debugging with the MCP Inspector, and npm or pip distribution.

What does mcp-builder need before I use it?

mcp-builder itself is a set of guidelines, so it needs no API key. A server built with it typically uses the TypeScript SDK with zod or the Python mcp package with pydantic, plus Node.js or Python to run it.

More from jnmetacode/superpowers-zh

All 20

Similar to Mcp Builder

More Skill & Plugin Building