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
If no protocol version is specified, the latest stable version will be applied by default.
589
-
The latest stable version includes new features from the [draft version](https://modelcontextprotocol.io/specification/draft).
588
+
If no protocol version is specified, the latest handshake version (`2025-11-25`) is applied by default.
590
589
591
590
This will make all new server instances use the specified protocol version instead of the default version. The protocol version can be reset to the default by setting it to `nil`:
If an invalid `protocol_version` value is set, an `ArgumentError` is raised.
598
597
598
+
The pin scopes the `initialize` handshake, so it accepts handshake versions (`2025-11-25` and earlier) only. Per the SEP-2575 era model,
599
+
`2026-07-28` carries its version on every request and has no handshake at all, so there is nothing for a pin to configure there and setting it raises `ArgumentError`;
600
+
a client asking `initialize` for a modern version is counter-offered the pinned version (or the latest handshake version), matching the TypeScript and Python SDKs.
601
+
Clients reach `2026-07-28` through `server/discover` and the per-request `_meta` envelope, which the bundled transports serve alongside the handshake with no configuration needed.
602
+
599
603
Be sure to check the [MCP spec](https://modelcontextprotocol.io/specification/versioning) for the protocol version to understand the supported features for the version being set.
@@ -99,7 +99,7 @@ After `connect` succeeds, the HTTP transport captures the `Mcp-Session-Id` heade
99
99
100
100
```ruby
101
101
http_transport.session_id # => "abc123..."
102
-
http_transport.protocol_version # => "2026-07-28"
102
+
http_transport.protocol_version # => "2025-11-25"
103
103
```
104
104
105
105
If the server terminates the session, subsequent requests return HTTP 404 and the transport raises `MCP::Client::SessionExpiredError` (a subclass of `RequestHandlerError`). Session state is cleared automatically; callers should start a new session by calling `connect` again.
0 commit comments