Uh oh!
There was an error while loading. Please reload this page.
Make "Stateless" mode sessionless - #760
Conversation
- This removes the requirement to configure data protection which is the motivating reason for this change - This means that McpServer.ClientInfo will always be null in stateless mode
322d89b to
a3b519bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # src/ModelContextProtocol.AspNetCore/StreamableHttpHandler.cs # src/ModelContextProtocol.Core/Server/McpServerExtensions.cs
Uh oh!
There was an error while loading. Please reload this page.
TianqiZhang
commented
Nov 26, 2025
@halter73 our MCP server is a remote stateless server, and logging client info is very important to us. With this change, we found it impossible to know the origin client where a tool call comes from. Is there a reason why we stopped encoding client info into session id in stateless mode? Any workaround you can recommend? The reason we chose stateless mode is that we deploy to multi-instance azure app service and we don't have a good session affinity solution. Any suggestion on that? If we can use stateful mode we will be happy to do so. //cc @mikekistler |
We could also consider removing
McpServerOptions.KnownClientInfoandStreamableHttpServerTransport.OnInitRequestReceivedsince the StreamableHttpHandler no longer uses them, but they still could be useful to people trying to use StreamableHttpServerTransport directly.I'll be on vacation the next two weeks. If someone wants to go ahead and merge this before I get back, that's fine by me. Otherwise, I'll address any feedback once I'm back from vacation.
Fixes#682