shutdown

View as MarkdownOpen in Claude

Stop all active MCP clients that were created via create_client(). Each client’s subprocess is terminated and its sandbox directory cleaned up. Called automatically during MCPGateway.shutdown().

Parameters

None.

Returns

None

Example

1from signalwire.mcp_gateway import MCPManager
2
3config = {
4 "services": {
5 "todo": {"command": ["python3", "todo_mcp.py"], "description": "Todo list", "enabled": True}
6 }
7}
8
9manager = MCPManager(config)
10client = manager.create_client("todo")
11manager.shutdown()