You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InMemoryTransport was unreachable: the migration doc said to import it
from @modelcontextprotocol/core, but core is private (no exports field,
no dist). Adding it to core/public makes it available via the
server/client re-exports.
migration.md:
- Rewrite the InMemoryTransport section to match the new export reality
(was: 'removed from public API, import from internal core' — neither
half of that worked)
- Add SSE-to-StreamableHTTP before/after example
- Method-string table: add tasks/get, tasks/result,
notifications/elicitation/complete
- Mention callToolStream() in the schema-removal section header
migration-SKILL.md:
- Fix 'core is installed automatically as a dependency' (it's internal)
- Add the same method-string rows
| Server + Express |`npm install @modelcontextprotocol/server @modelcontextprotocol/express`|
29
29
| Server + Hono |`npm install @modelcontextprotocol/server @modelcontextprotocol/hono`|
30
30
31
-
`@modelcontextprotocol/core` is installed automatically as a dependency.
31
+
`@modelcontextprotocol/core` is an internal package — never install or import it directly. Both `@modelcontextprotocol/client` and `@modelcontextprotocol/server` re-export everything you need.
32
32
33
33
## 3. Import Mapping
34
34
@@ -373,6 +373,9 @@ Schema to method string mapping:
Copy file name to clipboardExpand all lines: docs/migration.md
+38-7Lines changed: 38 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,36 @@ const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: ()
110
110
111
111
The SSE transport has been removed from the server. Servers should migrate to Streamable HTTP. The client-side SSE transport remains available for connecting to legacy SSE servers.
const transport =newNodeStreamableHTTPServerTransport({ sessionIdGenerator: () =>randomUUID() });
136
+
awaitserver.connect(transport);
137
+
awaittransport.handleRequest(req, res);
138
+
});
139
+
```
140
+
141
+
See `examples/server/src/simpleStreamableHttp.ts` for a complete working example.
142
+
113
143
### `WebSocketClientTransport` removed
114
144
115
145
`WebSocketClientTransport` has been removed. WebSocket is not a spec-defined MCP transport, and keeping it in the SDK encouraged transport proliferation without a conformance baseline.
@@ -381,10 +411,13 @@ Common method string replacements:
### `Protocol.request()`, `ctx.mcpReq.send()`, and `Client.callTool()` no longer take a schema parameter
386
419
387
-
The public `Protocol.request()`, `BaseContext.mcpReq.send()`, and `Client.callTool()` methods no longer accept a Zod result schema argument. The SDK now resolves the correct result schema internally based on the method name. This means you no longer need to import result schemas
420
+
The public `Protocol.request()`, `BaseContext.mcpReq.send()`, `Client.callTool()`, and `client.experimental.tasks.callToolStream()` methods no longer accept a Zod result schema argument. The SDK now resolves the correct result schema internally based on the method name. This means you no longer need to import result schemas
388
421
like `CallToolResultSchema` or `ElicitResultSchema` when making requests.
389
422
390
423
**`client.request()` — Before (v1):**
@@ -459,19 +492,17 @@ const client = new Client(
459
492
460
493
### `InMemoryTransport` removed from public API
461
494
462
-
`InMemoryTransport` has been removed from the public API surface. It was previously used for in-process client-server connections and testing.
463
-
464
-
For **testing**, import it directly from the internal core package:
495
+
`InMemoryTransport` is intended for testing client/server interactions within a single process. It is re-exported from both `@modelcontextprotocol/server` and `@modelcontextprotocol/client`.
For **production in-process connections**, use`StreamableHTTPClientTransport` with a local server URL, or connect client and server via paired streams.
505
+
For **production in-process connections**, prefer`StreamableHTTPClientTransport` with a local server URL.
0 commit comments