Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Leodorareluctant259/superpowers-zhnpx agentmods add skills/leodorareluctant259/superpowers-zh/mcp-builderWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/mcp-builder)<a href="https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/mcp-builder"><img src="https://agentmods.dev/badge/skills/leodorareluctant259/superpowers-zh/mcp-builder/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/mcp-builder"><img src="https://agentmods.dev/badge/skills/leodorareluctant259/superpowers-zh/mcp-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.02185 |
| Opus 5 | $0.00016 | $0.01092 |
| Sonnet 5 | $0.00006 | $0.00437 |
| Haiku 4.5 | $0.00003 | $0.00218 |
Grade A, and why
mcp-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
92% identical to mcp-builder — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 256 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 决策负担
- 用枚举代替布尔开关
server.tool("search_issues", {
query: z.string().describe("搜索关键词"),
status: z.enum(["open", "closed", "all"]).default("open").describe("状态筛选"),
limit: z.number().min(1).max(100).default(20).describe("返回上限"),
}, async ({ query, status, limit }) => { /* ... */ });
描述
说明用途 + 返回内容 + 限制,这是 AI 选择工具的关键依据:
server.tool("search_users",
"根据姓名或邮箱搜索用户。返回 ID、姓名、邮箱列表。模糊匹配,最多 50 条。",
schema, handler);
输出
- 结构化数据 → JSON,人类可读内容 → Markdown
- 始终用
content: [{ type: "text", text: "..." }]格式返回
4. 输入验证和错误处理
用 Zod/Pydantic 做 Schema 级校验,业务级校验放 handler 开头:
server.tool("get_user", { id: z.string() }, async ({ id }) => {
try {
const user = await db.getUser(id);
if (!user) {
return {
content: [{ type: "text", text: `用户 ${id} 不存在,请检查 ID。` }],
isError: true,
};
}
return { content: [{ type: "text", text: JSON.stringify(user, null, 2) }] };
} catch (err) {
return {
content: [{ type: "text", text: `查询失败:${err.message}` }],
isError: true,
};
}
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 256 lines · 32 tokens per session scan A 7306ea27d858
mcp-builder is a skill published in the GitHub repository Leodorareluctant259/superpowers-zh (5 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 2,185 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to mcp-builder, differing in 7 lines, and is treated as a copy.
Other skills, from other repositories
agents-sdk
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
supabase-cli
This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.
supabase-js
This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.
durable-objects
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
openobserve-api
This skill should be used when user asks to "query OpenObserve", "create OpenObserve dashboard", "edit OpenObserve panel", "fetch OpenObserve logs", "run OpenObserve search", "list OpenObserve streams", "ingest into OpenObserve", or works with OpenObserve Cloud / self-hosted via REST API. Covers auth, search/SQL…
lov-optimize-tauri-backend
Optimize Tauri backend architecture and development ergonomics for Tauri 2 apps, especially Rust restart pain, oversized src-tauri/src/lib.rs files, excessive #[tauri::command] surfaces, stringly invoke APIs, long IPC streams, and dev-state recovery. Use when the user asks about Tauri hot reload, Rust-side restarts…