docs(migration): close guide gaps surfaced by real v1-to-v2 migrations (#2382)

This commit is contained in:
Felix Weinberger 2026-06-29 15:16:07 +01:00 • committed by GitHub
commit b96a94c6b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,10 @@
---
title: Migration Guides
children:
- ./upgrade-to-v2.md
- ./support-2026-07-28.md
---
# MCP TypeScript SDK — Migration Guides
Pick the guide for your starting point.
@ -12,9 +19,12 @@ v2 packages (`@modelcontextprotocol/client`, `@modelcontextprotocol/server`, …
Start by running the codemod:
```bash
npx @modelcontextprotocol/codemod@alpha v1-to-v2 ./src
npx @modelcontextprotocol/codemod@alpha v1-to-v2 .
```
Run it at the package root (`.`) — real projects import the SDK from `test/`,
`scripts/`, and fixtures too, and those rewrites are missed when you point it at `./src`.
The codemod handles most mechanical renames. The guide covers what it can't. The
codemod handles the v1→v2 SDK surface upgrade only — adopting the 2026-07-28 protocol
revision (`createMcpHandler`, multi-round-trip requests, `versionNegotiation`) is