## Summary Provide a reliable way to cleanly shut down a running MCP server, ensuring all resources are properly released. ## Motivation - Currently there's no clean way to stop a running server programmatically - Resources (connections, tasks, file handles) may not be properly cleaned up on shutdown - Important for testing, graceful restarts, and production deployments ## Goal - API for triggering graceful shutdown - Proper cleanup of all active sessions and transports - Configurable shutdown timeout / drain period --- <sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>
Activity
Kludex commentedon Apr 5, 2026
What is the motivation for this? Can you share an example of a resource that will not be released on shutdown?