fix(mcp): bug fix

This commit is contained in:
Timebomb2018
2026-03-13 14:05:27 +08:00
parent b88e9c5f5e
commit dac1c01a2c
2 changed files with 8 additions and 28 deletions

View File

@@ -53,6 +53,7 @@ class SimpleMCPClient:
else:
await self._connect_http()
except Exception as e:
await self.disconnect()
logger.error(f"MCP连接失败: {self.server_url}, 错误: {e}")
raise MCPConnectionError(f"连接失败: {e}")