AI Skills AI技能 6h ago Updated 2h ago 更新于 2小时前 50

MCP 2.0? What Changed, What Remained, and How it Impacts Practitioners MCP 2.0?变了什么、没变什么,以及对从业者的影响

MCP's 2026-07-28 revision is a deliberately breaking update that removes protocol sessions, the initialize handshake, and long-lived server-initiated streams, transforming MCP into a stateless, load-balanced HTTP workload The protocol now mandates a single OAuth profile with zero-prior-relationship connection support, making authentication the primary differentiator from plain REST APIs State was not eliminated but relocated from transport-level session IDs to server-minted handles embedded in t MCP于2026年7月28日发布首个破坏性修订,核心变化是消除协议层状态(删除握手、Session-ID和长连接流),使MCP成为"一等公民HTTP工作负载" 修订后MCP本质上是"HTTP上的OAuth配置+生态",而非全新协议类型;其核心价值在于强制统一的认证配置、工具风险词汇表和跨客户端UI嵌入能力 无状态化带来部署简化(可直连负载均衡器、无需Redis会话存储),但引入重大幂等性风险:重试模式无去重语义,副作用工具必须自行实现应用层幂等键 项目采用日期版本而非v2命名,无固定发布周期;托管于Linux Foundation旗下Agentic AI Foundation(与A2A同董事会

68
Hot 热度
78
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • MCP's 2026-07-28 revision is a deliberately breaking update that removes protocol sessions, the initialize handshake, and long-lived server-initiated streams, transforming MCP into a stateless, load-balanced HTTP workload
  • The protocol now mandates a single OAuth profile with zero-prior-relationship connection support, making authentication the primary differentiator from plain REST APIs
  • State was not eliminated but relocated from transport-level session IDs to server-minted handles embedded in tool arguments, creating new prompt injection attack surfaces
  • The revision introduces a structural correctness risk: with stream resumability removed and the new MRTR retry pattern, side-effecting tools (e.g., refunds) can execute multiple times unless application-level idempotency keys are explicitly implemented
  • MCP is now best understood as an HTTP profile plus ecosystem rather than a fundamentally different architecture, with major AI clients (Claude, ChatGPT, Copilot, VS Code) already supporting it

Why It Matters

This revision fundamentally shifts MCP from a protocol requiring custom infrastructure to one that fits within existing enterprise API gateways, WAFs, and observability pipelines—making adoption significantly easier for regulated enterprises while introducing non-trivial correctness and security risks that platform teams must address proactively.

Technical Details

  • Stateless architecture: The initialize handshake and Mcp-Session-Id are removed; every request now carries its own protocol version and capabilities, enabling deployment behind plain load balancers without session stores (GitHub reportedly deleted their Redis tier)
  • HTTP-first design: Method and tool names are mirrored into required Mcp-Method and Mcp-Name HTTP headers, with opt-in x-mcp-header for tool parameter mirroring, allowing gateways to route, rate-limit, and log without JSON-RPC body parsing
  • MRTR (Mid-Request Tool Response) pattern: Replaces server-initiated streams; servers return input_required for confirmations/forms, and clients re-send the full original request under a new ID with answers attached—no idempotency key or dedup semantics defined by the protocol
  • Mandatory OAuth profile: Resource server pattern with protected resource metadata, resource indicators, mandatory issuer validation, and portable client identity via Client ID Metadata Documents where client_id is an HTTPS URL hosting metadata
  • Tool annotation risk vocabulary: readOnlyHint, destructiveHint, idempotentHint, and openWorldHint enable composition-aware auto-approval policies that OpenAPI cannot express
  • MCP Apps: Servers can deliver interactive HTML rendered in sandboxed iframes within Claude, ChatGPT, Copilot, or VS Code under host-constructed CSP, with tool calls flowing through the same audit path as model outputs
  • Cache scope hints: New mandatory cacheScope includes a public scope permitting shared intermediary caching—misclassification on authenticated per-tenant data creates cross-tenant disclosure vulnerabilities

Industry Insight

  • Adopt MCP as an ecosystem decision, not an architectural one: The "just REST" critique is technically valid but misses that the novel auth profile, risk vocabulary, and cross-client reach make adoption strategically valuable—treat it like OpenID Connect, not a database selection
  • Implement idempotency keys before scaling: The MRTR retry pattern means every side-effecting tool must carry an application-level idempotency key derived from business operations, not request IDs; this is now a hard requirement in regulated enterprise standards and should be enforced before estate growth makes audits costly
  • Cache classification and handle binding are new reviewer responsibilities: The public cache scope on authenticated tool lists can create silent cross-tenant data leaks, and server-minted handles traveling through model context are vulnerable to prompt injection—both require explicit classification reviews and principal-bound handle validation in server standards

TL;DR

  • MCP于2026年7月28日发布首个破坏性修订,核心变化是消除协议层状态(删除握手、Session-ID和长连接流),使MCP成为"一等公民HTTP工作负载"
  • 修订后MCP本质上是"HTTP上的OAuth配置+生态",而非全新协议类型;其核心价值在于强制统一的认证配置、工具风险词汇表和跨客户端UI嵌入能力
  • 无状态化带来部署简化(可直连负载均衡器、无需Redis会话存储),但引入重大幂等性风险:重试模式无去重语义,副作用工具必须自行实现应用层幂等键
  • 项目采用日期版本而非v2命名,无固定发布周期;托管于Linux Foundation旗下Agentic AI Foundation(与A2A同董事会)
  • 学术研究表明OpenAPI自动转MCP成功率约76%(修复后94%),但真实MCP服务器中仅<5%为自动生成,剩余为产品工作

为什么值得看

本文从大型受监管企业运营者视角深度解析MCP协议演进,揭示其从"有趣但难运维"到"平庸但契合现有平台控制"的设计哲学转变,为AI从业者提供协议采用决策的关键框架。对正在评估MCP集成或迁移的企业而言,本文指出的幂等性陷阱和缓存作用域风险是必须前置处理的架构债务。

技术解析

  • 无状态化改造:删除initialize握手和Mcp-Session-Id,每个请求携带自身协议版本和能力声明;长通知流替换为请求作用域流和可选监听流;状态从传输层迁移至数据模型(通过显式服务器生成的句柄作为工具参数传递)
  • HTTP优先设计:方法名和工具名镜像至Mcp-Method/Mcp-Name HTTP头,支持x-mcp-header opt-in机制透传工具参数,使网关可无需解析JSON-RPC体即可路由、限流和日志记录
  • 认证与风险词汇表:强制采用OAuth资源服务器模式(含资源指示器、发行方验证、Client ID Metadata文档);工具注解(readOnlyHint/destructiveHint/idempotentHint/openWorldHint)支持基于上下文的组合风险评估
  • MCP Apps UI嵌入:服务器可交付沙盒HTML至Claude/ChatGPT/Copilot/VS Code等客户端,CSP由宿主构建,工具调用与模型调用共享审计路径
  • 幂等性风险机制:流恢复能力消失,MRTR重试模式无去重语义;服务器通过input_required触发客户端重发完整请求,副作用工具需自行实现基于业务操作的幂等键

行业启示

  • 协议采用策略转变:MCP已从"需要特殊基础设施的协议"转变为"HTTP上的生态配置",企业应采用OpenID Connect式的务实态度——为可达性和认证配置采用,而非浪漫化其技术独特性
  • 架构治理前置:受监管企业应将缓存作用域分类、句柄绑定认证主体、副作用工具幂等键纳入强制标准,避免技术债务在生态扩张后审计成本激增
  • 自动化生成的现实边界:OpenAPI转MCP可作为起点,但工具粒度、命名、模型描述和认证配置仍需产品级投入;API产品负责人应直接拥有MCP呈现层而非依赖自动生成

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent Security 安全 Deployment 部署 Programming 编程 Research 科学研究