Skip to content

fix: update the draft wire version to 2026-07-28#331

Merged
pcarleton merged 2 commits into
mainfrom
fweinberger/draft-wire-version
Jun 8, 2026
Merged

fix: update the draft wire version to 2026-07-28#331
pcarleton merged 2 commits into
mainfrom
fweinberger/draft-wire-version

Conversation

@felixweinberger

Copy link
Copy Markdown
Collaborator

Aligns the harness's draft wire protocolVersion with what the spec's draft
schema actually declares: 2026-07-28 instead of the old DRAFT-2026-v1
placeholder.

Motivation and Context

The spec repo pinned the draft protocol version to the RC date in
modelcontextprotocol/modelcontextprotocol#2791: schema/draft/schema.ts now
declares LATEST_PROTOCOL_VERSION = "2026-07-28". The harness's
DRAFT_PROTOCOL_VERSION (src/types.ts) is documented as mirroring that
constant ("bump when that constant changes"), but still carried the
placeholder. As a result, an SDK that implements the draft spec and sends the
version the draft schema declares cannot pass the draft suite — the mock
server refuses to negotiate it, and scenario checks that assert the version
string fail. #315 already anticipated swapping the placeholder for "the real
value when available"; this PR does that swap.

Two commits:

  1. chore: sync spec-types to modelcontextprotocol@0168c57f — refreshes the
    vendored schemas via npm run sync-schema (only draft.ts and SOURCE
    change; the dated schemas are identical).
  2. fix: update the draft wire version to 2026-07-28 — bumps
    DRAFT_PROTOCOL_VERSION, updates the hard-coded literals in tests, the
    example servers, and the README, and adds src/types.test.ts pinning
    DRAFT_PROTOCOL_VERSION to the vendored draft schema's
    LATEST_PROTOCOL_VERSION so the two can no longer drift silently (plus a
    guard that the draft identifier stays distinct from the dated versions).

How Has This Been Tested?

  • npm test: 270 passed (270), 26 test files — includes the new
    src/types.test.ts invariant tests
  • npm run check (tsgo typecheck + eslint + prettier): clean
  • npm run build: clean

Breaking Changes

For anyone already running the draft suite against DRAFT-2026-v1: the
accepted wire version is now 2026-07-28, and --spec-version DRAFT-2026-v1
no longer resolves. The draft alias is unaffected and remains the
recommended way to target the draft suite. Dated-version behavior
(2025-03-26 / 2025-06-18 / 2025-11-25) is unchanged.

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

2026-07-28 looks like a dated release identifier but is still the draft: it
is the RC date the spec pinned in advance (see
modelcontextprotocol/modelcontextprotocol#2791). The harness keeps treating it
as the draft version — distinct from DATED_SPEC_VERSIONS, selected by the
draft alias and suite — so nothing about scenario applicability or version
ordering changes, only the wire string.

Refreshes the vendored schema copies via npm run sync-schema. The draft
schema now declares LATEST_PROTOCOL_VERSION = "2026-07-28" (previously
the DRAFT-2026-v1 placeholder) and picks up the latest draft doc-comment
and type updates. The dated schemas are unchanged.
The spec repo's draft schema now declares
LATEST_PROTOCOL_VERSION = "2026-07-28", but the harness still asserted
the old DRAFT-2026-v1 placeholder, so an SDK that sends the version the
draft spec actually declares cannot pass the draft suite.

- bump DRAFT_PROTOCOL_VERSION in src/types.ts to 2026-07-28
- update the hard-coded literals in tests, example servers, and README
- add src/types.test.ts pinning DRAFT_PROTOCOL_VERSION to the vendored
  draft schema's LATEST_PROTOCOL_VERSION so the two cannot drift, and
  asserting the draft identifier stays distinct from the dated versions
@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@331

commit: b42db5f

@felixweinberger felixweinberger requested a review from pcarleton June 8, 2026 13:47
@pcarleton pcarleton merged commit 6f83abf into main Jun 8, 2026
8 checks passed
@pcarleton pcarleton deleted the fweinberger/draft-wire-version branch June 8, 2026 15:47
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.

3 participants