MCP Typescript Sdk Upgrade To V2

Upgrades TypeScript code from v1 of the MCP TypeScript SDK (`@modelcontextprotocol/sdk`) to v2 (`@modelcontextprotocol/client`, `/server`, `/core` and the middleware packages): runs the official codemod, then works through what it cannot rewrite. Use whenever a project depends on `@modelcontextprotocol/sdk` and the user wants to migrate, upgrade, port or bump it to v2, or is fixing v1-to-v2 breakage such as missing `McpError`, `RequestHandlerExtra` or `*Schema` exports, `@mcp-codemod-error` markers, or changed auth, error, transport or handler behavior, even if they do not say "migration".

modelcontextprotocol Updated

File contents

modelcontextprotocol/typescript-sdk commit d80ddc2041

Frequently asked questions

npx get-skill add modelcontextprotocol/mcp-typescript-sdk-upgrade-to-v2