Document the 2.x install matrix and add a migration guide
Install instructions now list the split base MCP SDK packages at ^2.0.0 by role (core comes in transitively, server only for server authors), require Node 20+, and state that the wire protocol is unchanged so 2.x Views and 1.x hosts interoperate. The agent skills lose the exact prerelease wording and add-app-to-server gains a v1 to v2 import mapping. docs/migrate-to-2.md lists the breaking changes, the peer matrix and the host-side error deltas.
This commit is contained in:
parent
09bf2aae3c
commit
c5b2543115
1 changed files with 145 additions and 27 deletions
|
|
@ -77,15 +77,27 @@ Before writing any code, analyze the server's existing tools and determine which
|
|||
## Step 2: Add Dependencies
|
||||
|
||||
```bash
|
||||
npm install @modelcontextprotocol/ext-apps @modelcontextprotocol/client@2.0.0-beta.5 @modelcontextprotocol/core@2.0.0-beta.5 @modelcontextprotocol/server@2.0.0-beta.5 zod@^4.2.0
|
||||
npm install @modelcontextprotocol/ext-apps @modelcontextprotocol/client@^2.0.0 @modelcontextprotocol/server@^2.0.0 zod@^4.2.0
|
||||
npm install -D vite vite-plugin-singlefile
|
||||
```
|
||||
|
||||
Plus framework-specific dependencies if needed (e.g., `react`, `react-dom`, `@vitejs/plugin-react` for React).
|
||||
Plus framework-specific dependencies if needed (e.g., `react`, `react-dom`, `@vitejs/plugin-react` for React), and `@modelcontextprotocol/node` / `@modelcontextprotocol/express` if the server uses HTTP transports.
|
||||
|
||||
Use the exact base MCP SDK prerelease required by ext-apps. Existing servers
|
||||
that still import `@modelcontextprotocol/sdk` v1 must migrate those imports and
|
||||
handler schemas before adding the App integration.
|
||||
ext-apps 2.x requires the split base MCP SDK packages at `^2.0.0`
|
||||
(`@modelcontextprotocol/core` comes in transitively). Existing servers that
|
||||
still import `@modelcontextprotocol/sdk` v1 must migrate those imports and
|
||||
handler schemas before adding the App integration:
|
||||
|
||||
| SDK v1 (`@modelcontextprotocol/sdk`) | SDK v2 |
|
||||
|---|---|
|
||||
| `sdk/server/mcp.js` (`McpServer`) | `@modelcontextprotocol/server` |
|
||||
| `sdk/server/streamableHttp.js` (`StreamableHTTPServerTransport`) | `NodeStreamableHTTPServerTransport` from `@modelcontextprotocol/node` |
|
||||
| Express wiring by hand | `createMcpExpressApp` from `@modelcontextprotocol/express` |
|
||||
| `sdk/server/stdio.js` | `@modelcontextprotocol/server/stdio` |
|
||||
| `sdk/types.js` (types, schemas) | `@modelcontextprotocol/client` or `@modelcontextprotocol/server` |
|
||||
| Raw zod shapes: `inputSchema: { q: z.string() }` | `inputSchema: z.object({ q: z.string() })` |
|
||||
| `extra.signal` in tool callbacks | `extra.mcpReq.signal` |
|
||||
| `setRequestHandler(SomeRequestSchema, handler)` | `setRequestHandler("some/method", handler)` |
|
||||
|
||||
## Step 3: Set Up the Build Pipeline
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue