Title: Support stable MCP SDK v2 and Cloudflare stateless handlers · Issue #22878 · getsentry/sentry-javascript · GitHub
Open Graph Title: Support stable MCP SDK v2 and Cloudflare stateless handlers · Issue #22878 · getsentry/sentry-javascript
X Title: Support stable MCP SDK v2 and Cloudflare stateless handlers · Issue #22878 · getsentry/sentry-javascript
Description: 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-orient...
Open Graph Description: 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 st...
X Description: 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 st...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/22878
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support stable MCP SDK v2 and Cloudflare stateless handlers","articleBody":"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.\n\nCloudflare 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.\n\n## Current gaps\n\n- The Node MCP v2 E2E app uses alpha MCP packages.\n- The Cloudflare MCP E2E app uses `agents@0.3.10`, `@modelcontextprotocol/sdk` v1, and passes a server instance to `createMcpHandler`.\n- Modern requests do not populate `mcp.protocol.version` or `mcp.client.*` because extraction only reads legacy `initialize` messages.\n- Modern responses do not populate `mcp.server.*` because server identity moved to result `_meta`.\n- The modern stateless factory path is not covered end to end.\n\n## Proposed work\n\n- Update MCP v2 E2E coverage to exact stable `@modelcontextprotocol/server`, `@modelcontextprotocol/client`, and `@modelcontextprotocol/node` 2.0.0 packages.\n- Migrate the Cloudflare MCP E2E app to the Agents 0.20.x stateless factory API.\n- Extract modern protocol, client, and server metadata from the v2 request classification and result metadata.\n- Verify tool-call spans and output capture on the 2026-07-28 protocol.\n- Preserve and test legacy-compatible request behavior.\n\nCloudflare migration guide: https://developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2/","author":{"url":"https://github.com/sergical","@type":"Person","name":"sergical"},"datePublished":"2026-07-30T16:46:57Z","url":"https://github.com/getsentry/sentry-javascript/issues/22878"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:53a4ab76-a11f-4cc1-a42e-92ee77ec3bdb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F24:1D3CBE:905D90:C42001:6B044AC1 |
| html-safe-nonce | d27c51ff4506404ec873dd249853fc7cef9cd7b78e004f30c88c5d75bb7b5787 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjI0OjFEM0NCRTo5MDVEOTA6QzQyMDAxOjZCMDQ0QUMxIiwidmlzaXRvcl9pZCI6IjExODQ5OTUxNzExMTc1ODMwNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9555ad8f5429aecd2f61e61f3e9a478f0b896fc7cfabcebaf59cc9e87ad9fbba |
| hovercard-subject-tag | issue:5022030973 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/22878/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52d1bbebff11db08d1939152449971ecec09c092acab3f0c398a16640653eb9b/getsentry/sentry-javascript/issues/22878 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52d1bbebff11db08d1939152449971ecec09c092acab3f0c398a16640653eb9b/getsentry/sentry-javascript/issues/22878 |
| og:image:alt | 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 st... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sergical |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width