You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 52546fa
Browse filesBrowse the repository at this point in the historyBrowse files
ClientSession: install per-request stamp at connect time; transport becomes pv-agnostic
The era difference is now which stamp closure was installed, not a flag
send_request reads:
- Three stamp builders: _preconnect_stamp (cancel-suppressed only),
_make_handshake_stamp (pv header), _make_modern_stamp (_meta envelope +
cancel-suppressed + pv/method/name headers)
- ClientSession.adopt(InitializeResult | DiscoverResult) installs negotiated
state without wire traffic; .initialize() now calls .adopt(result) so the
handshake stamp is installed before notifications/initialized goes out
- send_request and send_notification call self._stamp(data, opts)
unconditionally — _stateless_pinned, _pinned_version, and the inline
envelope branch are deleted
- ClientSession(protocol_version=) and Client.protocol_version removed
- StreamableHTTPTransport drops protocol_version, _per_message_headers,
_maybe_extract_protocol_version_from_message; _prepare_headers no longer
derives the pv header. The transport caches the pv header from the first
stamped POST's metadata and reuses it on transport-internal GET/DELETE
- streamable_http_client(protocol_version=) removed
- Interaction-suite [streamable-http-2026-07-28] arm now drives via
ClientSession + .adopt(DiscoverResult); pagination/cancellation tests
adapted to the Client|ClientSession common subset
- migration.md documents the removals
Copy file name to clipboardExpand all lines: docs/migration.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,10 @@ The `headers`, `timeout`, `sse_read_timeout`, and `auth` parameters have been re
159
159
160
160
Note: `sse_client` retains its `headers`, `timeout`, `sse_read_timeout`, and `auth` parameters — only the streamable HTTP transport changed.
161
161
162
+
### `protocol_version` removed from `StreamableHTTPTransport` and `streamable_http_client`
163
+
164
+
The `protocol_version` attribute on `StreamableHTTPTransport` and the `protocol_version` parameter on `streamable_http_client` have been removed. The transport no longer holds per-connection protocol state; era-dependent headers (e.g. `MCP-Protocol-Version`) are supplied per-message by the session, so the transport never needs to know the negotiated version.
165
+
162
166
### `terminate_windows_process` removed
163
167
164
168
The deprecated `mcp.os.win32.utilities.terminate_windows_process` function has been
@@ -350,6 +354,10 @@ if result is not None:
350
354
351
355
The high-level `Client.initialize_result` returns the same `InitializeResult` but is non-nullable — initialization is guaranteed inside the context manager, so no `None` check is needed. This replaces v1's `Client.server_capabilities`; use `client.initialize_result.capabilities` instead.
352
356
357
+
### `ClientSession(protocol_version=)` removed
358
+
359
+
The `protocol_version` constructor parameter on `ClientSession` has been removed. To install a known protocol version without performing the `initialize` handshake (e.g. when reconnecting to an existing session), call `session.adopt(result)` after construction with a stored `InitializeResult`.
360
+
353
361
### `McpError` renamed to `MCPError`
354
362
355
363
The `McpError` exception class has been renamed to `MCPError` for consistent naming with the MCP acronym style used throughout the SDK.
0 commit comments