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
|`StreamableHTTPError`| REMOVED (use `SdkError` with `SdkErrorCode.ClientHttp*`) |
99
+
|`WebSocketClientTransport`| REMOVED (use `StreamableHTTPClientTransport` or `StdioClientTransport`) |
100
100
101
101
All other symbols from `@modelcontextprotocol/sdk/types.js` retain their original names (e.g., `CallToolResultSchema`, `ListToolsResultSchema`, etc.).
102
102
@@ -210,8 +210,7 @@ Zod schemas, all callback return types. Note: `callTool()` and `request()` signa
210
210
211
211
The variadic `.tool()`, `.prompt()`, `.resource()` methods are removed. Use the `register*` methods with a config object.
212
212
213
-
**IMPORTANT**: v2 requires schema objects implementing [Standard Schema](https://standardschema.dev/) — raw shapes like `{ name: z.string() }` are no longer supported. Wrap with `z.object()` (Zod v4), or use ArkType's `type({...})`, or Valibot. For raw JSON Schema, wrap with
214
-
`fromJsonSchema(schema)` from `@modelcontextprotocol/server` (validator defaults automatically; pass an explicit validator for custom configurations). Applies to `inputSchema`, `outputSchema`, and `argsSchema`.
213
+
**IMPORTANT**: v2 requires schema objects implementing [Standard Schema](https://standardschema.dev/) — raw shapes like `{ name: z.string() }` are no longer supported. Wrap with `z.object()` (Zod v4), or use ArkType's `type({...})`, or Valibot. For raw JSON Schema, wrap with `fromJsonSchema(schema)` from `@modelcontextprotocol/server` (validator defaults automatically; pass an explicit validator for custom configurations). Applies to `inputSchema`, `outputSchema`, and `argsSchema`.
215
214
216
215
### Tools
217
216
@@ -281,20 +280,20 @@ Note: the third argument (`metadata`) is required — pass `{}` if no metadata.
`TaskCreationParams.ttl` changed from `z.union([z.number(), z.null()]).optional()` to `z.number().optional()`. Per the MCP spec, `null` TTL (unlimited lifetime) is only valid in server responses (`Task.ttl`), not in client requests. Omit `ttl` to let the server decide.
Note: `@modelcontextprotocol/client` and `@modelcontextprotocol/server` both re-export shared types from `@modelcontextprotocol/core`, so you can import types and error classes from whichever package you already depend on. Do not import from `@modelcontextprotocol/core` directly
61
-
— it is an internal package.
60
+
Note: `@modelcontextprotocol/client` and `@modelcontextprotocol/server` both re-export shared types from `@modelcontextprotocol/core`, so you can import types and error classes from whichever package you already depend on. Do not import from `@modelcontextprotocol/core` directly — it is an internal package.
62
61
63
62
### Dropped Node.js 18 and CommonJS
64
63
@@ -295,11 +294,11 @@ This applies to:
295
294
296
295
**Removed Zod-specific helpers** from `@modelcontextprotocol/core` (use Standard Schema equivalents):
|`getSchemaShape`, `getSchemaDescription`, `isOptionalSchema`, `unwrapOptionalSchema`| No replacement — these are now internal Zod introspection helpers |
304
303
305
304
### Host header validation moved
@@ -436,6 +435,7 @@ before sending and gives typed `params`; passing a bare result schema sends para
436
435
For larger sub-protocols where neither side is semantically an MCP client or server, prefer composition: hold a `Client` (or `Server`) instance, register custom handlers on it, and expose typed facade methods. See `examples/server/src/customMethodExtAppsExample.ts` for a worked
437
436
example.
438
437
438
+
439
439
### `Protocol.request()`, `ctx.mcpReq.send()`, and `Client.callTool()` no longer take a schema parameter
440
440
441
441
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
@@ -531,15 +531,15 @@ For **production in-process connections**, use `StreamableHTTPClientTransport` w
531
531
532
532
The following deprecated type aliases have been removed from `@modelcontextprotocol/core`:
|`AuthInfo` (from `server/auth/types.js`) |`AuthInfo` (now re-exported by `@modelcontextprotocol/client` and `@modelcontextprotocol/server`) |
544
544
545
545
All other types and schemas exported from `@modelcontextprotocol/sdk/types.js` retain their original names — import them from `@modelcontextprotocol/client` or `@modelcontextprotocol/server`.
@@ -570,7 +570,7 @@ The `RequestHandlerExtra` type has been replaced with a structured context type
|`extra.requestInfo`|`ctx.http?.req` (standard Web `Request`, only on `ServerContext`) |
573
+
|`extra.requestInfo`|`ctx.http?.req` (standard Web `Request`, only on `ServerContext`) |
574
574
|`extra.closeSSEStream`|`ctx.http?.closeSSE` (only on `ServerContext`) |
575
575
|`extra.closeStandaloneSSEStream`|`ctx.http?.closeStandaloneSSE` (only on `ServerContext`) |
576
576
|`extra.sessionId`|`ctx.sessionId`|
@@ -837,8 +837,7 @@ try {
837
837
838
838
### Experimental: `TaskCreationParams.ttl` no longer accepts `null`
839
839
840
-
The `ttl` field in `TaskCreationParams` (used when requesting the server to create a task) no longer accepts `null`. Per the MCP spec, `null` TTL (meaning unlimited lifetime) is only valid in server responses (`Task.ttl`), not in client requests. Clients should omit `ttl` to let
841
-
the server decide the lifetime.
840
+
The `ttl` field in `TaskCreationParams` (used when requesting the server to create a task) no longer accepts `null`. Per the MCP spec, `null` TTL (meaning unlimited lifetime) is only valid in server responses (`Task.ttl`), not in client requests. Clients should omit `ttl` to let the server decide the lifetime.
842
841
843
842
This also narrows the type of `requestedTtl` in `TaskContext`, `CreateTaskServerContext`, and `TaskServerContext` from `number | null | undefined` to `number | undefined`.
0 commit comments