MCP C# SDK 2.2.0 Lets One Endpoint Serve Both Legacy and Modern Clients
The MCP C# SDK version 2.2.0 introduced a hybrid session mode that allows a single ASP.NET Core endpoint to simultaneously support clients using the older 2025-11-25 protocol and those on the newer 2026-07-28 specification. The 2026-07-28 MCP revision eliminated the initialize handshake and session IDs, requiring each HTTP request to be fully self-describing, while older clients still depend on session-based communication. The new HttpServerSessionMode.StatefulForInitializeClients setting enables the server to detect which protocol a client is using and respond with the appropriate session behavior. Legacy clients receive a session ID upon sending an initialize request, whereas modern clients operate statelessly without one. Developers can verify correct behavior offline using Microsoft.AspNetCore.TestHost, which tests both client paths against the same route without opening a network port.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in