Skip to content

Commit d76fd02

Browse files
committed
[Client] State what getSessionId() returns on 2026-07-28
That revision removed protocol-level sessions (SEP-2567), so the getter is always null there. Adds the changelog entry.
1 parent 6da33f8 commit d76fd02

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `mcp/sdk` will be documented in this file.
44

5+
0.9.0
6+
-----
7+
8+
* Add `HttpTransport::getSessionId()` to read the server-minted `Mcp-Session-Id`: a request-scoped caller can persist it and pass it back through the constructor's `$headers` on a later transport. Always `null` on `2026-07-28`, which removed protocol-level sessions.
9+
510
0.8.0
611
-----
712

src/Client/Transport/HttpTransport.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,11 @@ public function onHeaders(callable $callback): void
124124
/**
125125
* The session ID minted by the server for this connection, if any.
126126
*
127-
* Captured from the Mcp-Session-Id response header of legacy-era stateful
128-
* servers. Callers that cannot keep the transport alive between protocol
129-
* interactions (request-scoped PHP runtimes, for example) can persist this
130-
* value and pass it back through the constructor's $headers parameter on a
131-
* later transport, which deliberately wins over the internally tracked
132-
* value, to address the same server-side session again.
127+
* Captured from the Mcp-Session-Id response header of a handshake-era
128+
* server; always null on 2026-07-28, which removed protocol-level sessions
129+
* (SEP-2567). A caller that cannot keep the transport alive between
130+
* interactions can persist it and pass it back through the constructor's
131+
* $headers on a later transport, where it wins over the tracked value.
133132
*
134133
* @return string|null null until the server mints a session, and again after close()
135134
*/

0 commit comments

Comments
 (0)