shutdown • AI Agent SDK
shutdown: Explicitly shut down MCP resources.
shutdown
Method
</div>
Explicitly shut down MCP resources.
Call this method when done using the MCP instance to ensure all background threads and connections are properly cleaned up.
Signature
def shutdown() -> AnyReturns
ResponseField
AnyThe result of the operation.
Used By
Source
View on GitHubpraisonaiagents/mcp/mcp.py at line 1534