-
Notifications
You must be signed in to change notification settings - Fork 545
Closed
Description
I am using the ASP.NET Core extensions for the MCP C# SDK to implement tools and resources in an existing web application - works great!
In development, I sometimes frequently restart the ASP.NET Core process. Before adding the MCP server to the application, an application restart was instant.
If I have a MCP test client connected to the server (for instance npx @modelcontextprotocol/inspector
) then shutting down the asp.net core process takes some time (~15 seconds or so). I assume this is because the connected MCP client has a streaming HTTP connection open to the server, and this somehow interferes with the normal shut-down process.
Questions:
- Is there a way to hook in to the asp.net shutdown process and disconnect the MCP clients?
- Does the MCP protocol define how this should be handled? (i.e. a way for the server to tell the clients you-will-be-disconnected-and-can-likely-reconnect-in-five-seconds)?
Metadata
Metadata
Assignees
Labels
No labels