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
agents@0.3.10, @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.
Cloudflare migration guide: https://developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2/
The MCP server instrumentation supports the v2
registerTool/registerResource/registerPromptAPI structurally, but our coverage is still pinned to2.0.0-alpha.2and 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 legacyinitializeexchange.Current gaps
agents@0.3.10,@modelcontextprotocol/sdkv1, and passes a server instance tocreateMcpHandler.mcp.protocol.versionormcp.client.*because extraction only reads legacyinitializemessages.mcp.server.*because server identity moved to result_meta.Proposed work
@modelcontextprotocol/server,@modelcontextprotocol/client, and@modelcontextprotocol/node2.0.0 packages.Cloudflare migration guide: https://developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2/