Skip to content

Conversation

@halter73
Copy link
Contributor

  • 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

We could also consider removing McpServerOptions.KnownClientInfo and StreamableHttpServerTransport.OnInitRequestReceived since 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

- 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
# Conflicts:
#	src/ModelContextProtocol.AspNetCore/StreamableHttpHandler.cs
#	src/ModelContextProtocol.Core/Server/McpServerExtensions.cs
@TianqiZhang
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stateless Mode with Scaling Not Working

4 participants