Agent skill

MCP Builder

by LeastBit in LeastBit/Claude_skills_zh-CN

构建高质量 MCP(模型上下文协议)服务器的指南,使 LLM 能够通过精心设计的工具与外部服务交互。在使用 Python (FastMCP) 或 Node/TypeScript (MCP SDK) 构建 MCP 服务器以集成外部 API 或服务时使用。

Apache-2.0Auto-check passedAgent Workflows

Install MCP Builder

skills CLI
$ npx skills add LeastBit/Claude_skills_zh-CN --skill mcp-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeastBit/Claude_skills_zh-CN mcp-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeastBit/Claude_skills_zh-CN.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mcp-builder .claude/skills/mcp-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-builder
GitHub stars
588
Token cost
~1.2k tokens
SKILL.md length
318 words
Files
10 (incl. scripts)
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

构建高质量 MCP(模型上下文协议)服务器的指南,使 LLM 能够通过精心设计的工具与外部服务交互。在使用 Python (FastMCP) 或 Node/TypeScript (MCP SDK) 构建 MCP 服务器以集成外部 API 或服务时使用。

  • Works in 4 steps: 工具检查:列出可用工具并了解其功能 → 内容探索:使用只读操作探索可用数据 → 问题生成:创建 10 个复杂、真实的问题 → …
  • Tasks that involve MCP servers
  • SKILL.md covers 概述, 🚀 高级工作流程 and 📚 文档库
  • Runs Python scripts from its folder; calls npm, npx and python; reaches raw.githubusercontent.com and modelcontextprotocol.io

What it does

MCP Builder is an agent skill from LeastBit/Claude_skills_zh-CN. 构建高质量 MCP(模型上下文协议)服务器的指南,使 LLM 能够通过精心设计的工具与外部服务交互。在使用 Python (FastMCP) 或 Node/TypeScript (MCP SDK) 构建 MCP 服务器以集成外部 API 或服务时使用。

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts (for example `reference/evaluation.md`, `reference/mcp_best_practices.md` and `reference/node_mcp_server.md`).

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol, TypeScript and Python. The repository describes itself as: Anthropics/skills中文学习版本 来自:https://github.com/anthropics/skills. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/mcp-builder”

Requirements

  • Python 3
  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 工具检查:列出可用工具并了解其功能
  2. 内容探索:使用只读操作探索可用数据
  3. 问题生成:创建 10 个复杂、真实的问题
  4. 答案验证:自己解答每个问题以验证答案

What it can do on your machine

Read from SKILL.md and the folder at commit 1ab2916. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • npm
    • npx
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com
    • modelcontextprotocol.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Builder loads about 1.2k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 318 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from LeastBit/Claude_skills_zh-CN at commit 1ab2916, republished under its Apache-2.0 licence (© LeastBit). 318 words, ~1,168 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-builder/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
mcp-builder
description
构建高质量 MCP(模型上下文协议)服务器的指南,使 LLM 能够通过精心设计的工具与外部服务交互。在使用 Python (FastMCP) 或 Node/TypeScript (MCP SDK) 构建 MCP 服务器以集成外部 API 或服务时使用。
license
完整条款见 LICENSE.txt

MCP 服务器开发指南

概述

创建 MCP(模型上下文协议)服务器,使 LLM 能够通过精心设计的工具与外部服务交互。MCP 服务器的质量取决于它能多好地使 LLM 完成实际任务。


流程

🚀 高级工作流程

创建高质量的 MCP 服务器包含四个主要阶段:

阶段一:深入研究与规划
1.1 理解现代 MCP 设计

API 覆盖 vs. 工作流工具: 在全面的 API 端点覆盖与专用工作流工具之间取得平衡。工作流工具对于特定任务可能更方便,而全面覆盖则给予代理灵活组合操作的能力。不同客户端的性能表现各异——某些客户端受益于结合基本工具的代码执行,而另一些则更适合使用高级工作流。当不确定时,优先考虑全面的 API 覆盖。

工具命名与可发现性: 清晰、描述性的工具名称有助于代理快速找到正确的工具。使用一致的前缀(例如 github_create_issue、github_list_repos)和面向动作的命名。

上下文管理: 代理受益于简洁的工具描述以及过滤/分页结果的能力。设计返回聚焦、相关数据的工具。某些客户端支持代码执行,这可以帮助代理高效地过滤和处理数据。

可操作的错误消息: 错误消息应引导代理找到解决方案,提供具体的建议和下一步操作。

1.2 学习 MCP 协议文档

浏览 MCP 规范:

从站点地图开始查找相关页面:https://modelcontextprotocol.io/sitemap.xml

然后使用 .md 后缀获取特定页面的 markdown 格式(例如 https://modelcontextprotocol.io/specification/draft.md)。

需要查阅的关键页面:

  • 规范概述和架构
  • 传输机制(流式 HTTP、stdio)
  • 工具、资源和提示定义
1.3 学习框架文档

推荐技术栈:

  • 语言:TypeScript(高质量 SDK 支持,在许多执行环境中兼容性良好,如 MCPB。此外 AI 模型擅长生成 TypeScript 代码,得益于其广泛使用、静态类型和良好的 lint 工具)
  • 传输:远程服务器使用流式 HTTP,采用无状态 JSON(相比有状态会话和流式响应,更易于扩展和维护)。本地服务器使用 stdio。

加载框架文档:

TypeScript(推荐):

  • TypeScript SDK:使用 WebFetch 加载 https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md
  • ⚡ TypeScript 指南 - TypeScript 模式和示例

Python:

  • Python SDK:使用 WebFetch 加载 https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md
  • 🐍 Python 指南 - Python 模式和示例
1.4 规划实现

理解 API: 查阅服务的 API 文档以识别关键端点、认证要求和数据模型。根据需要使用网络搜索和 WebFetch。

工具选择: 优先考虑全面的 API 覆盖。列出要实现的端点,从最常用的操作开始。


阶段二:实现
2.1 设置项目结构

参阅特定语言指南了解项目设置:

2.2 实现核心基础设施

创建共享工具:

  • 带认证的 API 客户端
  • 错误处理辅助函数
  • 响应格式化(JSON/Markdown)
  • 分页支持
2.3 实现工具

对于每个工具:

输入模式:

  • 使用 Zod(TypeScript)或 Pydantic(Python)
  • 包含约束和清晰的描述
  • 在字段描述中添加示例

输出模式:

  • 尽可能为结构化数据定义 outputSchema
  • 在工具响应中使用 structuredContent(TypeScript SDK 特性)
  • 帮助客户端理解和处理工具输出

工具描述:

  • 功能的简洁摘要
  • 参数描述
  • 返回类型模式

实现:

  • 对 I/O 操作使用 async/await
  • 使用可操作的消息进行适当的错误处理
  • 在适用的地方支持分页
  • 使用现代 SDK 时同时返回文本内容和结构化数据

注解:

  • readOnlyHint:true/false
  • destructiveHint:true/false
  • idempotentHint:true/false
  • openWorldHint:true/false

阶段三:审查与测试
3.1 代码质量

审查以下方面:

  • 无重复代码(DRY 原则)
  • 一致的错误处理
  • 完整的类型覆盖
  • 清晰的工具描述
3.2 构建与测试

TypeScript:

  • 运行 npm run build 验证编译
  • 使用 MCP Inspector 测试:npx @modelcontextprotocol/inspector

Python:

  • 验证语法:python -m py_compile your_server.py
  • 使用 MCP Inspector 测试

参阅特定语言指南了解详细的测试方法和质量检查清单。


阶段四:创建评估

实现 MCP 服务器后,创建全面的评估来测试其有效性。

加载 ✅ 评估指南 获取完整的评估指南。

4.1 理解评估目的

使用评估来测试 LLM 能否有效地使用您的 MCP 服务器回答真实、复杂的问题。

4.2 创建 10 个评估问题

要创建有效的评估,请遵循评估指南中概述的流程:

  1. 工具检查:列出可用工具并了解其功能
  2. 内容探索:使用只读操作探索可用数据
  3. 问题生成:创建 10 个复杂、真实的问题
  4. 答案验证:自己解答每个问题以验证答案
4.3 评估要求

确保每个问题:

  • 独立:不依赖于其他问题
  • 只读:只需要非破坏性操作
  • 复杂:需要多次工具调用和深度探索
  • 真实:基于人类实际关心的用例
  • 可验证:单一、明确的答案,可通过字符串比较验证
  • 稳定:答案不会随时间改变
4.4 输出格式

创建具有以下结构的 XML 文件:

xml
<evaluation>
  <qa_pair>
    <question>查找关于以动物代号命名的 AI 模型发布的讨论。有一个模型需要使用 ASL-X 格式的特定安全级别。以一种斑点野猫命名的模型被确定为什么数字 X?</question>
    <answer>3</answer>
  </qa_pair>
<!-- 更多 qa_pairs... -->
</evaluation>

参考文件

📚 文档库

在开发过程中根据需要加载这些资源:

核心 MCP 文档(首先加载)
  • MCP 协议:从 https://modelcontextprotocol.io/sitemap.xml 的站点地图开始,然后使用 .md 后缀获取特定页面
  • 📋 MCP 最佳实践 - 通用 MCP 指南,包括:
    • 服务器和工具命名约定
    • 响应格式指南(JSON vs Markdown)
    • 分页最佳实践
    • 传输选择(流式 HTTP vs stdio)
    • 安全和错误处理标准
SDK 文档(在阶段 1/2 期间加载)
  • Python SDK:从 https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md 获取
  • TypeScript SDK:从 https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md 获取
特定语言实现指南(在阶段 2 期间加载)
  • 🐍 Python 实现指南 - 完整的 Python/FastMCP 指南,包括:

    • 服务器初始化模式
    • Pydantic 模型示例
    • 使用 @mcp.tool 注册工具
    • 完整的工作示例
    • 质量检查清单
  • ⚡ TypeScript 实现指南 - 完整的 TypeScript 指南,包括:

    • 项目结构
    • Zod 模式模式
    • 使用 server.registerTool 注册工具
    • 完整的工作示例
    • 质量检查清单
评估指南(在阶段 4 期间加载)
  • ✅ 评估指南 - 完整的评估创建指南,包括:
    • 问题创建指南
    • 答案验证策略
    • XML 格式规范
    • 示例问题和答案
    • 使用提供的脚本运行评估

© LeastBit, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts) in skills/mcp-builder of LeastBit/Claude_skills_zh-CN.

  • SKILL.md
  • LICENSE.txt
  • reference/evaluation.md
  • reference/mcp_best_practices.md
  • reference/node_mcp_server.md
  • reference/python_mcp_server.md
  • scripts/connections.py
  • scripts/evaluation.py
  • scripts/example_evaluation.xml
  • scripts/requirements.txt

Open the folder on GitHubat commit 1ab2916

Compare with similar skills

MCP Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Builder this skillLeastBit/Claude_skills_zh-CN588—~1.2kAutomated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Create MCP Serversglittercowboy/taches-cc-resources2k—~1.5kAutomated safety check: PassMIT
Build MCP Serverbobmatnyc/claude-mpm155—~2kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/Kode-CLI5.2k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Create MCP Servers

    glittercowboy/taches-cc-resources

    Create Model Context Protocol (MCP) servers that expose tools, resources, and prompts to Claude.

    2k GitHub stars~1.5k tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Build MCP Server

    bobmatnyc/claude-mpm

    Create high-quality MCP servers that enable LLMs to effectively interact with external services.

    155 GitHub stars~2k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/Kode-CLI

    Guide to designing and building MCP servers: tool, resource and prompt design for agent usability, with TypeScript or Python implementation workflows.

    5.2k GitHub stars~1.9k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Developer

    Jeffallan/claude-skills

    Builds and debugs MCP servers and clients in TypeScript or Python, from tool and resource definitions to transport setup and inspector-based protocol checks.

    12k GitHub stars~1.5k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed

More from LeastBit/Claude_skills_zh-CN

All 16 skills in this repo
  • Skill Creator

    LeastBit/Claude_skills_zh-CN

    创建高效技能的指南。当用户想要创建新技能(或更新现有技能)以扩展 Claude 的能力,包括专业知识、工作流程或工具集成时,应使用此技能。

    588 GitHub stars~1.9k tokensUpdated 8 mo ago
    Auto-check passed
  • DOCX

    LeastBit/Claude_skills_zh-CN

    全面的文档创建、编辑和分析功能,支持修订追踪、批注、格式保留和文本提取。当 Claude 需要处理专业文档(.docx 文件)时使用:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理修订追踪,(4) 添加批注,或其他任何文档任务

    588 GitHub stars~1.3k tokensUpdated 8 mo ago
    Auto-check: notes
  • PDF

    LeastBit/Claude_skills_zh-CN

    全面的 PDF 操作工具包,用于提取文本和表格、创建新 PDF、合并/拆分文档以及处理表单。当 Claude 需要填写 PDF 表单或以编程方式大规模处理、生成或分析 PDF 文档时使用。

    588 GitHub stars~1.5k tokensUpdated 8 mo ago
    Auto-check passed
  • PPTX

    LeastBit/Claude_skills_zh-CN

    演示文稿创建、编辑和分析。当 Claude 需要处理演示文稿(.pptx 文件)时使用,包括:(1) 创建新演示文稿,(2) 修改或编辑内容,(3) 处理版式,(4) 添加批注或演讲者备注,或其他任何演示文稿任务

    588 GitHub stars~3.4k tokensUpdated 8 mo ago
    Auto-check: notes
  • Web Artifacts Builder

    LeastBit/Claude_skills_zh-CN

    用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建复杂的、多组件的 claude.ai HTML artifact 的工具套件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact - 不适用于简单的单文件 HTML/JSX artifact。

    588 GitHub stars~458 tokensUpdated 8 mo ago
    Auto-check passed
  • Webapp Testing

    LeastBit/Claude_skills_zh-CN

    使用 Playwright 与本地 Web 应用程序交互及进行测试的工具包。支持验证前端功能、调试 UI 行为、捕获浏览器截图以及查看浏览器日志。

    588 GitHub stars~604 tokensUpdated 8 mo ago
    Auto-check passed

Categories

Questions about MCP Builder

What does MCP Builder do?

构建高质量 MCP(模型上下文协议)服务器的指南,使 LLM 能够通过精心设计的工具与外部服务交互。在使用 Python (FastMCP) 或 Node/TypeScript (MCP SDK) 构建 MCP 服务器以集成外部 API 或服务时使用。. MCP Builder is an agent skill from LeastBit/Claude_skills_zh-CN.

When should I use MCP Builder?

MCP Builder fits situations like: tasks that involve MCP servers.

How do I install MCP Builder in Claude Code?

Run `npx skills add LeastBit/Claude_skills_zh-CN --skill mcp-builder -a claude-code`. Or copy the skill folder (skills/mcp-builder in LeastBit/Claude_skills_zh-CN) into .claude/skills/mcp-builder in your project. Claude Code loads it when a task matches its description.

How do I install MCP Builder in Codex?

Run `npx skills add LeastBit/Claude_skills_zh-CN --skill mcp-builder -a codex`. Or copy the skill folder (skills/mcp-builder in LeastBit/Claude_skills_zh-CN) into .agents/skills/mcp-builder in your project. Codex loads it when a task matches its description.

Can I use MCP Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeastBit/Claude_skills_zh-CN --skill mcp-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-builder, .gemini/skills/mcp-builder, .github/skills/mcp-builder and .opencode/skills/mcp-builder in your project.

What does MCP Builder need to run?

Going by SKILL.md and its folder, MCP Builder needs Python for the scripts in its folder and the command-line tools its instructions call (npm, npx and python). Our summary lists: Python 3; Node.js.

Does MCP Builder access the network?

SKILL.md names 2 domains. In commands or code: raw.githubusercontent.com and modelcontextprotocol.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is MCP Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does MCP Builder use?

MCP Builder is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Builder use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Builder?

Skills that share tags, products or a category with MCP Builder: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), Create MCP Servers (glittercowboy/taches-cc-resources, 2k stars) and Build MCP Server (bobmatnyc/claude-mpm, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Builder?

LeastBit (a GitHub user) maintains it in LeastBit/Claude_skills_zh-CN, which has 588 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on January 19, 2026.

Source: LeastBit/Claude_skills_zh-CN on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.