Conversation
Member
There was a problem hiding this comment.
can't use peerDeps model anymore for dependency to the SDK ?
Collaborator
Author
There was a problem hiding this comment.
We can, but we now need to import 4 deps instead of just the sdk. It's a discussion to have but it makes sense on a DX perspective to not use peerDeps anymore.
| }, | ||
| "dependencies": { | ||
| "@babel/core": "^7.29.7", | ||
| "@modelcontextprotocol/client": "2.0.0-beta.5", |
Member
There was a problem hiding this comment.
can be moved to dev deps, only used in .test.ts files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates
packages/corefrom the v1 monolith@modelcontextprotocol/sdkto the v2 split packages@modelcontextprotocol/{core,client,server,express}(2.0.0-beta.5).sdk v2 is the reference implementation of the MCP
2026-07-28protocol RC (stateless core, per-request envelope,input_required, auth hardening). This is a breaking, semver-major change for Skybridge — no back-compat shims are kept.Status on-branch:
tsc --noEmit0 errors ·test:unit361/361 · biome clean. Full core migrated, auth included.Non-trivial changes
HTTP transport → v2 stateless / per-request model (the protocol's headline change, and the bulk of the work)
StreamableHTTPServerTransport.handleRequest(req,res,body). The/mcproute now wrapscreateMcpHandler(factory), which is per-request by construction.connectStatelessTransport(transport)becamecreateStatelessServerInstance()(freshSdkServer+ grafted_requestHandlers/_notificationHandlers), used directly as thecreateMcpHandlerfactory body. No singleton rearchitecture.Requestfrom the Express req and callhandler.fetch(request, { authInfo: req.auth, parsedBody: req.body }), then pipe theResponseback. The SDK now owns method rules (GET/DELETE → 405), classification, and error→500. The concurrent-request "Already connected" race is gone.Per-request handler context (
RequestHandlerExtra→ServerContext)ctx.http?.req(a FetchRequest— headers via.headers.get(), url vianew URL(req.url)) andctx.http?.authInfo.McpExtratype is nowtype McpExtra = ServerContext— the v1-shaped shim and itsas unknown as McpExtracast were removed.zod-compat removed → Standard Schema
SchemaOutput/ZodRawShapeCompat/AnySchemare-derived overStandardSchemaV1. Zod v4 schemas satisfy Standard Schema, so app-facing tool definitions are unchanged.Errors & misc
McpError/ErrorCode→ProtocolError+ code constants;InvalidTokenError→OAuthError(real v2 name exposed, no back-compat alias — intended v2 break).setRequestHandleris now 3-arg in v2 (adapted the skills directory-read handler).server/clientroots, Zod schemas fromcore, auth middleware/router fromexpress.Choices
InvalidTokenError, v1-shapedMcpExtra) are gone rather than aliased.web/bridges/mcp-app/*+ a fewtypes.tstypes) — the only remaining v1 monolith imports. Migrating them breaks ext-apps'App.registerToolhandler type; gated on an upstream ext-apps v2.packages/devtoolsuntouched — separate follow-up./mcpmiddleware (v2'screateMcpHandlerabsorbs factory errors into a 500 itself, so a mocked factory throw can't reachnext(error)); the skills tests updated for the 3-argsetRequestHandler.Not in scope / gating
beta.5(pre-RC). Do not merge to ship — gated on protocol2026-07-28final + SDK2.0.0stable + an ext-apps v2 rebase. Draft until then.create-skybridgeblank/demo) + the corepeerDependenciesswap to the v2 packages are the next step.Tracked in SKY-514.
🤖 Generated with Claude Code