Request
Please create an official sample demonstrating how to implement an ASP.NET Core Web API that acts as an MCP client and maintains a persisted MCP connection per user per session. This sample should address:
- Managing unique MCP connections per user session (not as a server)
- Connection persistence & cleanup strategy
- Handling concurrency and avoiding message interleaving
- Support for critical MCP features (Elicitation, Tasks, Progress streams, etc.) that require a stable client↔server session
Why
Features like Elicitation, Tasks, and Progress in MCP require a long-lived, stable client-to-server session, which isn’t covered in the current samples (existing samples are either server-side or single-user/console apps). A sample showing this pattern will help teams implement full MCP compatibility in scalable web API scenarios.
If my assumption on the need for one connection per user per session is incorrect for these features, please clarify the recommended approach for handling MCP features that require stateful communication.