()
| 132 | } |
| 133 | |
| 134 | async disconnect(): Promise<void> { |
| 135 | logger.info(`Disconnecting from MCP server: ${this.config.name}`) |
| 136 | |
| 137 | try { |
| 138 | await this.client.close() |
| 139 | } catch (error) { |
| 140 | logger.warn(`Error during disconnect from ${this.config.name}:`, error) |
| 141 | } |
| 142 | |
| 143 | this.isConnected = false |
| 144 | this.connectionStatus.connected = false |
| 145 | logger.info(`Disconnected from MCP server: ${this.config.name}`) |
| 146 | } |
| 147 | |
| 148 | getStatus(): McpConnectionStatus { |
| 149 | return { ...this.connectionStatus } |
no test coverage detected