Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
rgarcia
force-pushed
the
hypeship/mcp-sdk-v2-migration
branch
from
September 22, 2026 21:08
57a099c to
347062f
Compare
rgarcia
changed the base branch from
main
to
hypeship/dev-mcp-oauth-discovery
September 22, 2026 21:08
rgarcia
added this pull request to stack #212
September 22, 2026 21:08
rgarcia
force-pushed
the
hypeship/mcp-sdk-v2-migration
branch
from
September 22, 2026 21:25
347062f to
cd57279
Compare
This branch was successfully deployed
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.
Summary
Depends on #211, which maps dev MCP discovery to the dev OAuth issuer. This PR contains only the SDK migration diff on top of that mapping.
Serve protocol revision
2026-07-28and legacy 2025 Streamable HTTP clients at the same/mcpendpoint using the stock SDK v2createMcpHandler(default stateless legacy fallback). No custom wire-compatibility layer or Tasks extension.@modelcontextprotocol/{server,core,client}to 2.0.0; migrate registration APIs, request contexts, and schemas to Zod 4. Preserve vault validation-error redaction through Standard Schema.mcp-handlerwith the SDK's Web Request/Response handler. Keep Clerk JWT verification, API-key validation, project scoping, entitlement checks, and OAuth challenges before passing verifiedauthInfoto the SDK.@clerk/mcp-tools, used only for protected-resource metadata. Keep canonical discovery locally; use the same public origin for authorization metadata so v2 issuer validation works even when Next normalizes loopback URLs.mcp-handlernow has a v2 release, but the direct SDK handler avoids an unnecessary adapter. Clerk's latest MCP helper still depends on v1; removing its metadata-only use does not require replacing Clerk authentication. The v1 SDK remains a dev dependency only, for client interoperability tests.Migration plan
No server-initiated elicitation was found, so there is no MRTR flow to port. No tools declare an
outputSchema; explicit content arrays, managed-auth structured content, and existing result formats are retained. The SDK supplies modernresultTyperather than application code stamping it.Behavior changes for legacy clients
Compatibility means usable clients, not identical wire bytes. The isolated SDK 1.26.0 → 2.0.0 HTTP probes recorded:
missingresult: {content: [{type: "text", text: "MCP error -32602: Tool missing not found"}], isError: true}error: {code: -32602, message: "Tool missing not found"}echo.textargumentisErrortext with theMCP error -32602:prefix and serialized Zod issuesisErrortext without that prefix, with a concise field-path messageexecution.taskSupport: "forbidden"Ordinary successful text-tool response bytes matched in that probe. The checked-in tests assert usable results/errors, not error wording: both clients handle unknown-tool JSON-RPC rejection and successfully call another tool afterward. Separate tests exercise
2025-03-26and2025-06-18requests. The supported transport remains/mcpStreamable HTTP; the removed adapter's deprecated HTTP+SSE wiring is not retained.Existing App consumer note: the managed-auth App handles both
isErrorand rejected calls. Its wait loop retries rejected calls, whereas anisErrorstops it. Ifmanage_auth_connectionsdisappears during an open flow, an unknown-tool rejection therefore takes the existing retry path. The tool is always registered when the launcher is available. No unknown-tool special case was added.Validation
manage_projectscalls, business/upstream/validation/unknown-tool errors, prompts, resources, Apps, and CORS/header validation.bunx tsc --noEmit --incremental false, productionbun run buildwith placeholder build-time client IDs and Clerk keys, managed-auth generated-bundle check, frozen install, and Prettier on changed TS/JSON files passed. Tests also passed with CI's Bun 1.3.3.Full diff self-reviewed and deslopped. Generated App assets are unchanged; unrelated lockfile version churn was removed.