一键导入
mcp-builder
MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Senior agent organizer with expertise in assembling and coordinating multi-agent teams. Your focus spans task analysis, agent capability mapping, workflow design, and team optimization.
AI agent design principles. Agent loops, tool calling, memory architectures, multi-agent coordination, human-in-the-loop gates, and guardrails. Use when building AI agents, autonomous workflows, or any system where an LLM plans and executes multi-step tasks.
API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.
Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
| name | mcp-builder |
| description | MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices. |
| allowed-tools | Read, Write, Edit, Glob, Grep |
| version | 1.0.0 |
| last-updated | "2026-03-12T00:00:00.000Z" |
| applies-to-model | gemini-2.5-pro, claude-3-7-sonnet |
An MCP server exposes capabilities to AI assistants. Design tools the way you design a good API: clear contracts, predictable behavior, honest errors.
An MCP (Model Context Protocol) server gives an AI assistant structured access to:
A tool that does two things is a tool that confuses the model. Split tools when they serve different goals.
// ❌ Ambiguous — does it list AND filter?
{ name: "get_users", description: "Get users, optionally filtered by role" }
// ✅ Separate concerns
{ name: "list_users", description: "List all users with pagination" }
{ name: "find_users_by_role", description: "Find users matching a specific role" }
The AI reads descriptions to decide which tool to call. Write them for the AI, not for humans.
{
name: "search_products",
description: "Search products by keyword. Returns an array of matching product records " +
"with id, name, price, and stock. Use this for keyword search, not for fetching a " +
"specific product by ID — use get_product_by_id for that."
}
Every tool input must have a JSON Schema definition with:
inputSchema: {
type: "object",
required: ["query"],
properties: {
query: {
type: "string",
description: "Search keyword. Minimum 2 characters."
},
limit: {
type: "number",
description: "Maximum results to return. Default: 10. Max: 100.",
default: 10
}
}
}
When a tool fails, the AI needs to understand what went wrong and whether to retry.
// ❌ Useless error
throw new Error("Failed");
// ✅ Actionable error
return {
isError: true,
content: [{
type: "text",
text: "Product search failed: the search index is temporarily unavailable. " +
"Try again in a few seconds or use list_products for unfiltered results."
}]
};
Resources give the AI read-only access to data. Use them for content the AI needs to understand context, not for actions.
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const uri = request.params.uri;
if (uri.startsWith("product://")) {
const id = uri.replace("product://", "");
const product = await db.products.findById(id);
return {
contents: [{
uri,
mimeType: "application/json",
text: JSON.stringify(product, null, 2)
}]
};
}
});
MCP servers execute with user-level permissions and may have access to sensitive systems:
{
"mcpServers": {
"your-server": {
"command": "npx",
"args": ["-y", "your-mcp-package"],
"env": {
"API_KEY": "${YOUR_API_KEY}"
}
}
}
}
Place in ~/.cursor/mcp.json (Cursor) or ~/.gemini/antigravity/mcp_config.json (Antigravity).
When this skill produces or reviews code, structure your output as follows:
━━━ Mcp Builder Report ━━━━━━━━━━━━━━━━━━━━━━━━
Skill: Mcp Builder
Language: [detected language / framework]
Scope: [N files · N functions]
─────────────────────────────────────────────────
✅ Passed: [checks that passed, or "All clean"]
⚠️ Warnings: [non-blocking issues, or "None"]
❌ Blocked: [blocking issues requiring fix, or "None"]
─────────────────────────────────────────────────
VBC status: PENDING → VERIFIED
Evidence: [test output / lint pass / compile success]
VBC (Verification-Before-Completion) is mandatory. Do not mark status as VERIFIED until concrete terminal evidence is provided.
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
// VERIFY or check package.json / requirements.txt.Slash command: /review or /tribunal-full
Active reviewers: logic-reviewer · security-auditor
// VERIFY: [reason].Review these questions before confirming output:
✅ Did I rely ONLY on real, verified tools and methods?
✅ Is this solution appropriately scoped to the user's constraints?
✅ Did I handle potential failure modes and edge cases?
✅ Have I avoided generic boilerplate that doesn't add value?
CRITICAL: You must follow a strict "evidence-based closeout" state machine.