modelcontextprotocol / modelcontextprotocol/python-sdk
Support clean server shutdown
未关闭
@felixweinberger 已经在做这个了。
开始于 2026年1月15日。
enhancement
P1
v2
- 主要语言
- Python
- 星标
- 24.3k
- 派生
- 4k
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 31
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。