MCP 02:MCP 的各类比对------和 Function Calling、A2A、Skill 到底什么关系
这是 MCP 专题的第二篇。入门篇讲了 MCP 是什么、协议怎么工作。这篇把 MCP 放进对比桌:它和 Function Calling 是什么关系?和 A2A 怎么分?和 Skill 会不会重复?传输层三个选哪个? 这四个对比是理解 MCP 在整个 Agent 生态里位置的钥匙------很多人工具都用上了,却说不清 MCP 到底替代了什么、补了什么。
一、先给一张"全家福":四个概念各管一段
MCP 常被拿来和三个概念比,但它们的职责完全不同。先摆位置:
#mermaid-svg-ZfvVXVjqzzyH3wPL{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ZfvVXVjqzzyH3wPL .error-icon{fill:#552222;}#mermaid-svg-ZfvVXVjqzzyH3wPL .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ZfvVXVjqzzyH3wPL .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .marker.cross{stroke:#333333;}#mermaid-svg-ZfvVXVjqzzyH3wPL svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ZfvVXVjqzzyH3wPL p{margin:0;}#mermaid-svg-ZfvVXVjqzzyH3wPL .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster-label text{fill:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster-label span{color:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster-label span p{background-color:transparent;}#mermaid-svg-ZfvVXVjqzzyH3wPL .label text,#mermaid-svg-ZfvVXVjqzzyH3wPL span{fill:#333;color:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .node rect,#mermaid-svg-ZfvVXVjqzzyH3wPL .node circle,#mermaid-svg-ZfvVXVjqzzyH3wPL .node ellipse,#mermaid-svg-ZfvVXVjqzzyH3wPL .node polygon,#mermaid-svg-ZfvVXVjqzzyH3wPL .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .rough-node .label text,#mermaid-svg-ZfvVXVjqzzyH3wPL .node .label text,#mermaid-svg-ZfvVXVjqzzyH3wPL .image-shape .label,#mermaid-svg-ZfvVXVjqzzyH3wPL .icon-shape .label{text-anchor:middle;}#mermaid-svg-ZfvVXVjqzzyH3wPL .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .rough-node .label,#mermaid-svg-ZfvVXVjqzzyH3wPL .node .label,#mermaid-svg-ZfvVXVjqzzyH3wPL .image-shape .label,#mermaid-svg-ZfvVXVjqzzyH3wPL .icon-shape .label{text-align:center;}#mermaid-svg-ZfvVXVjqzzyH3wPL .node.clickable{cursor:pointer;}#mermaid-svg-ZfvVXVjqzzyH3wPL .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .arrowheadPath{fill:#333333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZfvVXVjqzzyH3wPL .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ZfvVXVjqzzyH3wPL .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZfvVXVjqzzyH3wPL .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster text{fill:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL .cluster span{color:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ZfvVXVjqzzyH3wPL .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ZfvVXVjqzzyH3wPL rect.text{fill:none;stroke-width:0;}#mermaid-svg-ZfvVXVjqzzyH3wPL .icon-shape,#mermaid-svg-ZfvVXVjqzzyH3wPL .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZfvVXVjqzzyH3wPL .icon-shape p,#mermaid-svg-ZfvVXVjqzzyH3wPL .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ZfvVXVjqzzyH3wPL .icon-shape .label rect,#mermaid-svg-ZfvVXVjqzzyH3wPL .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZfvVXVjqzzyH3wPL .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ZfvVXVjqzzyH3wPL .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ZfvVXVjqzzyH3wPL :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Agent 系统
编排层: 怎么干活
接入层: 怎么连工具
协作层: Agent 之间怎么连
Skill 管剧本
MCP 管工具接入
Function Calling 管模型调工具
A2A 管 Agent 互连
- MCP 管"怎么连工具"(接入层,标准化)
- Function Calling 管"模型怎么发起调用"(模型 API 能力)
- A2A 管"Agent 怎么连 Agent"(协作层)
- Skill 管"怎么干活的剧本"(编排层)
四个概念不打架、不重复,各管一段。逐个对比。
二、MCP vs Function Calling:不是替代,是分层
这是最容易混的一对。很多人问:"有了 Function Calling,为什么还要 MCP?"
先看区别:
| 维度 | Function Calling | MCP |
|---|---|---|
| 本质 | 模型厂商的 API 能力 | 开放的协议标准 |
| 谁定的 | OpenAI 等模型厂商(闭源协议) | Anthropic 提出、社区共建(开放标准) |
| 工具定义 | 每个应用写死在自己代码里 | Server 动态暴露,客户端自动发现 |
| 作用范围 | 单机单模型 | 跨模型、跨应用复用 |
| 模型支持 | 各家格式不完全兼容 | 接一次,各家通用 |
再看关系(关键):它们不是二选一,是两层。
MCP Server 暴露工具 → 客户端把工具转成模型认识的 Function Calling 格式 → 模型通过 FC 发起调用 → 客户端转发给 MCP Server 执行。
一句话:MCP 是"工具的标准化接入层",Function Calling 是"模型发起的调用机制"。 MCP 站在 FC 的上游------先有 MCP 把工具统一起来,最终模型还是用它的 FC 语法去调用。
类比:FC 是"我说一句'上菜'服务员就懂"(某家餐厅的暗号),MCP 是"全行业统一了菜单格式"(所有餐厅的菜单都长一个样)。暗号在点菜时还得用,但菜单已经统一了。
为什么说 MCP 会"终结"各家私有协议? 因为工具接入层一旦标准化,各家模型只需要做好 FC 这一层,工具生态就能跨模型复用------以前"这个工具只支持 OpenAI"的局面被打破了。
三、MCP vs A2A:纵向连工具,横向连 Agent
A2A(Agent-to-Agent)是 Google 推的协议,名字就直白:Agent 之间的互操作标准。
#mermaid-svg-AS9wwU81EytBP8Rd{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-AS9wwU81EytBP8Rd .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-AS9wwU81EytBP8Rd .error-icon{fill:#552222;}#mermaid-svg-AS9wwU81EytBP8Rd .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-AS9wwU81EytBP8Rd .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-AS9wwU81EytBP8Rd .marker{fill:#333333;stroke:#333333;}#mermaid-svg-AS9wwU81EytBP8Rd .marker.cross{stroke:#333333;}#mermaid-svg-AS9wwU81EytBP8Rd svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-AS9wwU81EytBP8Rd p{margin:0;}#mermaid-svg-AS9wwU81EytBP8Rd .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-AS9wwU81EytBP8Rd .cluster-label text{fill:#333;}#mermaid-svg-AS9wwU81EytBP8Rd .cluster-label span{color:#333;}#mermaid-svg-AS9wwU81EytBP8Rd .cluster-label span p{background-color:transparent;}#mermaid-svg-AS9wwU81EytBP8Rd .label text,#mermaid-svg-AS9wwU81EytBP8Rd span{fill:#333;color:#333;}#mermaid-svg-AS9wwU81EytBP8Rd .node rect,#mermaid-svg-AS9wwU81EytBP8Rd .node circle,#mermaid-svg-AS9wwU81EytBP8Rd .node ellipse,#mermaid-svg-AS9wwU81EytBP8Rd .node polygon,#mermaid-svg-AS9wwU81EytBP8Rd .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-AS9wwU81EytBP8Rd .rough-node .label text,#mermaid-svg-AS9wwU81EytBP8Rd .node .label text,#mermaid-svg-AS9wwU81EytBP8Rd .image-shape .label,#mermaid-svg-AS9wwU81EytBP8Rd .icon-shape .label{text-anchor:middle;}#mermaid-svg-AS9wwU81EytBP8Rd .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-AS9wwU81EytBP8Rd .rough-node .label,#mermaid-svg-AS9wwU81EytBP8Rd .node .label,#mermaid-svg-AS9wwU81EytBP8Rd .image-shape .label,#mermaid-svg-AS9wwU81EytBP8Rd .icon-shape .label{text-align:center;}#mermaid-svg-AS9wwU81EytBP8Rd .node.clickable{cursor:pointer;}#mermaid-svg-AS9wwU81EytBP8Rd .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-AS9wwU81EytBP8Rd .arrowheadPath{fill:#333333;}#mermaid-svg-AS9wwU81EytBP8Rd .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-AS9wwU81EytBP8Rd .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-AS9wwU81EytBP8Rd .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-AS9wwU81EytBP8Rd .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-AS9wwU81EytBP8Rd .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-AS9wwU81EytBP8Rd .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-AS9wwU81EytBP8Rd .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-AS9wwU81EytBP8Rd .cluster text{fill:#333;}#mermaid-svg-AS9wwU81EytBP8Rd .cluster span{color:#333;}#mermaid-svg-AS9wwU81EytBP8Rd div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-AS9wwU81EytBP8Rd .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-AS9wwU81EytBP8Rd rect.text{fill:none;stroke-width:0;}#mermaid-svg-AS9wwU81EytBP8Rd .icon-shape,#mermaid-svg-AS9wwU81EytBP8Rd .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-AS9wwU81EytBP8Rd .icon-shape p,#mermaid-svg-AS9wwU81EytBP8Rd .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-AS9wwU81EytBP8Rd .icon-shape .label rect,#mermaid-svg-AS9wwU81EytBP8Rd .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-AS9wwU81EytBP8Rd .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-AS9wwU81EytBP8Rd .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-AS9wwU81EytBP8Rd :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} MCP 纵向
A2A 横向
Agent
工具/数据源
Agent A
Agent B
| 维度 | MCP | A2A |
|---|---|---|
| 连接对象 | Agent 连工具(上下级) | Agent 连 Agent(平级) |
| 方向 | 纵向(Agent → 工具) | 横向(Agent ↔ Agent) |
| 核心概念 | tools/resources/prompts | AgentCard(声明能力)、任务驱动 |
| 解决的问题 | 工具接入标准化 | Agent 互操作标准化 |
| 关系 | 互补,不替代 | 互补,不替代 |
一句话:MCP 解决"Agent 的手脚怎么装",A2A 解决"多个 Agent 之间怎么配合"。 一个 Agent 的每个工具可能都是 MCP 接的,而它和另一个 Agent 协作时走 A2A。两者可以同时存在,各管一段。
AgentCard 值得多说一句:A2A 里每个 Agent 像 MCP 的 Server 一样"自我声明"------我有哪些能力、支持什么任务格式,别的 Agent 连上就能发现。这个思路和 MCP 的 tools/list 同源,都是"动态发现"哲学的延伸。
四、MCP vs Skill:管"连上"和管"干活"
这对也容易混,因为都涉及工具。区别在于视角:
| 维度 | MCP | Skill |
|---|---|---|
| 管什么 | 怎么连工具(接入标准) | 怎么干活的剧本(编排知识) |
| 粒度 | 单个工具/资源的连接 | 多工具按流程串成的完整套路 |
| 类比 | 插座的规格 | 一份完整菜谱(先切菜、再炒、最后装盘) |
| 会不会重复 | 不会------连接和剧本是两个层面 | 不会 |
一个 Agent 的日常是:用 Skill 决定"按什么剧本干活",剧本里的每一步调工具时,工具通过 MCP 连上。 MCP 管"这些工具我怎么访问",Skill 管"这些工具我怎么组合"。
五、传输层三选一:stdio / SSE / streamable HTTP
最后一个比对是 MCP 内部的:三种传输方式怎么选。这是生产接入的实操题。
| 传输 | 适用 | 选它因为 | 不选它因为 |
|---|---|---|---|
| stdio | 本地工具(CLI、同机进程) | 进程隔离安全、延迟低、无网络暴露 | 只能本机,不能给远程 Agent 用 |
| SSE | 远程 HTTP 老环境 | 简单、浏览器生态成熟 | 单向流,服务端主动推送受限 |
| streamable HTTP | 远程 HTTP 新服务 | 双向流、支持服务端推送、是官方新标准 | 生态较新,老库支持不齐 |
选型口诀:本地用 stdio,远程优先 streamable HTTP,老环境兜底 SSE。
为什么从 SSE 演进到 streamable HTTP?因为 SSE 是"服务端单向往客户端推",很多 MCP 场景需要双向通信(比如工具执行中要多次回报进度)。streamable HTTP 补上了这个能力------这也是为什么新项目直接上 streamable。
追问链:更进一步的细节
追问 1:"一个 MCP Server 可以同时被多个模型用吗?"
→ 可以,这正是 MCP 的核心价值。同一个 Server 暴露标准接口,ChatGPT、Claude、自研 Agent 都能连。注意会话隔离------多个客户端同时连,Server 要按会话管理状态。
追问 2:"MCP 和 Function Calling 选哪个?"
→ 不是二选一。你的 Agent 要连自家几个固定工具、模型也固定 → 直接用 FC 就够,别上 MCP 增加复杂度;工具多、要复用、要开放生态 → 用 MCP 做接入层,FC 留作模型调用机制。
追问 3:"A2A 和 MCP 会二选一吗?"
→ 不会。它们解决不同问题:MCP 连工具,A2A 连 Agent。实际系统里通常 MCP 在内(Agent 接工具)、A2A 在外(多 Agent 协作),是叠层关系,不是竞争关系。
追问 4:"Skill 里调的工具一定要走 MCP 吗?"
→ 不一定。Skill 是剧本,工具是演员,MCP 只是给演员提供"标准上场通道"。你完全可以用普通函数调用实现工具,Skill 照样能编排它们。MCP 的好处是工具可复用、可动态发现,但这不是 Skill 的前提。
追问 5:"为什么说 MCP 是 Agent 的'生态位'之战?"
→ 因为接入层标准一旦定死,工具生态就往标准上聚集------谁掌握标准,谁掌握工具分发渠道。这也是为什么各大厂都在推自己的协议(OpenAI 有 AgentKit、Google 有 A2A、Anthropic 有 MCP)。对开发者来说,MCP 是目前生态最广、最容易复用的那个,押注它的风险最低。
总结:一句话记住它
MCP 管"怎么连工具"(标准化接入)、FC 管"模型怎么发起调用"(模型能力,MCP 最终还得走 FC)、A2A 管"Agent 怎么互连"(横向协作)、Skill 管"怎么干活的剧本"(编排)------四个概念各管一段,互补不重复。
下一篇是专题的收尾,也是生产里最要命的部分:MCP 是开放生态,工具能随便发布------恶意工具、鉴权裸奔、数据泄露,怎么防?
下一篇:《MCP 03:MCP 安全与生产落地------开放生态怎么防住恶意工具》