part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
A checklist derived from the MUSTs and SHOULDs of the guide, organised by role, era and transport. Each line should correspond to an automated test (conformance suite, your own tests or Inspector scenarios).
Modern (2026-07-28)
server/discover with supportedVersions, capabilities, instructions, serverInfo, ttlMs, cacheScope.protocolVersion/clientCapabilities with -32602 and HTTP 400.-32022 with supported for unsupported versions; -32021 with requiredCapabilities when a capability is missing.result carries resultType; input_required only in tools/call, resources/read, prompts/get.ttlMs/cacheScope; pagination with opaque cursors.subscriptions/listen: acknowledgement as the first message with subscriptionId; only the requested types; orderly close with complete.Accept; 202 for notifications; validation of MCP-Protocol-Version/Mcp-Method/Mcp-Name/Mcp-Param-* with -32020; 404+-32601 for unknown methods; Origin → 403; 405 to GET/DELETE; ignores Mcp-Session-Id and Last-Event-ID; stream close = cancellation; X-Accel-Buffering: no.requestState protected (HMAC/AEAD, principal, TTL, digest).-32768..-32000; -32602 for a non-existent resource; never contents: [] for a non-existent one.WWW-Authenticate with resource_metadata and scope; validation of signature/exp/aud/iss/scopes; 401/403 insufficient_scope; does not accept tokens for another audience; offline_access not in scopes_supported.Legacy (≤ 2025-11-25)
initialize/initialized; version negotiation; per-session capabilities; ping.Mcp-Session-Id (visible ASCII), 400 without a session, 404 on expiry, DELETE; optional GET with SSE; MCP-Protocol-Version (assume 2025-03-26 if missing); disconnection ≠ cancellation; client responses via POST → 202.resources/subscribe/unsubscribe; logging/setLevel; server requests over the stream if you translate MRTR.server/discover and a fallback not tied to a code; HTTP with inspection of the 400 body; cache per process/origin._meta in every request (version, capabilities, clientInfo); MCP-Protocol-Version equal to the body; Mcp-Method/Mcp-Name/Mcp-Param-* with sentinel encoding; excludes tools with an invalid x-mcp-header and logs the reason.Last-Event-ID to modern servers; re-issues with a new id after a cut; closes streams to cancel; per-request timeouts with an absolute maximum.requestState; distinct id; no parallel reuse; round limit.resultType as complete; accepts -32002 from legacy; unknown resultType values → invalid.private by context; does not cache MRTR retries; invalidates on list_changed; jitter/backoff.$ref; composition limits; validates arguments and structuredContent.initialize with the latest translated version, initialized, HTTP session, GET, resumption, notifications/cancelled, responses to server requests.issuer validation; registration (pre-registration → CIMD → DCR with application_type); PKCE S256 verified via metadata; resource always; state; iss validation; token only in the header; credentials per issuer; secure refresh; step-up with scope union and limited retries; SSRF mitigations.stderr captured without assuming an error; shutdown (close stdin → wait → SIGTERM → SIGKILL); restart and re-opening of subscriptions.includeContext forced to none.instructions flagged; anti-injection filters.requestState and sessions hashed; OTel traces.extensions advertised only if governed; unknown ones blocked by default.resultType: "task" only to whoever declared it; tasks/get/update/cancel; binding to sub; persisted ids.1. Which test best demonstrates that the gateway is conformant on its north side?
It is the executable definition of the spec.
2. On the south side, how many protocol versions must the gateway be able to negotiate to cover the full matrix?
Dual-era: 2026-07-28 and, at a minimum, 2025-11-25.