Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support clean server shutdown

Open
#1,739 1 comment 2 reactions 1 assignee View on GitHub

@felixweinberger is already working on this.

Since Jan 15, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement P1 v2

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

Dominant language
Python
Stars
24.3k
Forks
4k
Avg merge
1d 16h
Merged PRs (30d)
25

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/python-sdk

All issues in modelcontextprotocol/python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.