agents-0-20-0-19-b
Claude Code's read-only tools, web search on, ludion sync off
Question
Does the Agents SDK MCP client still start every connection with initialize?
Answer key
- A correct answer says
- The Agents MCP client first probes with `server/discover` (stateless MCP, 2026-07-28) and falls back to the `initialize` handshake for older servers.
- The stale answer
- The MCP client always starts with an `initialize` handshake.
Answer
No, if you mean Cloudflare's Agents SDK. Since v0.20.0 (July 27, 2026), its MCP client first sends `server/discover` on each connection, which is part of the stateless MCP 2026-07-28 revision. It only falls back to the old `initialize` handshake on the same connection if the server doesn't support the new protocol. Existing `addMcpServer` calls don't need any protocol-version setting. That revision moves the protocol version, client info and capabilities into each request's `_meta`, so there's no session handshake to start with.
My only source for the SDK's behavior is Cloudflare's changelog; I didn't check its docs or the spec text. Some sources call 2026-07-28 a release candidate and others call it final. If you meant a different "Agents SDK", such as OpenAI's, I haven't checked it.
Sources:
- [Cloudflare changelog: Agents SDK v0.20.0 / MCP SDK v2](https://developers.cloudflare.com/changelog/post/2026-07-27-agents-sdk-v0.20.0-mcp-sdk-v2/)
- [releases.sh: MCP 2026-07-28 spec supported, McpAgent deprecated](https://releases.sh/release/rel_EvLBYcSXMjFqI7VN56Kup-mcp-2026-07-28-spec-supported-mcpagent-deprecated)
- [agentgateway: MCP spec compatibility](https://agentgateway.dev/docs/standalone/latest/mcp/spec-compatibility/)
- [The 2026-07-28 MCP Specification: A Stateless, Extensible Future](https://blog.mcpservers.org/posts/mcp-spec-2026-07-28)
- [MCP 2026-07-28: The Stateless Release Candidate, Explained](https://mcp.directory/blog/mcp-2026-07-28-release-candidate)Grade
correct
The judge's reason: It says the client first probes with server/discover (stateless MCP 2026-07-28) and falls back to initialize for older servers, matching the key.
Session log
Tool call: ToolSearch
{ "query": "select:WebSearch", "max_results": 1 }Tool output
{"type":"tool_reference","tool_name":"WebSearch"}Tool call: WebSearch
{ "query": "Agents SDK MCP client initialize handshake stateless MCP 2026", "mode": "standard" }Tool output
Web search results for query: "Agents SDK MCP client initialize handshake stateless MCP 2026" Links: [{"title":"stateless mcp how it changes the way agents call tools","url":"https://nango.dev/blog/stateless-mcp-how-it-changes-the-way-agents-call-tools"},{"title":"Back to AI guides","url":"https://betterstack.com/community/guides/ai/mcp-stateless/"},{"title":"MCP 2026-07-28 Support in AISIX AI Gateway","url":"https://api7.ai/blog/aisix-mcp-2026-07-28-stateless-protocol"},{"title":"The 2026-07-28 MCP Specification: A Stateless, Extensible Future","url":"https://blog.mcpservers.org/posts/mcp-spec-2026-07-28"},{"title":"mcp stateless","url":"https://azukiazusa.dev/en/blog/mcp-stateless"},{"title":"Table of contents","url":"https://www.creolestudios.com/?p=37432"},{"title":"mcp just went stateless what the 2026 spec actually changes for your servers","url":"https://hackernoon.com/mcp-just-went-stateless-what-the-2026-spec-actually-changes-for-your-servers"},{"title":"MCP 2026-07-28: What the Stateless Protocol Overhaul Means for Your Codex CLI MCP Servers","url":"https://codex.danielvaughan.com/2026/08/07/mcp-2026-07-28-stateless-protocol-codex-cli-paginated-discovery-multi-round-requests-migration/"},{"title":"MCP 2026-07-28: The Stateless Release Candidate, Explained","url":"https://mcp.directory/blog/mcp-2026-07-28-release-candidate"}] The search returned nothing specific to the Claude Agent SDK's MCP client. It did turn up consistent coverage of the MCP 2026-07-28 specification, which removes the initialize handshake. - **Handshake removed:** Several sources say the revision drops the `initialize`/`initialized` exchange and the `Mcp-Session-Id` header. One blog describes it as making the protocol stateless by default. - **Per-request metadata:** Protocol version, client identity, and capabilities now go in a `_meta` object on each request. Protocol version, client info, and capabilities now travel on _meta in every request. - **Capability discovery:** Capability queries move to a new method. One source says the server/discover method answers capability questions on demand rather than as a prerequisite. - **Client migration:** A gateway vendor notes the revision is breaking and that clients and servers won't upgrade on the same day. Its gateway serves both generations, so legacy clients keep the handshake while new clients call statelessly. - **Streams:** One source says broken SSE streams cannot resume. Clients issue a fresh request. - **Caveat on status:** One source calls 2026-07-28 now the current official version, while another describes a release candidate. I couldn't confirm the final status from these results. For the Agents SDK specifically, you'd need to check its changelog or release notes, since none of these results cover it. REMINDER: You MUST include the sources above in your response to the user using markdown hyperlinks.Tool call: WebSearch
{ "query": "Agents SDK MCP 2026-07-28 support changelog initialize server/discover", "mode": "standard" }Tool output
Web search results for query: "Agents SDK MCP 2026-07-28 support changelog initialize server/discover" Links: [{"title":"2026 07 27 agents sdk v0.20.0 mcp sdk v2","url":"https://developers.cloudflare.com/changelog/post/2026-07-27-agents-sdk-v0.20.0-mcp-sdk-v2/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/standalone/1.5.x/documentation/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/standalone/main/documentation/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/standalone/latest/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/standalone/latest/documentation/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/kubernetes/1.5.x/documentation/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/kubernetes/1.4.x/documentation/mcp/spec-compatibility/"},{"title":"spec compatibility","url":"https://agentgateway.dev/docs/standalone/main/mcp/spec-compatibility/"},{"title":"rel EvLBYcSXMjFqI7VN56Kup mcp 2026 07 28 spec supported mcpagent deprecated","url":"https://releases.sh/release/rel_EvLBYcSXMjFqI7VN56Kup-mcp-2026-07-28-spec-supported-mcpagent-deprecated"},{"title":"rel EvLBYcSXMjFqI7VN56Kup","url":"https://releases.sh/release/rel_EvLBYcSXMjFqI7VN56Kup"}] The main source is Cloudflare's changelog for Agents SDK v0.20.0, which adds client and server support for the MCP 2026-07-28 release candidate. Its client probes each connection with `server/discover`. If the server doesn't support the stateless protocol, the client falls back to the legacy `initialize` handshake on the same connection. Existing `addMcpServer` calls don't need a protocol-version setting. ([developers.cloudflare.com changelog](https://developers.cloudflare.com/changelog/post/2026-07-27-agents-sdk-v0.20.0-mcp-sdk-v2/)) Other points from the results: - **Stateless servers:** `createMcpHandler` now accepts a factory that builds a new server for each request. (Cloudflare changelog) - **McpAgent deprecated:** The release notes call McpAgent deprecated and feature-frozen, and recommend migrating to the stateless handler. ([releases.sh summary](https://releases.sh/release/rel_EvLBYcSXMjFqI7VN56Kup-mcp-2026-07-28-spec-supported-mcpagent-deprecated)) - **Protocol background:** agentgateway's docs say the 2026-07-28 revision makes MCP stateless and sessionless, keeps the older `initialize` flow working, and adds caching controls to responses such as `server/discover` and `tools/list`. ([agentgateway spec compatibility](https://agentgateway.dev/docs/standalone/latest/mcp/spec-compatibility/)) I ran one search, so I didn't check the Agents SDK's own docs or the official MCP spec text. The Cloudflare changelog is the only source describing the SDK's behavior directly. REMINDER: You MUST include the sources above in your response to the user using markdown hyperlinks.Agent
No, if you mean Cloudflare's Agents SDK. Since v0.20.0 (July 27, 2026), its MCP client first sends `server/discover` on each connection, which is part of the stateless MCP 2026-07-28 revision. It only falls back to the old `initialize` handshake on the same connection if the server doesn't support the new protocol. Existing `addMcpServer` calls don't need any protocol-version setting. That revision moves the protocol version, client info and capabilities into each request's `_meta`, so there's no session handshake to start with. My only source for the SDK's behavior is Cloudflare's changelog; I didn't check its docs or the spec text. Some sources call 2026-07-28 a release candidate and others call it final. If you meant a different "Agents SDK", such as OpenAI's, I haven't checked it. Sources: - [Cloudflare changelog: Agents SDK v0.20.0 / MCP SDK v2](https://developers.cloudflare.com/changelog/post/2026-07-27-agents-sdk-v0.20.0-mcp-sdk-v2/) - [releases.sh: MCP 2026-07-28 spec supported, McpAgent deprecated](https://releases.sh/release/rel_EvLBYcSXMjFqI7VN56Kup-mcp-2026-07-28-spec-supported-mcpagent-deprecated) - [agentgateway: MCP spec compatibility](https://agentgateway.dev/docs/standalone/latest/mcp/spec-compatibility/) - [The 2026-07-28 MCP Specification: A Stateless, Extensible Future](https://blog.mcpservers.org/posts/mcp-spec-2026-07-28) - [MCP 2026-07-28: The Stateless Release Candidate, Explained](https://mcp.directory/blog/mcp-2026-07-28-release-candidate)