Skip to content

Streamable HTTP - session management inconsistency #282

@mkouba

Description

@mkouba

The wording of Session Management indicates that "servers MAY establish stateful sessions" but in fact, the servers MUST use stateful sessions to be able to associate a client "operation" request with the result of a previous InitializeRequest - in order to honor version/capability negotiation.

Given the fact, that "The client MUST initiate this phase by sending an initialize request..." (see Initialization) and "The initialize request MUST NOT be part of a JSON-RPC batch, as other requests and notifications are not possible until initialization has completed.", any client/server interaction must consist of at least two HTTP requests (1 init + n operations).

I might be wrong, but from what I've read, there is no way to implement the "stateless" sessions correctly.

Note that in the previous version of the spec, the Mcp-Session-Id header was not needed because the server could use a unique MCP endpoint for each client. This is not the case anymore.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions