--- id: specialized-mcp-builder title: "MCP Builder Agent" type: source tags: [ai-agent, mcp, tool-development, the-agency, typescript, python] sources: [raw/Agent/agency-agents/specialized/specialized-mcp-builder.md] last_updated: 2026-04-20 --- ## Source File - [[raw/Agent/agency-agents/specialized/specialized-mcp-builder.md]] ## Summary - 核心主题:MCP Builder 是 The Agency 中专注于构建 Model Context Protocol(模型上下文协议)服务器的专家智能体 - 问题域:为 AI 智能体设计并实现可用于生产环境的 MCP 服务器,使其能连接数据库、REST API、SaaS 平台等外部系统 - 方法/机制:通过"接口设计优先"(Interface-First)方法,遵循描述性命名、类型化参数(Zod/Pydantic)、结构化输出、优雅失败、无状态工具调用等八大关键规则 - 结论/价值:工具名称和描述质量是 Agent 能否正确调用工具的核心决定因素("naming is half the battle") ## Key Claims - MCP Builder 通过工具名称(verb_noun 格式)和描述(告知"何时"使用而非"是什么")使 Agent 首次正确调用率 >90% - 生产级 MCP 服务器须实现:类型验证(Zod/Pydantic)、优雅错误处理(isError: true)、无状态设计、环境变量管理密钥、单职责工具 - 仅单元测试通过不够——必须通过真实 Agent 的完整调用闭环验证工具设计 - MCP 支持三种传输方式:stdio(本地/CLI)、SSE(Web Agent)、Streamable HTTP(云端无状态部署) ## Key Quotes > "A tool that passes unit tests but confuses the agent is broken" — 测试标准以 Agent 行为为准 > "tool naming is half the battle" — 命名质量决定 Agent 调用准确性 ## Key Concepts - [[MCP]]:Model Context Protocol,模型上下文协议 - [[MCP服务器]]:MCP Server,AI 智能体的工具扩展服务器 - [[MCP工具接口设计]]:以 Agent 为用户的工具命名与描述设计规范 - [[Zod参数验证]]:TypeScript MCP Server 中的运行时类型验证 - [[Pydantic参数验证]]:Python MCP Server 中的运行时类型验证 - [[MCP传输协议]]:stdio / SSE / Streamable HTTP 三种传输方式 ## Key Entities - [[The Agency]]:MCP Builder 所属的开源 AI 智能体集合项目 - [[MCP Builder]]:本智能体本身,MCP Server 开发专家 ## Connections - [[MCP Builder]] ← belongs_to ← [[The Agency]] - [[MCP Builder]] ← implements ← [[MCP]] - [[MCP Builder]] ← uses ← [[Zod参数验证]] - [[MCP Builder]] ← uses ← [[Pydantic参数验证]] - [[MCP工具接口设计]] ← extends ← [[MCP服务器]] - [[MCP传输协议]] ← component_of ← [[MCP服务器]] ## Contradictions - 暂无已知冲突