Title: Support clean server shutdown · Issue #1739 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Support clean server shutdown · Issue #1739 · modelcontextprotocol/python-sdk
X Title: Support clean server shutdown · Issue #1739 · modelcontextprotocol/python-sdk
Description: 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, fi...
Open Graph Description: 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 programmat...
X Description: 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 progra...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/1739
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support clean server shutdown","articleBody":"## Summary\n\nProvide a reliable way to cleanly shut down a running MCP server, ensuring all resources are properly released.\n\n## Motivation\n\n- Currently there's no clean way to stop a running server programmatically\n- Resources (connections, tasks, file handles) may not be properly cleaned up on shutdown\n- Important for testing, graceful restarts, and production deployments\n\n## Goal\n\n- API for triggering graceful shutdown\n- Proper cleanup of all active sessions and transports\n- Configurable shutdown timeout / drain period\n\n---\n\n\u003csub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)\u003c/sub>","author":{"url":"https://github.com/maxisbey","@type":"Person","name":"maxisbey"},"datePublished":"2025-12-05T16:56:10Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/1739"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ff2ddc16-cea5-1367-e9c8-bb5e9b91a83d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8B4:19BDBF:725AF7:96A20E:6AFCF825 |
| html-safe-nonce | 666046c741722352f510f27aa3a6c6c05a8a3666326ff0bfe7344d97426cac12 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEI0OjE5QkRCRjo3MjVBRjc6OTZBMjBFOjZBRkNGODI1IiwidmlzaXRvcl9pZCI6IjQzMTMxMTM3MDIxMjQyODgwMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 64e7856cfc9c6e6bb5a91ddf4f1f11c5eef7b8ac7cc98b2a50983ba80cddcb33 |
| hovercard-subject-tag | issue:3699672107 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/1739/issue_layout |
| twitter:image | https://opengraph.githubassets.com/264ddd23ae6d3071e49fd5fac41d60aabdf171549655526cc29cfae7d61bb49b/modelcontextprotocol/python-sdk/issues/1739 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/264ddd23ae6d3071e49fd5fac41d60aabdf171549655526cc29cfae7d61bb49b/modelcontextprotocol/python-sdk/issues/1739 |
| og:image:alt | 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 programmat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maxisbey |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfabad6ee26d2b84c7afef4ae0cc71b8b692fb9d66f9f15997652ef991bfd3f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 35f85b78676038389558a41adf8d76e474592ede |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width