Major Changes
-
#1389
108f2f3Thanks @DePasqualeOrg! - Fix error handling for unknown tools and resources per MCP spec.Tools: Unknown or disabled tool calls now return JSON-RPC protocol errors with code
-32602(InvalidParams) instead ofCallToolResultwithisError: true. Callers who checkedresult.isErrorfor unknown tools should catch rejected promises instead.Resources: Unknown resource reads now return error code
-32002(ResourceNotFound) instead of-32602(InvalidParams).Added
ProtocolErrorCode.ResourceNotFound.
Minor Changes
-
#1673
462c3fcThanks @KKonstantinov! - refactor: extract task orchestration from Protocol into TaskManagerBreaking changes:
taskStore,taskMessageQueue,defaultTaskPollInterval, andmaxTaskQueueSizemoved fromProtocolOptionstocapabilities.tasksonClientOptions/ServerOptions
-
#1689
0784be1Thanks @felixweinberger! - Support Standard Schema for tool and prompt schemasTool and prompt registration now accepts any schema library that implements the Standard Schema spec: Zod v4, Valibot, ArkType, and others.
RegisteredTool.inputSchema,RegisteredTool.outputSchema, andRegisteredPrompt.argsSchemanow useStandardSchemaWithJSON(requires both~standard.validateand~standard.jsonSchema) instead of the Zod-specificAnySchematype.Zod v4 schemas continue to work unchanged — Zod v4 implements the required interfaces natively.
import { type } from 'arktype'; server.registerTool( 'greet', { inputSchema: type({ name: 'string' }) }, async ({ name }) => ({ content: [{ type: 'text', text: `Hello, ${name}!` }] }) );For raw JSON Schema (e.g. TypeBox output), use the new
fromJsonSchemaadapter:import { fromJsonSchema, AjvJsonSchemaValidator } from '@modelcontextprotocol/core'; server.registerTool( 'greet', { inputSchema: fromJsonSchema({ type: 'object', properties: { name: { type: 'string' } } }, new AjvJsonSchemaValidator()) }, handler );Breaking changes:
experimental.tasks.getTaskResult()no longer accepts aresultSchemaparameter. ReturnsGetTaskPayloadResult(a looseResult); cast to the expected type at the call site.- Removed unused exports from
@modelcontextprotocol/core:SchemaInput,schemaToJson,parseSchemaAsync,getSchemaShape,getSchemaDescription,isOptionalSchema,unwrapOptionalSchema. Use the newstandardSchemaToJsonSchemaandvalidateStandardSchemainstead. completable()remains Zod-specific (it relies on Zod's.shapeintrospection).
Patch Changes
-
#1758
e86b183Thanks @KKonstantinov! - tasks - disallow requesting a null TTL -
#1363
0a75810Thanks @DevJanderson! - Fix ReDoS vulnerability in UriTemplate regex patterns (CVE-2026-0621) -
#1372
3466a9eThanks @mattzcarey! - missing change for fix(client): replace body.cancel() with text() to prevent hanging -
#1824
fcde488Thanks @felixweinberger! - DropzodfrompeerDependencies(kept as direct dependency)Since Standard Schema support landed,
zodis purely an internal runtime dependency used for protocol message parsing. User-facing schemas (registerTool,registerPrompt) accept any Standard Schema library.zodremains independenciesand auto-installs; users no longer need to install it alongside the SDK. -
#1761
01954e6Thanks @felixweinberger! - Convert remaining capability-assertion throws toSdkError(SdkErrorCode.CapabilityNotSupported, ...). Follow-up to #1454 which missedClient.assertCapability(), the task capability helpers inexperimental/tasks/helpers.ts, and the sampling/elicitation capability checks inexperimental/tasks/server.ts. -
#1433
78bae74Thanks @codewithkenzo! - Fix transport errors being silently swallowed by adding missingonerrorcallback invocations before allcreateJsonErrorResponsecalls inWebStandardStreamableHTTPServerTransport. This ensures errors like parse failures, invalid headers, and session validation errors are properly reported via theonerrorcallback. -
#1660
689148dThanks @rechedev9! - fix(server): propagate negotiated protocol version to transport in _oninitialize -
#1568
f1ade75Thanks @stakeswky! - Handle stdout errors (e.g. EPIPE) inStdioServerTransportgracefully instead of crashing. When the client disconnects abruptly, the transport now catches the stdout error, surfaces it viaonerror, and closes. -
#1419
dcf708dThanks @KKonstantinov! - remove deprecated .tool, .prompt, .resource method signatures -
#1388
f66a55bThanks @mattzcarey! - reverting application/json in notifications -
#1534
69a0626Thanks @josefaidt! - remove npm references, use pnpm -
#1534
69a0626Thanks @josefaidt! - clean up package manager usage, all pnpm -
#1419
dcf708dThanks @KKonstantinov! - deprecated .tool, .prompt, .resource method removal -
#1279
71ae3acThanks @KKonstantinov! - Initial 2.0.0-alpha.0 client and server package