Current implementations are holding mcp sessions into a in memory Map
|
private final ConcurrentHashMap<String, McpStreamableServerSession> sessions = new ConcurrentHashMap<>(); |
This make it mandatory to have strict stickyness "a la" browser" in a replicated/high availability environement which doesn't exist for agent (and we cannot rely on llm agents to implement this)
The feature could be
- first very simple option an option for HttpServletStreamableServerTransportProvider.Builder to have an option to provide the map (then users can use different tools to have some shared Map)
- create an interface to handle those sessions (with minimum operations such add, get. delete)