File tree Expand file tree Collapse file tree
skills/mcp-typescript-sdk-upgrade-to-v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ If you are already on v2 and want to adopt the **2026-07-28 protocol revision**,
3535 the changed files (` prettier --write` / ` eslint --fix` / ` biome format --write` ); the
3636 codemod prints the exact command after it runs.
37376. ** Run your tests.**
38+ 7. ** Decide whether to serve the 2026-07-28 revision.** The upgrade alone does not: a server
39+ that still calls ` server.connect(new StdioServerTransport ())` or hands requests to a
40+ ` * StreamableHTTPServerTransport` serves 2025-era clients only, and a client pinned to
41+ 2026-07-28 cannot connect to it. To serve both, move the entry point to
42+ ` serveStdio(( ) => createServer()) ` or ` createMcpHandler(( ) => createServer()) ` . A server
43+ that uses HTTP sessions keeps its transport for 2025-era clients and routes to it with
44+ ` isLegacyRequest` , in front of ` createMcpHandler(factory, { legacy: ' reject' })` .
45+ ` createMcpHandler` checks no ` Host` or ` Origin` header, so a server that set
46+ ` enableDnsRebindingProtection` mounts host and origin validation in front of it; see
47+ [Serving the 2026-07-28 revision](https://ts.sdk.modelcontextprotocol.io/v2/migration/support-2026-07-28.md#serving-the-2026-07-28-revision).
3848
3949Migrating a large codebase gradually instead of in one pass? See
4050[Migrating in stages (large codebases)](references/packaging-runtime.md#migrating-in-stages-large-codebases).
You can’t perform that action at this time.
0 commit comments