feat: implement MCP-Protocol-Version header requirement for HTTP transport (#898)

This commit is contained in:
Felix Weinberger 2025-06-12 18:01:53 +01:00 • committed by GitHub
commit df15e9566d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,14 @@ for reference.
LATEST_PROTOCOL_VERSION = "2025-03-26"
"""
The default negotiated version of the Model Context Protocol when no version is specified.
We need this to satisfy the MCP specification, which requires the server to assume a
specific version if none is provided by the client. See section "Protocol Version Header" at
https://modelcontextprotocol.io/specification
"""
DEFAULT_NEGOTIATED_VERSION = "2025-03-26"
ProgressToken = str | int
Cursor = str
Role = Literal["user", "assistant"]