feat: migrate to base MCP SDK v2 beta.4 - #2
Conversation
|
We've triggered an ultrareview automatically — This PR migrates the entire codebase from the monolithic MCP SDK v1 to the split MCP SDK v2 beta.4 packages, changing 122 files with 4077 lines — a large cross-cutting dependency that touches core client/server class hierarchies, transports, testing infrastructure, examples, and documentation,.... I'll post findings when complete. An ultrareview is cubic's deepest review, catching hard-to-find bugs in the most critical PRs. It runs a longer, multi-pass analysis using cubic's most capable review models, and typically takes around 30 minutes. It consumes your team's reviewed-lines allowance at 3× the standard rate. Automated ultrareviews are disabled by default. We triggered this run as part of your trial. Want cubic to do this for every high-risk PR? Enable auto-ultrareview in your settings. |
Summary
@modelcontextprotocol/sdkv1 dependency with the exact published base MCP SDK v2 beta.4 split packagesAppextend the public clientClientandAppBridgeextend the public serverServer, while preserving the separate outer host/server and inner View/host channelsEventDispatcherThis is intentionally a breaking dependency migration. Apps protocol negotiation remains unchanged.
Verification
npm installnpm run build:allnpm test— 392 passed, 1 skipped, 0 failedgit diff --checkchecksThe full Playwright suite was not rerun locally because Express rejects the hidden
.codexworktree path whenbasic-hostservessandbox.html; the affected flows were verified manually through Chrome from a non-hidden path. CI should run the suite from its normal checkout.Summary by cubic
Migrates the Apps SDK to the base MCP SDK v2.0.0-beta.4 split packages, replacing
@modelcontextprotocol/sdkv1 across the codebase. This is a breaking dependency update; App protocol negotiation and behavior remain unchanged.Refactors
Appnow subclasses@modelcontextprotocol/clientClient;AppBridgesubclasses@modelcontextprotocol/serverServerfor the inner iframe, with a separate outerClientto the MCP server.EventDispatcher.@modelcontextprotocol/express,@modelcontextprotocol/node(NodeStreamableHTTPServerTransport), and@modelcontextprotocol/server/stdio.z.object({...}); updates docs/snippets; externalizes peer deps for@modelcontextprotocol/{client,core,server}andzodin standard builds.Migration
@modelcontextprotocol/client@2.0.0-beta.4,@modelcontextprotocol/server@2.0.0-beta.4,@modelcontextprotocol/core@2.0.0-beta.4, andzod@^4.2.0(examples may also need@modelcontextprotocol/expressand@modelcontextprotocol/node).@modelcontextprotocol/sdkv1 to the split packages (e.g.,createMcpExpressAppfrom@modelcontextprotocol/express,StdioServerTransportfrom@modelcontextprotocol/server/stdio).z.object({ ... }); remove.shapeusage and pass Zod schemas directly.npm install, then build/tests).Written for commit f50ec6e. Summary will update on new commits.