本文基于 Anthropic MCP 发布公告、Model Context Protocol 官方 2025-11-25 与 2026-07-28 规范、Google Developers Blog《Scaling AI Agent Infrastructure with the MCP Stateless updates》整理。
写作时间:2026-08-13。需要特别说明的是,Google 原文发布于 2026-08-05,当时仍称 2026-07-28 规范为 release candidate;但根据 MCP GitHub Releases 与官方规范站点,截至本文整理时,
2026-07-28已经是稳定版规范。

1. MCP 诞生之前:AI Agent 的 N x M 集成困境
在 MCP 出现之前,AI 应用要连接外部系统,通常要为每一种模型、每一种工具、每一种数据源分别写适配层。
一个聊天助手要访问 GitHub,需要 GitHub 插件;要访问 Slack,需要 Slack 插件;要查询数据库,需要数据库插件。换一个模型或换一个宿主应用,很多集成又要重写。随着企业内部系统越来越多,开发者面对的是典型的 N x M 问题:N 个 AI 应用乘以 M 个数据源,每一组组合都可能需要单独维护。
这也是 Anthropic 在 2024-11-25 发布 Model Context Protocol 时想解决的问题。MCP 的初始定位很清楚:它是一个开放标准,用来连接 AI 助手与数据所在的系统,包括内容仓库、业务工具和开发环境。它试图把分散的自定义集成,收敛成一个统一协议。
后来社区常把 MCP 类比成"AI 应用的 USB-C"。这个比喻并不完美,但抓住了核心:模型不应该为每个外设单独学习一套接口;外部工具也不应该为每个模型单独开发一个插件。
2. MCP 的基本模型:Host、Client、Server
MCP 的架构受 Language Server Protocol 启发,但服务对象从"编辑器与语言服务"变成了"LLM 应用与外部上下文"。
在 MCP 中有三个关键角色:
- Host:宿主应用,例如 Claude Desktop、IDE、Agent 平台或聊天应用。它负责用户界面、权限控制、上下文聚合和模型调用。
- Client:Host 内部创建的连接器。通常一个 Client 对应一个 Server,负责协议通信和安全边界隔离。
- Server:提供外部能力的服务。它可以暴露文件、数据库、API、业务系统或其他工具能力。
MCP Server 向 Client 暴露三类核心能力:
- Resources:上下文和数据,例如文件、数据库 schema、文档片段、业务对象。
- Prompts:可复用的提示词模板或工作流模板。
- Tools:可被模型调用的函数,例如查询数据库、创建工单、发起退款、执行搜索。
早期 MCP 的一个重要设计目标是"让服务器易于构建"。Server 不需要理解完整对话历史,也不应该看到其他 Server 的数据;Host 负责安全、授权和编排,Server 专注于自己那一块能力。
3. 第一阶段:本地优先、会话优先
MCP 的早期版本非常适合本地开发。典型场景是:一个桌面应用启动一个本地 MCP Server 子进程,通过 stdio 读写 JSON-RPC 消息。
这套模型简单、直接、好调试:
- Host 启动 Server。
- Client 与 Server 通过
initialize握手协商协议版本和能力。 - Server 返回自己支持的
tools、resources、prompts。 - 模型在用户授权下调用工具或读取资源。
到 2025-11-25 规范时,MCP 仍然明确使用"有状态连接"作为基础模型。Client 和 Server 会先进入初始化阶段,协商协议版本、能力和实现信息;随后进入正常操作阶段。对于 HTTP 传输,Server 还可以在初始化响应中返回 MCP-Session-Id,客户端后续请求必须携带这个会话 ID。

简化后的旧版初始化大致如下:
json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-11-25",
"capabilities": {},
"clientInfo": {
"name": "my-app",
"version": "1.0"
}
}
}
如果 Server 返回了 MCP-Session-Id,客户端之后调用 tools/call、resources/read 等接口时都要带上它。这在单机本地场景没有太大问题,甚至很自然:一个客户端连接一个服务器,状态就放在这条会话里。
用 HTTP 传输看,旧版远程 MCP 的一次工具调用通常会分成两段。
第一段:初始化会话
http
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-11-25",
"capabilities": {
"roots": {
"listChanged": true
}
},
"clientInfo": {
"name": "agent-host",
"version": "1.4.0"
}
}
}
Server 响应:
http
HTTP/1.1 200 OK
Mcp-Session-Id: sess-7f3a
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-11-25",
"capabilities": {
"tools": {
"listChanged": true
},
"resources": {}
},
"serverInfo": {
"name": "crm-mcp-server",
"version": "0.9.0"
}
}
}
第二段:携带会话 ID 调用工具
http
POST /mcp HTTP/1.1
Host: mcp.example.com
Mcp-Session-Id: sess-7f3a
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_customer",
"arguments": {
"email": "ada@example.com"
}
}
}
这种调用模型的关键点是:第二次请求是否能成功,不只取决于请求体本身,还取决于它是否被路由到保存 sess-7f3a 的服务器实例。
Pod B Pod A Load Balancer Client Pod B Pod A Load Balancer Client #mermaid-svg-SybLoyK4TF8DxTIA{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-SybLoyK4TF8DxTIA .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-SybLoyK4TF8DxTIA .error-icon{fill:#552222;}#mermaid-svg-SybLoyK4TF8DxTIA .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-SybLoyK4TF8DxTIA .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-SybLoyK4TF8DxTIA .marker{fill:#333333;stroke:#333333;}#mermaid-svg-SybLoyK4TF8DxTIA .marker.cross{stroke:#333333;}#mermaid-svg-SybLoyK4TF8DxTIA svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-SybLoyK4TF8DxTIA p{margin:0;}#mermaid-svg-SybLoyK4TF8DxTIA .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-SybLoyK4TF8DxTIA text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-SybLoyK4TF8DxTIA .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-SybLoyK4TF8DxTIA .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-SybLoyK4TF8DxTIA .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-SybLoyK4TF8DxTIA .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-SybLoyK4TF8DxTIA #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-SybLoyK4TF8DxTIA .sequenceNumber{fill:white;}#mermaid-svg-SybLoyK4TF8DxTIA #sequencenumber{fill:#333;}#mermaid-svg-SybLoyK4TF8DxTIA #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-SybLoyK4TF8DxTIA .messageText{fill:#333;stroke:none;}#mermaid-svg-SybLoyK4TF8DxTIA .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-SybLoyK4TF8DxTIA .labelText,#mermaid-svg-SybLoyK4TF8DxTIA .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-SybLoyK4TF8DxTIA .loopText,#mermaid-svg-SybLoyK4TF8DxTIA .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-SybLoyK4TF8DxTIA .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-SybLoyK4TF8DxTIA .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-SybLoyK4TF8DxTIA .noteText,#mermaid-svg-SybLoyK4TF8DxTIA .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-SybLoyK4TF8DxTIA .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-SybLoyK4TF8DxTIA .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-SybLoyK4TF8DxTIA .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-SybLoyK4TF8DxTIA .actorPopupMenu{position:absolute;}#mermaid-svg-SybLoyK4TF8DxTIA .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-SybLoyK4TF8DxTIA .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-SybLoyK4TF8DxTIA .actor-man circle,#mermaid-svg-SybLoyK4TF8DxTIA line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-SybLoyK4TF8DxTIA :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} initialize 转发到 Pod A 返回 Mcp-Session-Id: sess-7f3a tools/call + sess-7f3a 轮询转发到 Pod B Invalid session
问题在于,AI Agent 的使用场景很快从本地开发扩展到了云端。
4. 第二阶段:远程 MCP 与生产瓶颈
当 MCP Server 被部署到 Kubernetes、Cloud Run、Cloud Functions、API Gateway 或普通 HTTP 负载均衡器后,早期会话模型的成本开始显现。

Google 在大规模部署 MCP Server 时遇到的核心问题,可以概括为四类。
第一,普通负载均衡失效。
轮询负载均衡器并不知道哪个 Pod 保存了哪个会话。第一次请求到了 Server A,第二次请求可能被转发到 Server B。如果会话状态只存在 Server A 内存里,Server B 就无法继续处理。
第二,被迫使用粘性会话。
为了让请求总是回到同一个实例,平台团队不得不配置 sticky session。这样做会削弱流量均衡,影响自动扩缩容,也让热点实例更容易成为瓶颈。
第三,故障恢复变差。
如果保存会话的 Pod 崩溃或重启,会话状态立即消失。用户正在进行的 Agent 工作流会突然报错,体验很差。
第四,基础设施复杂度上升。
为了保存跨请求状态,团队可能引入 Redis、数据库或网关层状态管理。这样虽然能跑,但每次工具调用都可能多一次读写,延迟和运维成本都会上升。
换句话说,早期 MCP 解决了"模型如何接工具"的问题,却还没有完全解决"工具如何在云原生架构里大规模运行"的问题。
5. 2026-07-28:MCP 最大的一次协议转向
2026-07-28 规范是 MCP 自发布以来最重要的架构变化。它的核心方向是:移除协议层会话,让每一次请求都成为自包含请求。
官方 2026-07-28 规范把 MCP 的基础协议描述为:
- JSON-RPC 消息格式
- 无状态、自包含请求
- 按请求进行能力协商
这意味着旧版的 initialize / notifications/initialized 握手被移除,MCP-Session-Id 也从 Streamable HTTP 传输中删除。协议版本、客户端能力、客户端信息不再只在连接初始化时交换一次,而是放进每个请求的 _meta 中随请求发送。

新版工具调用大致如下:
http
POST /mcp HTTP/1.1
Host: mcp-server.example
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: search
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search",
"arguments": {
"q": "mcp stateless"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {},
"io.modelcontextprotocol/clientInfo": {
"name": "my-app",
"version": "1.0"
}
}
}
}
这里的变化不是语法小修,而是系统假设的改变:Server 不再依赖"我记得这个客户端是谁",而是根据"这个请求自己带来了足够信息"来处理。
更完整地看,新版无状态 MCP 的调用通常会变成下面这样。
第一步:可选地发现服务器能力
http
POST /mcp HTTP/1.1
Host: mcp.example.com
MCP-Protocol-Version: 2026-07-28
Mcp-Method: server/discover
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 1,
"method": "server/discover",
"params": {
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {},
"io.modelcontextprotocol/clientInfo": {
"name": "agent-host",
"version": "2.0.0"
}
}
}
}
Server 响应:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersions": ["2026-07-28"],
"capabilities": {
"tools": {
"listChanged": true
},
"resources": {}
},
"serverInfo": {
"name": "crm-mcp-server",
"version": "2.0.0"
}
}
}
第二步:直接发送自包含工具调用
http
POST /mcp HTTP/1.1
Host: mcp.example.com
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: search_customer
Content-Type: application/json
json
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_customer",
"arguments": {
"email": "ada@example.com"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {},
"io.modelcontextprotocol/clientInfo": {
"name": "agent-host",
"version": "2.0.0"
}
}
}
}
Server 响应:
json
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "找到客户 Ada Lovelace,客户等级 Enterprise。"
}
],
"_meta": {
"io.modelcontextprotocol/serverInfo": {
"name": "crm-mcp-server",
"version": "2.0.0"
}
}
}
}
注意这里没有 Mcp-Session-Id。请求到达 Pod A、Pod B 或 Pod C 都可以处理,因为协议上下文、客户端能力和业务参数都在当前请求里。
Pod B Pod A Load Balancer Client Pod B Pod A Load Balancer Client #mermaid-svg-pGMrOmt2OMWQg1MV{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-pGMrOmt2OMWQg1MV .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-pGMrOmt2OMWQg1MV .error-icon{fill:#552222;}#mermaid-svg-pGMrOmt2OMWQg1MV .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-pGMrOmt2OMWQg1MV .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-pGMrOmt2OMWQg1MV .marker{fill:#333333;stroke:#333333;}#mermaid-svg-pGMrOmt2OMWQg1MV .marker.cross{stroke:#333333;}#mermaid-svg-pGMrOmt2OMWQg1MV svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-pGMrOmt2OMWQg1MV p{margin:0;}#mermaid-svg-pGMrOmt2OMWQg1MV .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pGMrOmt2OMWQg1MV text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-pGMrOmt2OMWQg1MV .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-pGMrOmt2OMWQg1MV .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-pGMrOmt2OMWQg1MV #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-pGMrOmt2OMWQg1MV .sequenceNumber{fill:white;}#mermaid-svg-pGMrOmt2OMWQg1MV #sequencenumber{fill:#333;}#mermaid-svg-pGMrOmt2OMWQg1MV #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-pGMrOmt2OMWQg1MV .messageText{fill:#333;stroke:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pGMrOmt2OMWQg1MV .labelText,#mermaid-svg-pGMrOmt2OMWQg1MV .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .loopText,#mermaid-svg-pGMrOmt2OMWQg1MV .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-pGMrOmt2OMWQg1MV .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-pGMrOmt2OMWQg1MV .noteText,#mermaid-svg-pGMrOmt2OMWQg1MV .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-pGMrOmt2OMWQg1MV .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pGMrOmt2OMWQg1MV .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pGMrOmt2OMWQg1MV .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pGMrOmt2OMWQg1MV .actorPopupMenu{position:absolute;}#mermaid-svg-pGMrOmt2OMWQg1MV .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-pGMrOmt2OMWQg1MV .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pGMrOmt2OMWQg1MV .actor-man circle,#mermaid-svg-pGMrOmt2OMWQg1MV line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-pGMrOmt2OMWQg1MV :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} server/discover + _meta 任意实例处理 返回版本、能力、serverInfo tools/call + headers + _meta 另一个健康实例 正常返回工具结果
6. 具体变化一:从会话初始化变成 server/discover
旧版 MCP 用 initialize 做版本协商和能力协商。新版移除握手后,需要一个新的发现机制。
2026-07-28 加入了 server/discover。Server 必须实现这个 RPC,用来声明自己支持的协议版本、能力和身份信息。Client 可以在发送其他请求前先调用它,选择合适的协议版本;也可以把它作为兼容性探测手段,判断对端是新版无状态服务器还是旧版有状态服务器。
这使"发现"从连接生命周期的一部分,变成了显式可调用能力。它更适合 HTTP、Serverless 和多实例部署,因为任何实例都可以回答"我支持什么"。
7. 具体变化二:_meta 成为每个请求的协议上下文
新版 MCP 把协议上下文放进每个请求的 _meta.io.modelcontextprotocol/* 字段里,至少包括:
io.modelcontextprotocol/protocolVersionio.modelcontextprotocol/clientCapabilitiesio.modelcontextprotocol/clientInfo
Server 也可以在结果 _meta 中返回 io.modelcontextprotocol/serverInfo。
这让能力协商从"会话级"变成"请求级"。一个请求声明自己支持表单式 elicitation,另一个请求可以声明额外扩展能力。协议不再假设这些能力只能在连接开始时固定下来。
代价也很明确:请求会稍微变大,Client 和 Server 都必须在每次请求中处理版本与能力验证。但换来的收益是横向扩展、弹性伸缩和故障恢复能力。
8. 具体变化三:HTTP 头标准化,网关不用深度解析 JSON

2026-07-28 规范要求 Streamable HTTP POST 请求携带标准 MCP 请求头:
MCP-Protocol-Version:协议版本。Mcp-Method:JSON-RPC 方法,例如tools/call。Mcp-Name:被调用的工具、资源或提示词名称。
这些头部字段是请求体信息的镜像。请求体仍然是事实来源;如果头部和请求体不一致,Server 应拒绝请求,并返回对应的 HeaderMismatch 错误。
这项变化对企业基础设施很重要。API Gateway、WAF、负载均衡器、审计系统、限流系统可以直接根据 HTTP 头进行路由、限速、统计和日志记录,不必解析 JSON-RPC 请求体。MCP 因此更像一个真正能被平台治理的 HTTP 协议,而不是"把 JSON-RPC 塞进 HTTP 里"。
9. 具体变化四:缓存成为协议的一等考虑
在早期 MCP 中,tools/list、resources/list、prompts/list 这类列表请求往往需要频繁查询。客户端如果想知道列表是否变化,还可能依赖长连接或 SSE 通知。
2026-07-28 引入了 CacheableResult 思路:tools/list、prompts/list、resources/list、resources/read、resources/templates/list 等结果需要包含:
ttlMs:结果的新鲜度提示,单位为毫秒。cacheScope:缓存范围,通常是public或private。
这让 Client 可以放心缓存短期稳定的工具列表和资源列表,也让共享代理知道哪些结果可以跨用户缓存、哪些只能当前用户私有缓存。
对于大型 Agent 平台来说,这个变化会直接减少轮询请求和重复 token 上下文构建成本。尤其是工具列表稳定、调用频繁的场景,缓存会带来非常实际的吞吐收益。
一个新版 tools/list 响应可以像这样声明缓存策略:
json
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"tools": [
{
"name": "search_customer",
"description": "按邮箱查询客户信息",
"inputSchema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
}
},
"required": ["email"]
}
}
],
"_meta": {
"ttlMs": 300000,
"cacheScope": "private"
}
}
}
这里的含义是:客户端可以把这个工具列表缓存 5 分钟,但缓存范围是私有的,不应跨用户共享。
10. 具体变化五:订阅模型从 HTTP GET / resource subscribe 转为 subscriptions/listen
旧版 Streamable HTTP 允许 HTTP GET 打开 SSE 流,也支持 resources/subscribe 和 resources/unsubscribe。新版规范将这些收敛为 subscriptions/listen:客户端通过一个长生命周期的 POST 响应流,显式订阅自己关心的通知。
客户端可以选择订阅:
toolsListChangedpromptsListChangedresourcesListChangedresourceSubscriptions
请求范围内的进度通知和日志通知仍然跟随原始请求的响应流,而不是混入全局订阅流。
这个设计让通知关系更明确:客户端订阅了什么,服务器就发送什么;没有订阅的通知不应该被推送。它也更符合无状态核心,因为长期监听被限制在专门的订阅请求中,不再和普通工具调用混杂在一起。
11. 具体变化六:MRTR 解决无状态下的人机多轮交互
无状态协议最大的问题之一是:如果工具调用过程中需要用户补充信息,该怎么办?
例如,用户让 Agent 删除文件。Server 在执行前需要确认:"是否确认删除这 3 个文件?"旧版协议可以让 Server 在 SSE 流里发起服务器到客户端的请求。但这会让连接、会话和请求状态纠缠在一起。
2026-07-28 引入 Multi Round-Trip Requests,简称 MRTR。它的思路是:Server 不再主动向 Client 发起新请求,而是在当前响应里返回 InputRequiredResult。这个结果包含:
resultType: "input_required"inputRequests:需要客户端向用户询问的问题。requestState:Server 序列化后的恢复状态。
客户端拿到结果后,负责展示 UI、收集用户输入,然后用同一个业务请求再次发起调用,并带回:
inputResponses- 原样返回的
requestState

这个设计的关键是 requestState。它把"服务端记忆"变成了"客户端回传的显式状态"。因此第二次请求到达 Server A、Server B 还是 Server C 都不重要,只要 Server 能验证并解析 requestState,就能继续执行。

用删除文件这个例子看,第一次调用并不会直接执行危险操作,而是返回一个需要用户确认的结果:
json
{
"jsonrpc": "2.0",
"id": 10,
"result": {
"resultType": "input_required",
"inputRequests": [
{
"id": "confirm-delete",
"prompt": "确认删除 3 个文件吗?",
"schema": {
"type": "boolean"
}
}
],
"requestState": "eyJvcCI6ImRlbGV0ZSIsImZpbGVzIjpbIi4uLiJdfQ.sig"
}
}
客户端向用户展示确认 UI。用户选择确认后,客户端重新发起同一个工具调用,并把回答和 requestState 带回:
json
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "delete_files",
"arguments": {
"inputResponses": [
{
"id": "confirm-delete",
"value": true
}
],
"requestState": "eyJvcCI6ImRlbGV0ZSIsImZpbGVzIjpbIi4uLiJdfQ.sig"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {
"elicitation": {}
},
"io.modelcontextprotocol/clientInfo": {
"name": "agent-host",
"version": "2.0.0"
}
}
}
}
#mermaid-svg-B9OWZlcDg6M8bLH5{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-B9OWZlcDg6M8bLH5 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-B9OWZlcDg6M8bLH5 .error-icon{fill:#552222;}#mermaid-svg-B9OWZlcDg6M8bLH5 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-B9OWZlcDg6M8bLH5 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .marker.cross{stroke:#333333;}#mermaid-svg-B9OWZlcDg6M8bLH5 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-B9OWZlcDg6M8bLH5 p{margin:0;}#mermaid-svg-B9OWZlcDg6M8bLH5 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster-label text{fill:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster-label span{color:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster-label span p{background-color:transparent;}#mermaid-svg-B9OWZlcDg6M8bLH5 .label text,#mermaid-svg-B9OWZlcDg6M8bLH5 span{fill:#333;color:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .node rect,#mermaid-svg-B9OWZlcDg6M8bLH5 .node circle,#mermaid-svg-B9OWZlcDg6M8bLH5 .node ellipse,#mermaid-svg-B9OWZlcDg6M8bLH5 .node polygon,#mermaid-svg-B9OWZlcDg6M8bLH5 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .rough-node .label text,#mermaid-svg-B9OWZlcDg6M8bLH5 .node .label text,#mermaid-svg-B9OWZlcDg6M8bLH5 .image-shape .label,#mermaid-svg-B9OWZlcDg6M8bLH5 .icon-shape .label{text-anchor:middle;}#mermaid-svg-B9OWZlcDg6M8bLH5 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .rough-node .label,#mermaid-svg-B9OWZlcDg6M8bLH5 .node .label,#mermaid-svg-B9OWZlcDg6M8bLH5 .image-shape .label,#mermaid-svg-B9OWZlcDg6M8bLH5 .icon-shape .label{text-align:center;}#mermaid-svg-B9OWZlcDg6M8bLH5 .node.clickable{cursor:pointer;}#mermaid-svg-B9OWZlcDg6M8bLH5 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .arrowheadPath{fill:#333333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-B9OWZlcDg6M8bLH5 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-B9OWZlcDg6M8bLH5 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-B9OWZlcDg6M8bLH5 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster text{fill:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 .cluster span{color:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 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-B9OWZlcDg6M8bLH5 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-B9OWZlcDg6M8bLH5 rect.text{fill:none;stroke-width:0;}#mermaid-svg-B9OWZlcDg6M8bLH5 .icon-shape,#mermaid-svg-B9OWZlcDg6M8bLH5 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-B9OWZlcDg6M8bLH5 .icon-shape p,#mermaid-svg-B9OWZlcDg6M8bLH5 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-B9OWZlcDg6M8bLH5 .icon-shape .label rect,#mermaid-svg-B9OWZlcDg6M8bLH5 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-B9OWZlcDg6M8bLH5 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-B9OWZlcDg6M8bLH5 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-B9OWZlcDg6M8bLH5 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 否
是
Client 调用危险工具
Server 发现需要用户确认
返回 input_required
Client 展示确认 UI
用户是否同意?
Client 取消操作
Client 带 inputResponses 和 requestState 再次调用
任意 Server 实例验证 requestState
继续执行并返回结果
12. 具体变化七:Tasks 退出核心,成为官方扩展
很多工具调用天然不是即时完成的:数据库备份、CRM 同步、支付退款、长时间报表生成,都可能需要几十秒甚至更久。
旧版实验性 Tasks 与核心协议结合较深。2026-07-28 将 Tasks 移出核心协议,变成官方扩展 io.modelcontextprotocol/tasks。新版 Tasks 更强调异步执行和持久句柄:
- 长任务可以立即返回 task handle。
- 客户端通过
tasks/get查询状态。 - 需要中途补充输入时,通过
tasks/update传回信息。 - 阻塞式的
tasks/result被移除。 tasks/list被移除。
这很符合云原生系统的做法:请求负责启动任务,后台系统负责执行,客户端根据 task id 查询状态。协议核心保持轻量,长任务能力通过扩展进入。
例如,生成月度报表这种长任务可以先返回任务句柄:
json
{
"jsonrpc": "2.0",
"id": 20,
"method": "tools/call",
"params": {
"name": "generate_monthly_report",
"arguments": {
"month": "2026-07",
"format": "pdf"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {
"io.modelcontextprotocol/tasks": {}
},
"io.modelcontextprotocol/clientInfo": {
"name": "agent-host",
"version": "2.0.0"
}
}
}
}
Server 可以立即返回:
json
{
"jsonrpc": "2.0",
"id": 20,
"result": {
"taskId": "task-report-202607-9c21",
"status": "running"
}
}
之后客户端通过 tasks/get 查询:
json
{
"jsonrpc": "2.0",
"id": 21,
"method": "tasks/get",
"params": {
"taskId": "task-report-202607-9c21",
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {
"io.modelcontextprotocol/tasks": {}
},
"io.modelcontextprotocol/clientInfo": {
"name": "agent-host",
"version": "2.0.0"
}
}
}
}
#mermaid-svg-aCy9cV7D56nnvkfc{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-aCy9cV7D56nnvkfc .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-aCy9cV7D56nnvkfc .error-icon{fill:#552222;}#mermaid-svg-aCy9cV7D56nnvkfc .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-aCy9cV7D56nnvkfc .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-aCy9cV7D56nnvkfc .marker{fill:#333333;stroke:#333333;}#mermaid-svg-aCy9cV7D56nnvkfc .marker.cross{stroke:#333333;}#mermaid-svg-aCy9cV7D56nnvkfc svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-aCy9cV7D56nnvkfc p{margin:0;}#mermaid-svg-aCy9cV7D56nnvkfc .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-aCy9cV7D56nnvkfc .cluster-label text{fill:#333;}#mermaid-svg-aCy9cV7D56nnvkfc .cluster-label span{color:#333;}#mermaid-svg-aCy9cV7D56nnvkfc .cluster-label span p{background-color:transparent;}#mermaid-svg-aCy9cV7D56nnvkfc .label text,#mermaid-svg-aCy9cV7D56nnvkfc span{fill:#333;color:#333;}#mermaid-svg-aCy9cV7D56nnvkfc .node rect,#mermaid-svg-aCy9cV7D56nnvkfc .node circle,#mermaid-svg-aCy9cV7D56nnvkfc .node ellipse,#mermaid-svg-aCy9cV7D56nnvkfc .node polygon,#mermaid-svg-aCy9cV7D56nnvkfc .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-aCy9cV7D56nnvkfc .rough-node .label text,#mermaid-svg-aCy9cV7D56nnvkfc .node .label text,#mermaid-svg-aCy9cV7D56nnvkfc .image-shape .label,#mermaid-svg-aCy9cV7D56nnvkfc .icon-shape .label{text-anchor:middle;}#mermaid-svg-aCy9cV7D56nnvkfc .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-aCy9cV7D56nnvkfc .rough-node .label,#mermaid-svg-aCy9cV7D56nnvkfc .node .label,#mermaid-svg-aCy9cV7D56nnvkfc .image-shape .label,#mermaid-svg-aCy9cV7D56nnvkfc .icon-shape .label{text-align:center;}#mermaid-svg-aCy9cV7D56nnvkfc .node.clickable{cursor:pointer;}#mermaid-svg-aCy9cV7D56nnvkfc .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-aCy9cV7D56nnvkfc .arrowheadPath{fill:#333333;}#mermaid-svg-aCy9cV7D56nnvkfc .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-aCy9cV7D56nnvkfc .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-aCy9cV7D56nnvkfc .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aCy9cV7D56nnvkfc .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-aCy9cV7D56nnvkfc .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aCy9cV7D56nnvkfc .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-aCy9cV7D56nnvkfc .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-aCy9cV7D56nnvkfc .cluster text{fill:#333;}#mermaid-svg-aCy9cV7D56nnvkfc .cluster span{color:#333;}#mermaid-svg-aCy9cV7D56nnvkfc 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-aCy9cV7D56nnvkfc .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-aCy9cV7D56nnvkfc rect.text{fill:none;stroke-width:0;}#mermaid-svg-aCy9cV7D56nnvkfc .icon-shape,#mermaid-svg-aCy9cV7D56nnvkfc .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aCy9cV7D56nnvkfc .icon-shape p,#mermaid-svg-aCy9cV7D56nnvkfc .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-aCy9cV7D56nnvkfc .icon-shape .label rect,#mermaid-svg-aCy9cV7D56nnvkfc .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aCy9cV7D56nnvkfc .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-aCy9cV7D56nnvkfc .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-aCy9cV7D56nnvkfc :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 否
是
tools/call: 生成报表
Server 返回 taskId
后台任务执行
Client tasks/get 查询状态
完成了吗?
返回报表资源或结果
13. 具体变化八:安全边界更严格

MCP 的能力很强:它允许模型读取数据、调用 API、执行工具。因此安全模型必须足够明确。
2026-07-28 在授权和身份边界上做了多项增强:
- 授权服务器应在授权响应中包含
iss,客户端必须验证已出现的iss是否匹配记录的 issuer,降低重定向和授权混淆风险。 - 客户端凭据必须绑定到签发它们的授权服务器,不能拿一个授权服务器发的凭据去访问另一个授权服务器。
- MCP 客户端在动态注册时需要指定合适的
application_type,避免 OpenID Connect 中不同客户端类型的 redirect URI 规则冲突。 - 资源参数和 Resource Indicators 让 token 的目标 MCP Server 更明确,降低 confused deputy 风险。
同时,MCP 仍然强调一条底线:工具调用代表潜在的任意代码执行或外部系统操作,Host 应提供清晰 UI,让用户知道暴露了哪些工具、何时调用了工具,并能拒绝高风险操作。
14. 具体变化九:工具 schema 升级到完整 JSON Schema 2020-12
早期工具参数 schema 有较多限制。2026-07-28 放宽了 inputSchema 和 outputSchema,允许使用任意 JSON Schema 2020-12 关键字,并补充了 $ref 解析要求和组合关键字的资源限制。
这意味着工具可以表达更复杂的输入结构:
oneOfanyOfallOf$ref- 更丰富的嵌套对象和校验规则
对开发者而言,这让 MCP Tool 更接近真实 API 的参数建模方式。对模型而言,schema 越准确,工具调用越不容易生成错误参数。
15. 具体变化十:弃用策略正式建立

2026-07-28 还引入了正式的功能生命周期和弃用策略。功能状态分为:
ActiveDeprecatedRemoved
被弃用的功能至少有 12 个月迁移窗口。
本次进入弃用状态的关键能力包括:
- Roots:建议迁移到显式工具参数、资源 URI 或服务器配置。
- Sampling:建议直接调用 LLM Provider API。
- Logging :stdio 场景使用
stderr,云端结构化观测使用 OpenTelemetry。 - HTTP+SSE transport:自 2025-03-26 起已被弃用,现在在新生命周期政策下正式归类为 Deprecated,建议迁移到 Streamable HTTP。
- OAuth 2.0 Dynamic Client Registration:作为客户端注册机制被弃用,推荐迁移到 Client ID Metadata Documents。
这说明 MCP 正在从快速增长的开源协议,走向更稳定的标准化治理:功能不会突然消失,但新实现不应继续依赖已弃用能力。
16. 从"连接工具"到"运行基础设施"
把这些变化放在一起看,MCP 的演进路径很清晰。
2024-11-25 的 MCP,解决的是 AI 应用接入外部世界的问题。
它让工具、资源和提示词可以用统一协议暴露给模型,减少重复集成。
2025 年的 MCP,开始补齐远程服务、HTTP 传输、授权和交互能力。
它逐步从本地 stdio 走向远程部署,但仍保留较强的会话模型。
2026-07-28 的 MCP,重点转向生产级 Agent 基础设施。
它把协议核心变为无状态,让 MCP Server 可以自然运行在负载均衡器、Serverless、容器平台和企业 API 网关之后。
Google 那篇文章的价值就在这里:它不是单纯介绍一个协议字段变化,而是解释了为什么无状态是大规模 Agent 基础设施的前提。只要协议层依赖会话,平台团队就绕不开粘性路由、状态存储、恢复复杂度和连接管理。一旦请求自包含,MCP Server 就能像普通 HTTP 服务一样扩展。
17. 对开发者意味着什么
如果你正在开发 MCP Server,2026-07-28 之后应优先考虑以下实践:
- 不再把业务进度放在协议会话里;需要跨请求恢复时,使用显式 handle、task id 或
requestState。 - 为每个请求正确处理
_meta中的协议版本、客户端能力和客户端信息。 - 实现
server/discover,让客户端可以发现版本、能力和身份。 - 在 Streamable HTTP 中正确设置
MCP-Protocol-Version、Mcp-Method、Mcp-Name。 - 对列表和资源读取结果提供
ttlMs与cacheScope,让客户端缓存可控。 - 对需要用户输入的工具调用使用 MRTR,而不是依赖服务端主动请求或连接内状态。
- 对长任务使用 Tasks 扩展或等价的显式 task handle 模式。
- 不再为新实现引入 Roots、Sampling、Logging 等已弃用核心能力。
- 对工具参数使用更完整的 JSON Schema 2020-12,提高可验证性。
- 把 OAuth issuer、resource indicator、client credential 绑定等安全细节作为生产必需项,而不是可选优化。
如果你正在开发 MCP Client 或 Host,重点则是:
- 每次请求都附带协议版本和能力声明。
- 能处理
resultType: "complete"与resultType: "input_required"。 - 为 elicitation 提供清晰、可拒绝、可审查的用户界面。
- 对工具调用建立明确的人类确认策略,尤其是写操作和高风险操作。
- 尊重
ttlMs和cacheScope,避免无意义轮询。 - 对旧版 MCP Server 保持兼容探测,但把新协议作为默认演进方向。
下面这张迁移流程图可以作为工程落地时的检查顺序:
#mermaid-svg-NeuwvVPuNnkH24Zb{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-NeuwvVPuNnkH24Zb .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-NeuwvVPuNnkH24Zb .error-icon{fill:#552222;}#mermaid-svg-NeuwvVPuNnkH24Zb .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-NeuwvVPuNnkH24Zb .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-NeuwvVPuNnkH24Zb .marker{fill:#333333;stroke:#333333;}#mermaid-svg-NeuwvVPuNnkH24Zb .marker.cross{stroke:#333333;}#mermaid-svg-NeuwvVPuNnkH24Zb svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-NeuwvVPuNnkH24Zb p{margin:0;}#mermaid-svg-NeuwvVPuNnkH24Zb .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster-label text{fill:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster-label span{color:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster-label span p{background-color:transparent;}#mermaid-svg-NeuwvVPuNnkH24Zb .label text,#mermaid-svg-NeuwvVPuNnkH24Zb span{fill:#333;color:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb .node rect,#mermaid-svg-NeuwvVPuNnkH24Zb .node circle,#mermaid-svg-NeuwvVPuNnkH24Zb .node ellipse,#mermaid-svg-NeuwvVPuNnkH24Zb .node polygon,#mermaid-svg-NeuwvVPuNnkH24Zb .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-NeuwvVPuNnkH24Zb .rough-node .label text,#mermaid-svg-NeuwvVPuNnkH24Zb .node .label text,#mermaid-svg-NeuwvVPuNnkH24Zb .image-shape .label,#mermaid-svg-NeuwvVPuNnkH24Zb .icon-shape .label{text-anchor:middle;}#mermaid-svg-NeuwvVPuNnkH24Zb .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-NeuwvVPuNnkH24Zb .rough-node .label,#mermaid-svg-NeuwvVPuNnkH24Zb .node .label,#mermaid-svg-NeuwvVPuNnkH24Zb .image-shape .label,#mermaid-svg-NeuwvVPuNnkH24Zb .icon-shape .label{text-align:center;}#mermaid-svg-NeuwvVPuNnkH24Zb .node.clickable{cursor:pointer;}#mermaid-svg-NeuwvVPuNnkH24Zb .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-NeuwvVPuNnkH24Zb .arrowheadPath{fill:#333333;}#mermaid-svg-NeuwvVPuNnkH24Zb .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-NeuwvVPuNnkH24Zb .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-NeuwvVPuNnkH24Zb .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-NeuwvVPuNnkH24Zb .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-NeuwvVPuNnkH24Zb .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-NeuwvVPuNnkH24Zb .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster text{fill:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb .cluster span{color:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb 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-NeuwvVPuNnkH24Zb .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-NeuwvVPuNnkH24Zb rect.text{fill:none;stroke-width:0;}#mermaid-svg-NeuwvVPuNnkH24Zb .icon-shape,#mermaid-svg-NeuwvVPuNnkH24Zb .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-NeuwvVPuNnkH24Zb .icon-shape p,#mermaid-svg-NeuwvVPuNnkH24Zb .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-NeuwvVPuNnkH24Zb .icon-shape .label rect,#mermaid-svg-NeuwvVPuNnkH24Zb .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-NeuwvVPuNnkH24Zb .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-NeuwvVPuNnkH24Zb .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-NeuwvVPuNnkH24Zb :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 是
否
是
否
是
否
现有 MCP 实现
是否依赖 initialize 会话?
迁移到 server/discover + 每请求 _meta
检查 HTTP 头和缓存
是否有长任务?
引入 Tasks 扩展或 task handle
检查多轮用户输入
工具执行中是否需要用户确认?
使用 MRTR + requestState
检查安全与弃用功能
OAuth issuer / resource indicator / JSON Schema 2020-12
移除 Roots、Sampling、Logging 等新实现依赖
18. 结语:MCP 的重心变了
MCP 的第一阶段,是把 AI 模型从孤岛中接出来,让它们能访问真实工具和真实数据。这个阶段的关键词是"连接"。
MCP 的第二阶段,是让这些连接能够进入企业生产环境,在多实例、负载均衡、Serverless、安全网关和长任务系统中稳定运行。这个阶段的关键词是"基础设施"。
2026-07-28 规范的无状态更新,就是这个转折点。它让 MCP 不再只是本地 Agent 的插件协议,而开始具备成为云原生 Agent 基础设施标准的形态。
未来的 MCP Server,应该更像普通的可扩展 HTTP 服务:请求自包含,状态显式化,缓存可声明,安全边界清楚,长任务有句柄,多轮交互可恢复。
这就是 MCP 从"AI 的 USB-C"走向"Agent 时代基础协议"的关键一步。
参考资料
- Anthropic: Introducing the Model Context Protocol
- Model Context Protocol Specification 2025-11-25
- Model Context Protocol 2025-11-25 Lifecycle
- Model Context Protocol 2025-11-25 Transports
- Model Context Protocol Specification 2026-07-28
- Model Context Protocol 2026-07-28 Key Changes
- Model Context Protocol 2026-07-28 Architecture
- Model Context Protocol 2026-07-28 Transports
- Model Context Protocol 2026-07-28 Authorization
- Google Developers Blog: Scaling AI Agent Infrastructure with the MCP Stateless updates
- modelcontextprotocol/modelcontextprotocol GitHub Releases
on/2026-07-28/changelog) - Model Context Protocol 2026-07-28 Architecture
- Model Context Protocol 2026-07-28 Transports
- Model Context Protocol 2026-07-28 Authorization
- Google Developers Blog: Scaling AI Agent Infrastructure with the MCP Stateless updates
- modelcontextprotocol/modelcontextprotocol GitHub Releases