Skip to content

chore(core): repin the 2026-07-28 spec references at spec commit 2fb207da#2318

Merged
felixweinberger merged 4 commits into
v2-2026-07-28from
fweinberger/spec-anchor-2026-06-18
Jun 18, 2026
Merged

chore(core): repin the 2026-07-28 spec references at spec commit 2fb207da#2318
felixweinberger merged 4 commits into
v2-2026-07-28from
fweinberger/spec-anchor-2026-06-18

Conversation

@felixweinberger

Copy link
Copy Markdown
Contributor

Re-pin the 2026-07-28 draft references (vendored spec types, schema.json twins, example corpus) to
the latest spec commit (2fb207da) and align the 2026-era wire surface with it.

Motivation and Context

The 2026-07-28 draft schema moved upstream (spec PRs #2889/#2890/#2891). The vendored reference
artifacts and the 2026-era wire registry must track it so the type-parity and corpus oracles stay
honest and so the 2026-era surface does not advertise vocabulary the draft has removed.

How Has This Been Tested?

  • Full workspace build, typecheck, lint and docs check.
  • All package unit suites and the full e2e matrix (2539 passed / 205 expected-fail).
  • Integration suite (347 passed).
  • Conformance suite against the published referee pin — all three legs unchanged vs the
    pre-change baseline (324/24/1 client, 42/0 server, 39/13 server-draft).

Breaking Changes

None for users on the released 2025-11-25 surface. On connections negotiated at the 2026-07-28
draft revision, notifications/elicitation/complete is no longer a wire method (sending it —
including via Server.createElicitationCompletionNotifier() — now fails locally with
SdkErrorCode.MethodNotSupportedByProtocolVersion; inbound copies are dropped as unknown), and
notifications/cancelled parses with requestId required. Both follow the upstream draft.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

  • Regenerated artifacts (anchor types, schema-twin, example corpus, manifests) via the existing
    fetch:spec-types / fetch:schema-twins / fetch:spec-examples scripts; the 2025-11-25 twin
    is byte-identical.
  • The 2026-era notifications/cancelled is now an era-local fork (the shared schema keeps the
    frozen 2025-11-25 optional-requestId shape); the notification _meta shape types the
    io.modelcontextprotocol/subscriptionId key (shape only — listen delivery is separate work).
  • -32001 is now documented as the draft schema's HEADER_MISMATCH constant (comment only; the
    emitted behavior already matched).
  • Coordinates with (does not depend on) the upstream automated anchor-refresh PR
    typescript-sdk chore: update spec.types.ts from upstream #2027, which carries the anchor file only and not the twins/corpus/oracle updates
    this change includes.

…07da

Regenerate the vendored draft-revision reference artifacts against the
current spec main (2fb207da; schema.ts last touched at 91b403f8):

- packages/core/src/types/spec.types.2026-07-28.ts via fetch:spec-types
- the schema.json twins + manifest via fetch:schema-twins (the 2025-11-25
  twin is byte-identical; only the 2026-07-28 twin and the provenance pin
  move)
- the 2026-07-28 example corpus + manifest via fetch:spec-examples
  (ElicitationCompleteNotification/elicitation-complete.json removed
  upstream, HeaderMismatchError/header-mismatch.json added,
  ElicitRequestURLParams/elicit-sensitive-data.json no longer carries
  elicitationId; directory/file counts unchanged at 86/127)

Wire-surface and test reconciliation land in the follow-up commits of this
change.
…hema

- Drop notifications/elicitation/complete from the 2026-07-28 notification
  registry: the draft removed the notification (and elicitationId on
  URL-mode elicitation), so it is 2025-11-25-only vocabulary. On 2026-era
  connections an outbound send now dies locally with a typed error and
  inbound copies are dropped as unknown; the 2025-11-25 path is unchanged.
- Fork notifications/cancelled for the 2026 era: requestId is required on
  this revision, and the notification _meta shape types the
  io.modelcontextprotocol/subscriptionId key (shape only - listen delivery
  is out of scope here). The shared schema keeps the frozen 2025-11-25
  optional shape.
- Document Server.createElicitationCompletionNotifier() as
  2025-11-25-only and note its behavior on 2026-era connections.
- Refresh the header-mismatch comment: -32001 is now the draft schema's
  HEADER_MISMATCH constant, not just a conformance-suite assertion
  (comment only; emitted behavior unchanged).

Changeset included; no public API surface changes.
…h the regenerated anchor

- spec.types.2026-07-28.test.ts: drop the checks for the removed
  ElicitationCompleteNotification(Params) types; compare the cancelled
  notification (and the ClientNotification union, now cancelled-only) and
  the new NotificationMetaObject against the 2026-era wire forks; move the
  ElicitRequest/ElicitRequestParams/ElicitRequestURLParams comparisons to
  the feature-owned pending list (the 2026-era in-band elicitation shape,
  which no longer carries elicitationId, lands with the multi-round-trip
  work); add HeaderMismatchError to the validation-ladder pending entries.
  The exported-type count pin stays at 151.
- specCorpus.test.ts: map the new HeaderMismatchError example directory as
  an error-object directory and record the regenerated
  ElicitRequestURLParams example as a pending file until the in-band
  elicitation surface models the elicitationId-less shape.
…entryModern arm

The 2026-07-28 wire registry no longer carries
notifications/elicitation/complete (the draft removed the notification),
so on a 2026-era connection the client drops inbound copies as unknown
and the row's received-then-ignored assertion observes nothing. Annotate
the requirement with the existing method-not-in-modern-registry entry
exclusion so the entryModern cell is not registered; the 2025-era cells
(and the stateful-transport elicitation:url:complete-notification row)
are unchanged.
@felixweinberger felixweinberger requested a review from a team as a code owner June 18, 2026 11:53
@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a4d58f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@modelcontextprotocol/core Patch
@modelcontextprotocol/client Patch
@modelcontextprotocol/server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@2318

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/codemod@2318

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@2318

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server-legacy@2318

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@2318

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/fastify@2318

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@2318

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@2318

commit: a4d58f7

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any bugs — the changeset claims (2026-era elicitation/complete now failing locally with MethodNotSupportedByProtocolVersion, the cancelled-notification requestId fork) check out against the implementation — but this re-pin makes deliberate wire-surface changes on the 2026-07-28 draft era, so it's worth a human confirming the new spec commit and the era-fork decisions.

Extended reasoning...

Overview

This PR re-pins the vendored 2026-07-28 draft references (anchor types, schema.json twin, example corpus, manifests) to spec commit 2fb207da and aligns the 2026-era wire surface: notifications/elicitation/complete is removed from the 2026 registry/schemas, notifications/cancelled gains an era-local fork with required requestId, a NotificationMetaSchema types the subscriptions/listen _meta key, and the parity/corpus suites and pending lists are reconciled. There is also a comment-only update documenting -32001 as the draft's HEADER_MISMATCH constant, a JSDoc note on Server.createElicitationCompletionNotifier(), an e2e arm exclusion, and a changeset.

Verification of claims

The changeset's behavioral claims are backed by code: the outbound era gate in packages/core/src/shared/protocol.ts throws SdkErrorCode.MethodNotSupportedByProtocolVersion for spec notifications absent from the negotiated era's registry, and notifications/elicitation/complete remains in the 2025-11-25 registry (so isSpecNotificationMethod still classifies it), meaning a 2026-negotiated connection now fails locally as described while 2025-11-25 behavior is untouched. The new CancelledNotificationParamsSchema fork and NotificationMetaSchema use z.looseObject/optional members consistent with the regenerated anchor, and the corpus/parity pending entries are stale-checked by the existing harnesses.

Security risks

None apparent — the changes are vendored test artifacts, Zod schema forks for a draft protocol revision, and documentation. No auth, crypto, or input-handling on the released surface is modified; if anything, requiring requestId on 2026-era cancellation is stricter parsing.

Level of scrutiny

Moderate-to-high: most of the diff is regenerated reference material, but the wire registry/schema changes in packages/core/src/wire/rev2026-07-28/ are protocol-correctness-critical and encode deliberate behavior changes (a notification removed from a wire era, a requiredness fork). These follow the upstream draft, but confirming the pinned spec commit is the intended one and that the era-fork strategy (era-local cancelled fork vs. shared schema) matches maintainer intent is a judgment call for a human, so I'm not shadow-approving.

Other factors

The bug-hunting system found no bugs, the PR description reports full unit/e2e/integration/conformance runs with unchanged conformance baselines, and the existing registry-diff and twin-hash oracles should keep the regenerated artifacts honest. The 2025-11-25 twin is byte-identical per the manifest, limiting blast radius to the unreleased draft surface.

@felixweinberger felixweinberger merged commit f8d8fc0 into v2-2026-07-28 Jun 18, 2026
15 checks passed
@felixweinberger felixweinberger deleted the fweinberger/spec-anchor-2026-06-18 branch June 18, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant