Client-side 2026-07-28 support: .discover()/.adopt() + Client(mode=); request-metadata green (#2950)

This commit is contained in:
Max 2026-06-25 16:09:23 +02:00 • committed by GitHub
commit f226d00d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,8 @@ class ClientMessageMetadata:
resumption_token: ResumptionToken | None = None
on_resumption_token_update: Callable[[ResumptionToken], Awaitable[None]] | None = None
# Per-message HTTP headers (e.g. MCP-Protocol-Version, Mcp-Method) the transport should set.
headers: dict[str, str] | None = None
@dataclass
@ -35,9 +37,6 @@ 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)