Open
Description
Initial Checks
- I confirm that I'm using the latest version of MCP Python SDK
- I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
Description
When a session ID is provided by a client, but it is not present in the in-memory session store for the server, the server returns a 400
python-sdk/src/mcp/server/streamable_http_manager.py
Lines 250 to 256 in d0443a1
This is a problem, because as noted in #880 sessions are not persisted between restarts
This library should return a 404, as in
python-sdk/src/mcp/server/streamable_http.py
Line 371 in d0443a1
400 isn't applicable because the request isn't bad, but the server simply doesn't persist sessions between restarts.
Example Code
Python & MCP Python SDK
3.10.12 and 2.3.4
Metadata
Metadata
Assignees
Labels
No labels