Clean up MCP connections
()
| 88 | |
| 89 | |
| 90 | async def cleanup_mcp(): |
| 91 | """Clean up MCP connections""" |
| 92 | global _mcp_manager, _mcp_initialized |
| 93 | if _mcp_manager: |
| 94 | await _mcp_manager.cleanup() |
| 95 | _mcp_manager = None |
| 96 | _mcp_initialized = False |
| 97 | logger.info("MCP connections cleaned up") |
| 98 | |
| 99 | |
| 100 | # Module initialization: Register function-based tools automatically on import |