Resolve protocol version per request and expose it as ctx.protocol_version (#2886)
This commit is contained in:
parent
c85ccf1c6f
commit
734746a3d9
1 changed files with 175 additions and 28 deletions
|
|
@ -35,6 +35,9 @@ class ServerMessageMetadata:
|
|||
# transports, None for stdio). Typed as Any because the server layer is
|
||||
# transport-agnostic.
|
||||
request_context: Any = None
|
||||
# Per-message protocol version observed by the transport (e.g. the
|
||||
# validated MCP-Protocol-Version header).
|
||||
protocol_version: str | None = None
|
||||
# Callback to close SSE stream for the current request without terminating
|
||||
close_sse_stream: CloseSSEStreamCallback | None = None
|
||||
# Callback to close the standalone GET SSE stream (for unsolicited notifications)
|
||||
|
|
|
|||
Loading…
Reference in a new issue