python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Reuse Streamable HTTP session_id from multiple Web Server Instances

Open hzeus opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. We would like to reuse the same Streamable HTTP Session from multiple Web Server Instances as we aim to support deployments and server restarts. For that, we would initialize a Streamable HTTP Session and persist the Session ID within our database.

Describe the solution you'd like In my understanding, it would be sufficient if we could optionally pass an existing session_id to streamablehttp_client / StreamableHTTPTransport.init

Describe alternatives you've considered I did not see an alternative - please let me know if I missed something

hzeus avatar May 12 '25 13:05 hzeus

Check out stateless mode in streamable http - that seems like it should allow your requirements for horizontal scaling? https://github.com/modelcontextprotocol/python-sdk?tab=readme-ov-file#streamable-http-transport

felixweinberger avatar Oct 07 '25 13:10 felixweinberger