conformance/src/scenarios/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
claude[bot] 0c85302241
fix: use negotiated protocol version in server-sse-polling raw requests (#416)
* fix: use negotiated protocol version in sse-polling raw requests

The server-sse-polling scenario hard-coded mcp-protocol-version:
2025-11-25 on its raw tools/call POST and Last-Event-ID reconnection
GET instead of the version negotiated during initialize — the same
bug class as #412. A server that enforces the negotiated session
version rejects those requests once it negotiates any other version.

Read transport.protocolVersion after client.connect() and use it for
both raw request headers, falling back to the run's spec version,
mirroring the sse-multiple-streams fix (#415). Add a regression test
whose fixture server down-negotiates to 2025-06-18 and 400s any
request whose MCP-Protocol-Version header does not match, so a fix
that hard-codes the latest version cannot pass.

Follow-up to #415.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178cz8nAyFRHQyq9cg2XgZz

* test: harden sse-polling regression fixture per review panel

Enforce session id alongside protocol version in the fixture, record
Last-Event-ID presence per GET so the SDK's automatic standalone GET
cannot satisfy the reconnect assertion, normalize the header type
instead of casting, return a descriptive 400 body on the GET path,
add Allow to 405s, use the spec-shaped empty-data priming event, and
read sessionId via the SDK's public getter in the scenario.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178cz8nAyFRHQyq9cg2XgZz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-27 13:21:11 +01:00
..
tasks fix: fail checks whose prerequisite is missing instead of skipping them (#372) 2026-06-30 11:42:01 +01:00
all-scenarios.test.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
caching.ts fix: update the draft wire version to 2026-07-28 (#331) 2026-06-08 16:47:17 +01:00
dns-rebinding.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
elicitation-defaults.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
elicitation-enums.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
http-standard-headers.test.ts fix: fail checks whose prerequisite is missing instead of skipping them (#372) 2026-06-30 11:42:01 +01:00
http-standard-headers.ts fix: fail checks whose prerequisite is missing instead of skipping them (#372) 2026-06-30 11:42:01 +01:00
input-required-result-helpers.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
input-required-result.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
json-schema-2020-12.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
lifecycle.test.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
lifecycle.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
negative-mrtr.test.ts Feat/tasks mrtr extension (#262) 2026-06-18 19:14:02 +01:00
negative.test.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
prompts.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
resources.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
sse-multiple-streams.test.ts fix: use negotiated protocol version in sse-multiple-streams raw POSTs (#415) 2026-07-27 11:59:17 +01:00
sse-multiple-streams.ts fix: use negotiated protocol version in sse-multiple-streams raw POSTs (#415) 2026-07-27 11:59:17 +01:00
sse-polling.test.ts fix: use negotiated protocol version in server-sse-polling raw requests (#416) 2026-07-27 13:21:11 +01:00
sse-polling.ts fix: use negotiated protocol version in server-sse-polling raw requests (#416) 2026-07-27 13:21:11 +01:00
stateless.test.ts fix(server-stateless): declare the elicitation capability on the streaming-probe request (#383) 2026-07-27 10:45:48 +00:00
stateless.ts fix(server-stateless): declare the elicitation capability on the streaming-probe request (#383) 2026-07-27 10:45:48 +00:00
tools.test.ts feat: Tool name format checks (SEP-986) (#240) 2026-04-24 11:57:36 +01:00
tools.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00
utils.ts feat: version-aware Connection abstraction for server scenarios (#318) 2026-06-01 17:09:13 +01:00