-
Notifications
You must be signed in to change notification settings - Fork 578
Description
Describe the bug
In the latest SDK (v0.4.0-preview.2+), the McpServer.ClientInfo property is always null when the server is configured in Stateless mode. This is a regression from previous behavior where session context was encoded into the mcp-session-id.
While the release notes mention this as a change, it functionally breaks the ability to host MCP servers on load-balanced platforms (like Azure App Service or AWS Lambda) where:
- In-memory state is impossible (due to round-robin routing).
- ClientInfo is required for logging.
To Reproduce
As stated in release notes.
Expected behavior
The SDK should preserve a mechanism to retain ClientInfo across requests in Stateless mode.
Logging ClientInfo is critical for many MCP servers. Since standard "Sticky Sessions" are not reliable on many serverless/PaaS platforms, the previous implementation (encoding session state into the Session ID) was the only viable "Cloud Native" solution.
We request that the SDK restores this "round-tripped Session" strategy (or adds a specific flag for it) to preserve basic logging functionality without forcing developers to implement complex workarounds just to read the Client Name/Version.