You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support stable MCP SDK v2 and Cloudflare stateless handlers #22878
The MCP server instrumentation supports the v2 registerTool / registerResource / registerPrompt API structurally, but our coverage is still pinned to 2.0.0-alpha.2 and the Cloudflare MCP E2E app still exercises the SDK v1, session-oriented handler path.
Cloudflare Agents 0.20.x now uses the split MCP SDK v2 packages and recommends stateless server factories passed to createMcpHandler. The modern MCP 2026-07-28 protocol also carries protocol and implementation metadata per request instead of through the legacy initialize exchange.
Current gaps
The Node MCP v2 E2E app uses alpha MCP packages.
The Cloudflare MCP E2E app uses [email protected], @modelcontextprotocol/sdk v1, and passes a server instance to createMcpHandler.
Modern requests do not populate mcp.protocol.version or mcp.client.* because extraction only reads legacy initialize messages.
Modern responses do not populate mcp.server.* because server identity moved to result _meta.
The modern stateless factory path is not covered end to end.
Proposed work
Update MCP v2 E2E coverage to exact stable @modelcontextprotocol/server, @modelcontextprotocol/client, and @modelcontextprotocol/node 2.0.0 packages.
Migrate the Cloudflare MCP E2E app to the Agents 0.20.x stateless factory API.
Extract modern protocol, client, and server metadata from the v2 request classification and result metadata.
Verify tool-call spans and output capture on the 2026-07-28 protocol.
Preserve and test legacy-compatible request behavior.
Activity
linear-code commentedon Jul 30, 2026
JS-3237
feat(core): Support stable MCP SDK v2 (#22883)