diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index ee3c4f3ff9..74e797e4a1 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -628,7 +628,7 @@ export class ClineProvider implements vscode.WebviewViewProvider { if (this.mcpHub) { this.postMessageToWebview({ type: "mcpServers", - mcpServers: this.mcpHub.getServers(), + mcpServers: this.mcpHub.getAllServers(), }) } @@ -2256,7 +2256,7 @@ export class ClineProvider implements vscode.WebviewViewProvider { autoApprovalEnabled: autoApprovalEnabled ?? false, customModes: await this.customModesManager.getCustomModes(), experiments: experiments ?? experimentDefault, - mcpServers: this.mcpHub?.getServers() ?? [], + mcpServers: this.mcpHub?.getAllServers() ?? [], } } diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index dcbe4a94d0..209df3dbe6 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -67,6 +67,11 @@ export class McpHub { return this.connections.filter((conn) => !conn.server.disabled).map((conn) => conn.server) } + getAllServers(): McpServer[] { + // Return all servers regardless of state + return this.connections.map((conn) => conn.server) + } + async getMcpServersPath(): Promise { const provider = this.providerRef.deref() if (!provider) {