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.
In 2026-07-28 the protocol version is negotiated in every request. There is no prior phase: the client sends the version it wants to use and the server accepts it or rejects it with an error listing the ones it does support.
params._meta["io.modelcontextprotocol/protocolVersion"] (mandatory in every request).MCP-Protocol-Version header. Both values MUST match; if not, the server MUST respond 400 with HeaderMismatch (-32020).POST /mcp HTTP/1.1
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientCapabilities":{}}}}
If the server does not implement the requested version (unknown, or known but unsupported), it MUST respond:
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32022, "message": "Unsupported protocol version",
"data": { "supported": ["2026-07-28", "2025-11-25"], "requested": "2027-01-01" } } }
Over HTTP, with 400 Bad Request. The client SHOULD pick a version from supported and retry, or inform the user if there is none in common.
Clients and servers MAY support several versions simultaneously. A dual-era server, for example, announces ["2026-07-28", "2025-11-25"] and serves the second with legacy semantics (session, initialize) when the client opens with a handshake.
server/discover returns supportedVersions. Calling it is optional: the spec says a client may issue any RPC directly and handle the -32022 if it arrives. In stdio, moreover, it is the recommended probe for detecting the era (lesson 4.4).
A server that wants to serve clients earlier than 2025-06-18 (which did not know MCP-Protocol-Version) MAY interpret its absence as 2025-03-26. A server that does not serve them MUST reject the request without the header as per server validation.
supported list and the version you use with it. Retry automatically exactly once on -32022; if it fails, mark the server as incompatible and alert.2025-11-25 if you do not implement sessions and initialize.-32022: it usually reveals outdated hosts or servers.1. What happens if MCP-Protocol-Version and _meta.protocolVersion do not match?
The spec requires rejecting the request when the header does not match the body.
2. Is it mandatory to call server/discover before the first request?
The client may issue any RPC and handle -32022; in dual-era stdio, probing is recommended.
3. What does data contain in UnsupportedProtocolVersionError?
data.supported lists the server's versions and data.requested the one the client asked for.