modelcontextprotocol / modelcontextprotocol/python-sdk

Support clean server shutdown

Đang mở
#1,739 1 bình luận 2 reaction 1 người được giao Xem trên GitHub

@felixweinberger đang làm issue này rồi.

Từ ngày 15/1/2026.

enhancement P1 v2
Ngôn ngữ chính
Python
Star
24.3k
Fork
4k
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
31

Mô tả

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

AI Disclaimer

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.