Skip to content

Make the draft-spec scenarios internally consistent (fixes #311, #312, #315)#319

Merged
pcarleton merged 4 commits into
mainfrom
paulc/draft-2026-suite-reconciliation
May 26, 2026
Merged

Make the draft-spec scenarios internally consistent (fixes #311, #312, #315)#319
pcarleton merged 4 commits into
mainfrom
paulc/draft-2026-suite-reconciliation

Conversation

@pcarleton
Copy link
Copy Markdown
Member

Each draft scenario landed in its own PR and only set up the one requirement it tests, so a strictly-conformant SDK rejects the harness's own requests. This makes every draft scenario speak the same stateless wire format. Follows #317.

Commits

  1. everything-server: complete the stateless path — serves resources/* (incl. SEP-2164 -32602 + data.uri) and SEP-2549 ttlMs/cacheScope hints.
  2. Make the harness's own draft traffic conformant — shared stateless request helper that always sends the SEP-2243 standard headers and SEP-2575 _meta; migrates the draft scenarios onto it: SEP-2322 helpers and server-stateless now send Mcp-Method/Mcp-Name (server-stateless doesn't set mcp-method etc. #312), the SEP-2243 server scenarios drop the legacy initialize handshake and carry _meta on every raw request (http-header-validation missing io.modelcontextprotocol/protocolVersion #311), caching and sep-2164-resource-not-found are stateless DRAFT-2026-v1 requests instead of an SDK 2025-11-25 session (caching scenario should use DRAFT-2026-v1 #315). -32004 for unsupported version; SEP-2549/2164 negative fixtures rewritten as stateless servers.
  3. Review follow-ups — feature-based naming (stateless-client.ts, sendStatelessRequest, buildStandardHeaders; "draft" only remains in DRAFT_PROTOCOL_VERSION), SSE-tolerant parsing, louder setup failures, worst-status latching in the request-metadata judge, resources advertised in stateless server/discover.
  4. Slim the helper — single spec version, no version-retry, minimal options (~270 lines).

Verification

Notes

  • caching and sep-2164-resource-not-found now require SEP-2575 stateless support from the server under test (they are draft-only requirements).
  • http-header-validation / http-custom-header-server-validation stay in pending (everything-server doesn't enforce SEP-2243 yet) but are now self-consistent and runnable via --suite draft.
  • A CI self-conformance gate and trace-based assertions are deliberate follow-ups to keep this diff small.

pcarleton added 4 commits May 26, 2026 21:04
…teless draft path

The stateless (SEP-2575) request path now answers resources/list,
resources/templates/list and resources/read — including the SEP-2164
-32602 + data.uri error for unknown URIs — and includes the SEP-2549
ttlMs/cacheScope hints on its cacheable list results, matching what the
draft-spec scenarios exercise.
Fixes the class of issues where a strictly-conformant SDK rejects the
harness's requests for reasons unrelated to the behaviour under test
(#311, #312, #315).

- add a shared stateless draft request helper (draft-client.ts) that puts
  the cross-cutting SEP-2243 headers (Mcp-Method, Mcp-Name,
  MCP-Protocol-Version, Accept) and SEP-2575 _meta (protocolVersion,
  clientInfo, clientCapabilities) on every request, with overrides for
  negative cases and the SHOULD-level retry on
  UnsupportedProtocolVersionError
- migrate the draft scenarios onto it: the SEP-2322 helpers and
  server-stateless now send Mcp-Method/Mcp-Name (#312); the SEP-2243
  server scenarios drop the legacy initialize handshake and carry _meta on
  every raw request (#311); caching and sep-2164-resource-not-found are
  stateless DRAFT-2026-v1 requests instead of an SDK 2025-11-25 session
  (#315)
- add a draft self-conformance gate (draft-self-conformance.test.ts) that
  points the harness's own draft drivers at the existing client-testing
  judge scenarios (request-metadata, http-standard-headers) and requires
  zero failures or warnings
- align the request-metadata mock's unsupported-version rejection with the
  draft schema (-32004) and teach the everything-client to recognize it
- rewrite the SEP-2549/SEP-2164 negative example servers as stateless
  draft servers so they keep exercising the violation, not the transport
…view

- rename draft-client.ts to stateless-client.ts and name the helpers by
  feature (sendStatelessRequest, buildStandardHeaders, buildRequestMeta,
  withRequestMeta, CONFORMANCE_CLIENT_INFO); 'draft' now only appears in
  DRAFT_PROTOCOL_VERSION, the one name that tracks the moving target
- retry only genuine UnsupportedProtocolVersionError rejections (-32004,
  tolerating -32001/-32602) and only with recognized versions; record the
  retry on the response
- parse text/event-stream responses incrementally and resolve on the
  matching event instead of blocking until the timeout
- keep the MCP-Protocol-Version header and _meta protocolVersion in sync
  when the version is overridden via meta overrides
- make server-stateless's sendRpc SSE-tolerant
- emit explicit setup failures in the SEP-2243 server scenarios when the
  tools/list discovery fails instead of misleading per-case results
- latch the worst status per check in the request-metadata judge so an
  early violation cannot be masked by a later conformant request
- rename the gate to harness-traffic-conformance.test.ts and derive its
  driver list from the draft suite with documented per-judge exclusions
  (35 pairings)
- everything-server: advertise resources in stateless server/discover and
  use -32004 for unsupported protocol version
- add unit tests for the helper (retry guard, SSE handling, header/_meta
  version sync, default headers)
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

Open in StackBlitz

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

commit: 41e9566

@pcarleton pcarleton merged commit 076b417 into main May 26, 2026
8 checks passed
@pcarleton pcarleton deleted the paulc/draft-2026-suite-reconciliation branch May 26, 2026 20:10
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