
新的模型上下文协议修订版取消了有状态会话的要求——这部分内容使得MCP在负载均衡器后难以扩展。在纸面上是一个小的变化;但在部署上是一个大的变化。
用简单的语言来说。 让AI助手调用外部工具的规范——模型上下文协议(MCP)刚刚发布了一个修订版,该版本取消了客户端和服务器之间需要状态连接的要求。这是企业基础设施团队一直在等待的变化。
原始的MCP传输假设了一个持久的客户端-服务器会话。如果你的助手需要调用工具,助手和工具会在交互过程中共享一个实时通道。在笔记本电脑上运行没问题;但在大规模部署时会变得尴尬。
尴尬之处在于,一旦你在它前面放置一个负载均衡器,问题就暴露出来了。状态会话意味着每个后续调用都必须落在相同的后端实例上。这破坏了企业基础设施中最便宜的部署模式——将请求喷射到无状态池中,根据负载自动扩展,容忍节点丢失。最终,你不得不构建会话亲和性的临时解决方案、粘性路由,或者更糟,成为单点故障(SPOF)的连接管理器。
根据报道,修订后的传输允许服务器广告无状态模式。在实践中:
# 之前(改写)
POST /mcp/session → session_id
POST /mcp/call { session_id, tool, args } # 必须命中同一节点
POST /mcp/close { session_id }
# 之后 - 无状态模式
POST /mcp/call { tool, args, ctx } # 任何节点,无会话 ctx 是客户端推送的、服务器需要了解之前轮次的任何内容的部分。这与REST API二十年前达成的共识相同——以稍大的请求为代价换取无状态。
无状态并非免费。两件事移动到客户端:
对于大多数企业部署,这个权衡是值得的。对于低延迟的助手,其中往返字节很重要,这是一个真实的成本。
MCP生态系统的讨论一直围绕着“从原型质量”到“我们实际上可以将其放在SRE团队背后”的管道成熟。无状态传输是朝着这个方向的具体步骤。它也告诉你规范作者认为增长在哪里:在企业内部,在代理背后,而不是在个人开发者的机器上。
对于一个构建者:如果你发布了一个MCP集成并遇到了会话亲和性问题,修复方案现在是规范认可的,而不是特制的。对于一个决策者:MCP现在变得采购友好。预计供应商会像他们过去宣传REST原生一样宣传“MCP原生”。
本文由人工智能撰写,并经人工编辑审核。
I'm interested to know if this change will simplify the architecture for MCP deployments in cloud environments.
It should, but let's see how it impacts existing integrations first.
Great to see MCP moving towards statelessness. I'm curious about the performance impact on session recovery during failover.
I'm curious about the impact on session persistence. Will this change affect how MCP handles user sessions across different servers?
This change is a game-changer for MCP scalability. Wondering if there are any plans to address the security implications of going stateless?
I wonder how this change will affect the existing stateful session implementations. Will there be a migration path or will it be a complete overhaul?
I'm glad to see this change. I wonder how it will impact session management for users during failover scenarios.
It should improve failover scenarios by reducing session state dependencies, but testing will be key.
This is a significant step forward for MCP. I'm curious, though, how this change will affect existing deployments? Will migration be seamless or will there be challenges?
Great to see MCP finally dropping the stateful session requirement. This should make scaling behind a load balancer much easier.
MCP : la plomberie des agents devient un vrai marché