Skip to content

docs: plan migration to MCP 2026-07-28 and official SDK v2 - #321

Draft
tomber wants to merge 2 commits into
devfrom
cursor/plan-mcp-2026-07-28-sdk-v2-migration-8b88
Draft

docs: plan migration to MCP 2026-07-28 and official SDK v2#321
tomber wants to merge 2 commits into
devfrom
cursor/plan-mcp-2026-07-28-sdk-v2-migration-8b88

Conversation

@tomber

@tomber tomber commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds .cursor/plans/mcp_2026_07_28_sdk_v2_migration.plan.md — a migration plan for the MCP 2026-07-28 protocol revision and the official TypeScript SDK v2.

Planning only. No source changes.

Headline finding: the 2026-07-28 revision is only reachable through SDK v2, which replaces the single @modelcontextprotocol/sdk package with a scope of split packages (@modelcontextprotocol/core, /server, /client, /node, /express, …). Published v1 1.29.x tops out at protocol 2025-11-25, so there is no incremental path.

Recommendation: single clean cut to v2, no dual-targeting. v1 and v2 objects cannot cross (instanceof and nominal types do not survive the boundary), so supporting both means two parallel implementations of the handler, tool registration and server builder selected at build time. We are pre-revenue on these packages, @solvapay/mcp is 0.2.8, and integrators who cannot move keep installing the v1 peer under its own name. Deprecate 0.2.x, ship 0.3.0.

Scheduling constraint is upstream, not us. @modelcontextprotocol/ext-apps@1.7.5 (released four days ago) still peer-depends on @modelcontextprotocol/sdk@^1.29.0; its v2 migration is three competing unmerged PRs (#710, #719, #720) with an unresolved architectural disagreement. We use exactly three symbols from it (registerAppTool, registerAppResource, RESOURCE_MIME_TYPE, ~40 lines of real logic upstream), so vendoring is the recommended hedge.

Type of Change

  • Documentation update

Related Issues

N/A

Changes Made

  • Documents the file-level work across @solvapay/mcp, @solvapay/mcp-core and @solvapay/server, with code references to the specific call sites that break
  • Records that the existing package boundary rule (only @solvapay/mcp imports the official SDK) is what keeps the internal blast radius to ~15 files
  • Identifies two wins that fall out of the migration: createMcpHandler's per-request server factory deletes the shared-server mutex in packages/mcp/src/fetch/handler.ts, and McpRequestContext.requestInfo retires the private _requestHandlers reach-in in packages/mcp-core/src/hideToolsByAudience.ts
  • Flags the latent bug that hideToolsByAudience's getClientVersion() fallback stops working on the modern era, because initialize never runs there
  • Recommends keeping createMcpHandler's default legacy: 'stateless' so 2025-era hosts keep working at the protocol layer rather than in our package matrix
  • Six phases with explicit gating, plus risks (beta SDK churn, ext-apps timing, retiring the 'sse-stateful' default, ChatGPT connector behaviour, unaudited _meta conventions)

Changeset

  • Or — this PR touches no published packages (changelog N/A)

Testing

  • Manual testing completed — verified the v2 package surface against the published 2.0.0-beta.5 manifests and the SDK's own docs/migration/ guides, and confirmed every cited line number against the working tree

Checklist

  • I have performed a self-review of my code
  • I have updated the documentation accordingly

Additional Notes

Written against SDK 2.0.0-beta.5 (published 2026-07-21) and the spec release candidate. The final spec publishes 2026-07-28, so the stable 2.0.0 is imminent but not out yet — the plan's Phase 1 spike pins the beta exactly to absorb any remaining churn.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 27, 2026 10:20
The 2026-07-28 protocol revision is only reachable through the official
TypeScript SDK v2, which splits @modelcontextprotocol/sdk into
@modelcontextprotocol/{core,server,client,node,express,...}. Only
@solvapay/mcp imports the official SDK, so the internal blast radius is
small, but the peer dependency rename is breaking for every integrator.

Documents the file-level work, the @modelcontextprotocol/ext-apps
blocker (v2 migration is three unmerged upstream PRs), and recommends a
single clean cut with the 0.2.x line deprecated rather than
dual-targeting v1 and v2.

Co-authored-by: Tommy <tommy.berglind@gmail.com>
The MCP 2026-07-28 revision is reachable only through the official SDK v2,
which splits `@modelcontextprotocol/sdk` into scoped packages and drops the
stateful handshake. `@solvapay/mcp` now builds on `@modelcontextprotocol/core`
and `/server`, and `createSolvaPayMcpFetchHandler` takes a per-request
`factory` instead of a shared `server`, with `responseMode` replacing the
hand-maintained `McpHandlerMode`. 2025-era hosts keep working through the
SDK's zero-cost `legacy: 'stateless'` leg.

`@modelcontextprotocol/ext-apps` has no v2 build, so its three server-side
symbols are vendored and re-exported from `@solvapay/mcp` — merchants writing
MCP Apps tools would otherwise have no v2-compatible import.

The Express examples lose their session maps and `isInitializeRequest`
routing entirely in favour of `toNodeHandler`, which streams SSE and forwards
`req.auth` as `authInfo`.

Two latent typing bugs surfaced and are fixed: `Parameters<registerTool>`
resolved to v2's *deprecated* raw-shape overload, and `InferHandlerArgs`
collapsed raw-shape schemas to `Record<string, unknown>` so merchant
`registerPayable` handlers saw `unknown` args. Fixing both removed three
casts and an `as any`.

BREAKING CHANGE: the `@modelcontextprotocol/sdk` peer is replaced by
`@modelcontextprotocol/core` + `/server` (^2.0.0), `zod` requires ^4.2.0,
`engines.node` is >=20, and `createSolvaPayMcpFetchHandler`'s `server` and
`mode` options are replaced by `factory` and `responseMode`.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants