shutdown • AI Agent SDK

shutdown: Explicitly shut down MCP resources.

shutdown

Method

</div>

This is a method of the MCP class in the mcp module.

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

python
def shutdown() -> Any

Returns

ResponseField Any

The result of the operation.

Used By

Source

View on GitHub

praisonaiagents/mcp/mcp.py at line 1534