MCP SSE Automatic Session Closure #7252
-
Hello, I am using LibreChat since a couple of days to create a proof-of-concept use case of an MCP server that I have created by using the JavaScript SDK. In short, it interacts with 3rd party API performing various tasks. Here is my question: since this is only a proof-of-concept implementation, I don't really care about proper session handling/closure. How can I make the LibreChat threshold of automatic session closure longer or remove it at all? I run everything in docker and currently only have the docker-compose.override.yml to include the librechat.yml. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi thanks for the report. Can you clarify a few things:
In any case, the only "inactivity" for MCP user sessions are hardcoded to 15 minutes, but this would not affect you while using the tool. |
Beta Was this translation helpful? Give feedback.
I believe this issue is specific to the Eventsource SSE protocol since I find more hits when searching 5 minute timeouts for that than for anything MCP-related.
Are you receiving any pings from LC? Are you sending anything back for pings to keep the connection active?
You may also want to look into refactoring the server with the streamable http transport, which LC will support soon, which is meant to address caveats of long-lived connections like this, and is more suitable for a multi-user environment:
#7020
https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http