Skip to content

Commit a513cfe

Browse files
docs: close the v1 to v2 quick path with the 2026-07-28 serving decision (#3086)
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
1 parent c822443 commit a513cfe

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • skills/mcp-typescript-sdk-upgrade-to-v2

‎skills/mcp-typescript-sdk-upgrade-to-v2/SKILL.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
3737
6. **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
3949
Migrating 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).

0 commit comments

Comments
 (0)