Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/abort-handlers-on-close.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

Abort in-flight request handlers when the connection closes. Previously, request handlers would continue running after the transport disconnected, wasting resources and preventing proper cleanup. Also fixes `InMemoryTransport.close()` firing `onclose` twice on the initiating side.
5 changes: 5 additions & 0 deletions .changeset/add-core-public-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modelcontextprotocol/core': minor
---

Add `@modelcontextprotocol/core`: the public home for the MCP specification and OAuth/OpenID Zod schemas. It bundles the SDK's internal schema definitions and re-exports only the `*Schema` values, so consumers can validate protocol payloads (`<TypeName>Schema.parse(value)` / `.safeParse(value)`) without depending on a package's internal barrel. Alongside the spec schemas it also re-exports the auth schemas v1 exposed from `@modelcontextprotocol/sdk/shared/auth.js` (e.g. `OAuthTokensSchema`, `OAuthMetadataSchema`, `IdJagTokenExchangeResponseSchema`). Spec types, error classes, enums, and guards continue to live on `@modelcontextprotocol/server` and `@modelcontextprotocol/client`.

Check warning on line 5 in .changeset/add-core-public-package.md

View check run for this annotation

Claude / Claude Code Review

Changeset wrongly lists IdJagTokenExchangeResponseSchema as a v1 auth schema

The changeset `add-core-public-package.md` lists `IdJagTokenExchangeResponseSchema` as an example of "the auth schemas v1 exposed from `@modelcontextprotocol/sdk/shared/auth.js`", but v1 never exported that schema — it is v2-only (this PR's own `idjag-spec-type-export.md` and the codemod's `authSchemaNames.ts` both say so). Consider dropping it from the "v1 exposed" example list (or rewording) so the published CHANGELOG doesn't misstate v1 history; purely a wording nit, no code change needed.
Comment thread
felixweinberger marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .changeset/add-resource-size-field.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

Add missing `size` field to `ResourceSchema` to match the MCP specification
2 changes: 1 addition & 1 deletion .changeset/add-sdk-http-error.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@modelcontextprotocol/core": minor
"@modelcontextprotocol/core-internal": minor
"@modelcontextprotocol/client": minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/add-version-negotiation-option.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
---

Add opt-in protocol version negotiation on `ClientOptions.versionNegotiation`. The default is unchanged: without the option (or with `mode: 'legacy'`) the client performs today's 2025 connect sequence byte-identically. `mode: 'auto'` probes the server with `server/discover` at
Expand Down
2 changes: 1 addition & 1 deletion .changeset/auth-dcr-hygiene.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
---

Dynamic Client Registration hygiene for the 2026-07-28 authorization requirements (SEP-837, SEP-2207). New `resolveClientMetadata(provider)` reads `provider.clientMetadata` and applies the spec defaults — `application_type` derived from the redirect URIs (loopback or custom scheme → `'native'`, otherwise `'web'`), `grant_types: ['authorization_code', 'refresh_token']` when omitted — and `auth()` feeds the resolved document to DCR only (scope selection still reads the raw consumer-supplied `clientMetadata` so statically-registered/CIMD clients are not pushed into `offline_access` + `prompt=consent`); consumer-set values are never overwritten. DCR rejection now throws the new `RegistrationRejectedError` carrying the HTTP status, raw body, and submitted metadata — **breaking for direct `registerClient()` callers**: rejection no longer throws `OAuthError`, so update `instanceof` checks. `OAuthClientMetadata` gains a typed `application_type?: string` field (expected `'native'` / `'web'`; tolerant on parse). `OAuthErrorCode` adds `InvalidRedirectUri`. The token-exchange, refresh, and Cross-App Access (`requestJwtAuthorizationGrant` / `exchangeJwtAuthGrant`) paths now throw the new `InsecureTokenEndpointError` for a non-`https:` token endpoint (`localhost` / `127.0.0.1` / `::1` exempt), and `auth()` surfaces it on the refresh branch instead of silently re-authorizing.
2 changes: 1 addition & 1 deletion .changeset/auth-iss-validation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@modelcontextprotocol/core": minor
"@modelcontextprotocol/core-internal": minor
"@modelcontextprotocol/client": minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/auth-surface-delta.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
---

Add the public surface for the 2026-07-28 authorization requirements. New `AuthOptions` type names the `auth()` options object and adds `iss` and `skipIssuerMetadataValidation` fields. `OAuthClientProvider.clientInformation()` / `.saveClientInformation()` / `.tokens()` / `.saveTokens()` accept an optional `OAuthClientInformationContext` carrying the authorization server's `issuer` so providers can key persisted credentials per authorization server. New `StoredOAuthTokens` / `StoredOAuthClientInformation` aliases add an `issuer` stamp field on top of the wire types (kept off the wire schemas so an authorization server cannot populate it) and become the parameter/return types of the credential methods. New `OAuthClientFlowError` base class in `authErrors.ts` for the flow-specific error classes that follow. All changes are additive — existing `OAuthClientProvider` implementations compile unchanged; the new fields are inert until the behavior changes that follow wire them up.
2 changes: 1 addition & 1 deletion .changeset/busy-weeks-hang.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
'@modelcontextprotocol/server': patch
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/cacheable-result-cache-fields.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/server': minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/client-http-stream-close-cancel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/codec-era-gates.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/server': minor
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/codec-split-wire-break.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': major
'@modelcontextprotocol/core-internal': major
'@modelcontextprotocol/client': major
'@modelcontextprotocol/server': major
---
Expand Down
5 changes: 5 additions & 0 deletions .changeset/codemod-core-routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modelcontextprotocol/codemod': minor
---

Route v1 `@modelcontextprotocol/sdk/types.js` schema imports to the new `@modelcontextprotocol/core` package. The `*Schema` Zod constants now migrate as a behavior-preserving import-path swap — `<Name>Schema.parse(value)` / `.safeParse(value)` keep working — while spec types, error classes, enums, and guards continue to resolve to `@modelcontextprotocol/client` / `@modelcontextprotocol/server` by context. A single `import { CallToolResult, CallToolResultSchema } from '.../types.js'` is split accordingly. The v1 OAuth/OpenID `*Schema` constants imported from `@modelcontextprotocol/sdk/shared/auth.js` are routed to `@modelcontextprotocol/core` the same way (their auth TYPES keep resolving to `client` / `server`). The previous `specSchemaAccess` transform (which rewrote `.parse()` into `specTypeSchemas.X['~standard'].validate(...)`) is removed.
5 changes: 5 additions & 0 deletions .changeset/codemod-infer-project-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modelcontextprotocol/codemod': patch
---

Infer client/server project type from source for v1 projects. A project being migrated still declares the single v1 `@modelcontextprotocol/sdk` dependency, so detecting the project type from `package.json` came back "unknown" and every file importing only shared protocol symbols defaulted to `@modelcontextprotocol/server` with an action-required warning. The codemod now scans the source for quoted `@modelcontextprotocol/sdk/client/…` and `…/server/…` import specifiers to infer the type (both → "both", one → that side, neither → "unknown"), routing shared symbols to the installed package and replacing the spurious warnings with at most an info note for genuinely ambiguous "both" projects.
5 changes: 5 additions & 0 deletions .changeset/codemod-task-handler-methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modelcontextprotocol/codemod': patch
---

Map the task request/notification schemas to their v2 method strings in the handler-registration transform. `setRequestHandler(GetTaskRequestSchema, …)`, `setNotificationHandler(TaskStatusNotificationSchema, …)`, and the other task handlers (`tasks/get`, `tasks/result`, `tasks/list`, `tasks/cancel`, `notifications/tasks/status`) now rewrite to the v2 two-argument method-string form instead of falling through to the generic "use the 3-argument form" manual-migration diagnostic.
2 changes: 1 addition & 1 deletion .changeset/custom-methods-minimal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/server': minor
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/envelope-auto-emission.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
---

Per-request `_meta` envelope auto-emission on modern-era connections: once a client negotiates a 2026-07-28+ protocol revision (via `versionNegotiation: { mode: 'auto' }` or `{ pin }`), it automatically attaches the reserved protocol-version / client-info / client-capabilities
Expand Down
2 changes: 1 addition & 1 deletion .changeset/finish-sdkerror-capability.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
'@modelcontextprotocol/client': patch
'@modelcontextprotocol/server': patch
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/fix-abort-listener-leak.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

Consolidate per-request cleanup in `_requestWithSchema` into a single `.finally()` block. This fixes an abort signal listener leak (listeners accumulated when a caller reused one `AbortSignal` across requests) and two cases where `_responseHandlers` entries leaked on send-failure paths.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

Add explicit `| undefined` to optional properties on the `Transport` interface and `TransportSendOptions` (`onclose`, `onerror`, `onmessage`, `sessionId`, `setProtocolVersion`, `setSupportedProtocolVersions`, `onresumptiontoken`).
Expand Down
2 changes: 1 addition & 1 deletion .changeset/fix-unknown-tool-protocol-error.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@modelcontextprotocol/core": minor
"@modelcontextprotocol/core-internal": minor
"@modelcontextprotocol/server": major
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/funky-baths-attack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'@modelcontextprotocol/node': patch
'@modelcontextprotocol/test-integration': patch
'@modelcontextprotocol/server': patch
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

remove deprecated .tool, .prompt, .resource method signatures
2 changes: 1 addition & 1 deletion .changeset/hide-wire-only-members.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': major
'@modelcontextprotocol/core-internal': major
'@modelcontextprotocol/client': major
'@modelcontextprotocol/server': major
---
Expand Down
6 changes: 6 additions & 0 deletions .changeset/idjag-spec-type-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/server': minor
---

Add the v2 `IdJagTokenExchangeResponse` type to the public API and register its schema as an MCP spec type. `IdJagTokenExchangeResponse` is now exported from `@modelcontextprotocol/client` and `@modelcontextprotocol/server`, `'IdJagTokenExchangeResponse'` joins the `SpecTypeName` union, and `isSpecType.IdJagTokenExchangeResponse(value)` / `specTypeSchemas.IdJagTokenExchangeResponse` validate it by name — matching how the OAuth/OpenID auth schemas are already exposed. The Zod schema itself, `IdJagTokenExchangeResponseSchema`, is available from `@modelcontextprotocol/core`.
2 changes: 1 addition & 1 deletion .changeset/missing-client-capability-error.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
'@modelcontextprotocol/server': minor
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/mrtr-client-engine.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/mrtr-server-seam.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/server': minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/pin-modern-rejection-codes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
'@modelcontextprotocol/server': patch
---

Expand Down
46 changes: 43 additions & 3 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,100 @@
"@modelcontextprotocol/examples-client-quickstart": "2.0.0-alpha.0",
"@modelcontextprotocol/examples-server-quickstart": "2.0.0-alpha.0",
"@modelcontextprotocol/client": "2.0.0-alpha.0",
"@modelcontextprotocol/core": "2.0.0-alpha.0",
"@modelcontextprotocol/core-internal": "2.0.0-alpha.0",
"@modelcontextprotocol/express": "2.0.0-alpha.0",
"@modelcontextprotocol/fastify": "2.0.0-alpha.0",
"@modelcontextprotocol/hono": "2.0.0-alpha.0",
"@modelcontextprotocol/node": "2.0.0-alpha.0",
"@modelcontextprotocol/server": "2.0.0-alpha.0",
"@modelcontextprotocol/server-legacy": "2.0.0-alpha.0",
"@modelcontextprotocol/core": "2.0.0-alpha.0",
"@modelcontextprotocol/codemod": "2.0.0-alpha.0",
"@modelcontextprotocol/test-conformance": "2.0.0-alpha.0",
"@modelcontextprotocol/test-helpers": "2.0.0-alpha.0",
"@modelcontextprotocol/test-integration": "2.0.0-alpha.0"
"@modelcontextprotocol/test-integration": "2.0.0-alpha.0",
"@modelcontextprotocol/test-e2e": "2.0.0-alpha.0"
},
"changesets": [
"abort-handlers-on-close",
"add-consumer-sse-e2e",
"add-core-public-package",
"add-e2e-test-suite",
"add-fastify-middleware",
"add-hono-peer-dep",
"add-resource-size-field",
"add-sdk-http-error",
"add-server-legacy-package",
"bound-resumability-version-gates",
"brave-lions-glow",
"busy-rice-smoke",
"busy-weeks-hang",
"cfworker-out-of-barrel",
"codemod-core-routing",
"codemod-infer-project-type",
"codemod-resolve-legacy-imports",
"codemod-streamablehttperror-sdkhttperror",
"codemod-task-handler-methods",
"custom-methods-minimal",
"cyan-cycles-pump",
"draft-spec-non-sep-conformance",
"drop-zod-peer-dep",
"export-inmemory-transport",
"expose-auth-server-discovery",
"expose-icons-on-tools-and-prompts",
"express-resource-server-auth",
"extract-task-manager",
"fast-dragons-lead",
"finish-sdkerror-capability",
"fix-abort-listener-leak",
"fix-conformance-server-leak",
"fix-oauth-5xx-discovery",
"fix-onerror-callbacks",
"fix-server-protocol-version",
"fix-session-status-codes",
"fix-stdio-epipe-crash",
"fix-stdio-windows-hide",
"fix-streamable-close-reentrant",
"fix-streamable-http-error-response",
"fix-task-session-isolation",
"fix-transport-exact-optional-property-types",
"fix-unknown-tool-protocol-error",
"fix-validate-client-metadata-url",
"funky-baths-attack",
"gentle-planets-rest",
"heavy-walls-swim",
"hono-peer-optional",
"idjag-spec-type-export",
"legacy-module-resolution-types",
"oauth-error-http200",
"odd-forks-enjoy",
"quick-islands-occur",
"reconnection-scheduler",
"register-rawshape-compat",
"remove-websocket-transport",
"respect-capability-negotiation",
"restore-task-wire-types",
"rich-hounds-report",
"schema-object-type-for-unions",
"sep-2577-deprecate-runtime-apis",
"sep-2663-tasks-removal",
"sep-414-trace-context-meta-keys",
"shy-times-learn",
"spec-reference-types-2026-07-28",
"spec-type-schema",
"spotty-cats-tickle",
"stdio-max-buffer-size",
"stdio-skip-non-json",
"stdio-subpath-export",
"support-standard-json-schema",
"tame-camels-greet",
"tender-snails-fold",
"token-provider-composable-auth",
"twelve-dodos-taste",
"use-scopes-supported-in-dcr"
"use-scopes-supported-in-dcr",
"workerd-shim-vendors-cfworker",
"wraphandler-hook",
"zod-json-schema-compat",
"zod-jsonschema-fallback"
]
}
2 changes: 1 addition & 1 deletion .changeset/protocol-pre-aborted-signal-wrap.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

`Protocol.request()` now rejects with `SdkError(RequestTimeout, reason)` when called with an already-aborted signal, matching in-flight aborts. Previously the raw `signal.reason` was thrown.
2 changes: 1 addition & 1 deletion .changeset/quick-islands-occur.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'@modelcontextprotocol/node': patch
'@modelcontextprotocol/client': patch
'@modelcontextprotocol/server': patch
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

remove npm references, use pnpm
2 changes: 1 addition & 1 deletion .changeset/register-rawshape-compat.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
'@modelcontextprotocol/server': patch
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/resource-not-found-32602.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@modelcontextprotocol/core": minor
"@modelcontextprotocol/core-internal": minor
"@modelcontextprotocol/server": major
"@modelcontextprotocol/client": minor
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/restore-task-wire-types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/server': minor
'@modelcontextprotocol/client': minor
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/rich-hounds-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'@modelcontextprotocol/node': patch
'@modelcontextprotocol/client': patch
'@modelcontextprotocol/server': patch
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

clean up package manager usage, all pnpm
2 changes: 1 addition & 1 deletion .changeset/schema-object-type-for-unions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
---

Ensure `standardSchemaToJsonSchema` emits `type: "object"` at the root, fixing discriminated-union tool/prompt schemas that previously produced `{oneOf: [...]}` without the MCP-required top-level type. Also throws a clear error when given an explicitly non-object schema (e.g. `z.string()`). Fixes #1643.
2 changes: 1 addition & 1 deletion .changeset/sep-2106-dialect-posture.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': major
'@modelcontextprotocol/server': major
---
Expand Down
2 changes: 1 addition & 1 deletion .changeset/sep-2243-mcp-param-client.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/client': minor
---

Expand Down
4 changes: 2 additions & 2 deletions .changeset/sep-2243-std-header-server.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
'@modelcontextprotocol/core': minor
'@modelcontextprotocol/core-internal': minor
'@modelcontextprotocol/server': minor
---

SEP-2243 standard-header server-side validation (protocol revision 2026-07-28). On the modern (2026-07-28) serving path, `createMcpHandler` now enforces the required `Mcp-Method` and `Mcp-Name` standard request headers in addition to the existing `MCP-Protocol-Version` and `Mcp-Method` cross-checks: a modern request without an `Mcp-Method` header, a `tools/call` / `prompts/get` / `resources/read` request without an `Mcp-Name` header, an `Mcp-Name` header carrying an invalid `=?base64?…?=` sentinel, and an `Mcp-Name` header whose (decoded) value disagrees with the body's `params.name` / `params.uri` are all rejected with `400 Bad Request` and JSON-RPC `-32020` (`HeaderMismatch`). The 2025-era serving paths are unchanged.

New public surface:

- `@modelcontextprotocol/core`: `validateStandardRequestHeaders` (function), `MCP_NAME_HEADER_SOURCE` (const), the `mcpNameHeader` field on `InboundHttpRequest`, and the `'standard-header-validation'` member of `InboundValidationRung` (with `client-capabilities` / `param-header-validation` renumbered).
- `@modelcontextprotocol/server`: the `mcpNameHeader` field on `InboundHttpRequest`, and the `'standard-header-validation'` member of `InboundValidationRung` (with `client-capabilities` / `param-header-validation` renumbered).
2 changes: 1 addition & 1 deletion .changeset/sep-2577-deprecate-runtime-apis.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/core-internal': patch
'@modelcontextprotocol/server': patch
'@modelcontextprotocol/client': patch
---
Expand Down
Loading
Loading