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 present, the ID **MUST** be globally unique across all streams within that
178
-
[session](#session-management)—or all streams with that specific client, if session
179
-
management is not in use.
175
+
- If present, the ID **MUST** be globally unique across all streams.
180
176
- Event IDs **SHOULD** encode sufficient information to identify the originating
181
177
stream, enabling the server to correlate a `Last-Event-ID` to the correct stream.
182
178
2. If the client wishes to resume after a disconnection (whether due to network failure
@@ -195,38 +191,6 @@ lost:
195
191
In other words, these event IDs should be assigned by servers on a _per-stream_ basis, to
196
192
act as a cursor within that particular stream.
197
193
198
-
### Session Management
199
-
200
-
An MCP "session" consists of logically related interactions between a client and a
201
-
server, beginning with the [initialization phase](/specification/draft/basic/lifecycle). To support
202
-
servers which want to establish stateful sessions:
203
-
204
-
1. A server using the Streamable HTTP transport **MAY** assign a session ID at
205
-
initialization time, by including it in an `MCP-Session-Id` header on the HTTP
206
-
response containing the `InitializeResult`.
207
-
- The session ID **SHOULD** be globally unique and cryptographically secure (e.g., a
208
-
securely generated UUID, a JWT, or a cryptographic hash).
209
-
- The session ID **MUST** only contain visible ASCII characters (ranging from 0x21 to
210
-
0x7E).
211
-
- The client **MUST** handle the session ID in a secure manner, see [Session Hijacking mitigations](/specification/draft/basic/security_best_practices#session-hijacking) for more details.
212
-
2. If an `MCP-Session-Id` is returned by the server during initialization, clients using
213
-
the Streamable HTTP transport **MUST** include it in the `MCP-Session-Id` header on
214
-
all of their subsequent HTTP requests.
215
-
- Servers that require a session ID **SHOULD** respond to requests without an
216
-
`MCP-Session-Id` header (other than initialization) with HTTP 400 Bad Request.
217
-
3. The server **MAY** terminate the session at any time, after which it **MUST** respond
218
-
to requests containing that session ID with HTTP 404 Not Found.
219
-
4. When a client receives HTTP 404 in response to a request containing an
220
-
`MCP-Session-Id`, it **MUST** start a new session by sending a new `InitializeRequest`
221
-
without a session ID attached.
222
-
5. Clients that no longer need a particular session (e.g., because the user is leaving
223
-
the client application) **SHOULD** send an HTTP DELETE to the MCP endpoint with the
224
-
`MCP-Session-Id` header, to explicitly terminate the session.
225
-
- The server **MAY** respond to this request with HTTP 405 Method Not Allowed,
226
-
indicating that the server does not allow clients to terminate sessions. If the
227
-
server returns HTTP 405, it **MUST** include an `Allow` header listing the methods
Copy file name to clipboardExpand all lines: docs/specification/draft/changelog.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ the previous revision, [2025-11-25](/specification/2025-11-25).
9
9
10
10
## Major changes
11
11
12
-
N/A
12
+
1. Remove protocol-level sessions and the `Mcp-Session-Id` header from the Streamable HTTP transport. List endpoints (`tools/list`, `resources/list`, `prompts/list`) no longer vary per-connection. Servers that need cross-call state use explicit, server-minted handles passed as ordinary tool arguments ([SEP-2567](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567)).
0 commit comments