Follow-up from #1610 (draft 2026-07-28 sessionless/stateless work). Two small server-side validation gaps that were punted:
1. HeaderMismatch (-32001) protocolVersion validation
The server does not currently compare the HTTP MCP-Protocol-Version header against the per-request _meta io.modelcontextprotocol/protocolVersion value (SEP-2567). When they disagree it should reject with a HeaderMismatch (-32001) error rather than silently trusting one.
2. Stray Mcp-Session-Id on draft requests
A draft (sessionless) request that nonetheless carries an Mcp-Session-Id header currently returns 400. Per the spec the session header is meaningless in sessionless mode and should be ignored (no-op), not rejected.
Notes
Both are server-side; add RawHttpConformanceTests-style regression coverage.
cc #1610
Follow-up from #1610 (draft
2026-07-28sessionless/stateless work). Two small server-side validation gaps that were punted:1. HeaderMismatch (-32001) protocolVersion validation
The server does not currently compare the HTTP
MCP-Protocol-Versionheader against the per-request_metaio.modelcontextprotocol/protocolVersionvalue (SEP-2567). When they disagree it should reject with aHeaderMismatch(-32001) error rather than silently trusting one.2. Stray
Mcp-Session-Idon draft requestsA draft (sessionless) request that nonetheless carries an
Mcp-Session-Idheader currently returns400. Per the spec the session header is meaningless in sessionless mode and should be ignored (no-op), not rejected.Notes
Both are server-side; add
RawHttpConformanceTests-style regression coverage.cc #1610