mcp-builder
它能做什么
这个技能引导为 Codewhale 应用创建和设置 Model Context Protocol 服务器。适合希望把自己的工具或服务连接到 AI 的开发者。
适用场景
- ✓当你想把 AI 连接到本地工具或外部服务的时候。
- ✓当某个现有的 MCP 服务器无法工作,需要调试的时候。
- ✓当你希望把 MCP 服务器的凭证排除在配置文件之外的时候。
技能链接
https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/mcp-builder/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请构建一个小型 MCP 服务器,让我的助手能在我们的数据库中查询订单状态?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会定义最少的工具,选择传输方式,实现服务器,用 Codewhale 的 MCP 命令进行注册,并测试一个成功案例和一个失败案例。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
MCP Builder
Use this skill when the user asks to create, configure, or debug an MCP server or tool integration.
Design Rules
- Prefer stdio MCP servers for local tools and HTTP/SSE for remote services.
- Keep tool schemas small, typed, and explicit. Return structured JSON where possible.
- Put secrets in environment variables, never in committed config.
- For HTTP/SSE clients, send
Accept: application/json, text/event-streamby default unless the server explicitly requires something else. - Add timeouts and clear error messages around external APIs.
Codewhale Setup
Common commands:
codewhale mcp init
codewhale mcp add my-server --command node --arg server.js
codewhale mcp add remote-server --url http://127.0.0.1:3000/mcp
codewhale mcp list
codewhale mcp validate
codewhale mcp tools
HTTP/SSE entries can include per-server headers in ~/.codewhale/mcp.json when
credentials or custom routing headers are required.
Workflow
- Define the service boundary and the minimum useful tools.
- Choose transport and credential handling.
- Implement the server using a maintained MCP SDK when available.
- Add the server with
codewhale mcp addor edit~/.codewhale/mcp.json. - Run
codewhale mcp validate, thencodewhale mcp tools. - Test one happy path and one failure path before calling it done.
常见问题
涵盖哪些传输方式?
技能涵盖用于本地工具的 stdio 服务器,以及用于远程服务的 HTTP 或 SSE 服务器。
机密信息应该放在哪里?
技能说明,应放在环境变量中,绝不放在已提交的配置里。
如何检查服务器?
技能使用 validate 和 tools 命令,并要求进行一次正常路径和一次失败路径的测试。
详情
作者的原始描述
Design, build, configure, or debug Model Context Protocol servers for codewhale, including stdio and HTTP/SSE transports.
repo: codewhale-hq/Codewhale
热度
- GitHub 星标
- 41k
- 排名
- #6541
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …