Skip to content

Commit d8274ac

Browse files
authored
Merge pull request #902 from MuriloFP/fix-disabled-mcp-list
fix: ensure disabled MCP servers appear in settings UI
2 parents 9f1063a + 0bb6112 commit d8274ac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
628628
if (this.mcpHub) {
629629
this.postMessageToWebview({
630630
type: "mcpServers",
631-
mcpServers: this.mcpHub.getServers(),
631+
mcpServers: this.mcpHub.getAllServers(),
632632
})
633633
}
634634

@@ -2256,7 +2256,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
22562256
autoApprovalEnabled: autoApprovalEnabled ?? false,
22572257
customModes: await this.customModesManager.getCustomModes(),
22582258
experiments: experiments ?? experimentDefault,
2259-
mcpServers: this.mcpHub?.getServers() ?? [],
2259+
mcpServers: this.mcpHub?.getAllServers() ?? [],
22602260
}
22612261
}
22622262

src/services/mcp/McpHub.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export class McpHub {
6767
return this.connections.filter((conn) => !conn.server.disabled).map((conn) => conn.server)
6868
}
6969

70+
getAllServers(): McpServer[] {
71+
// Return all servers regardless of state
72+
return this.connections.map((conn) => conn.server)
73+
}
74+
7075
async getMcpServersPath(): Promise<string> {
7176
const provider = this.providerRef.deref()
7277
if (!provider) {

0 commit comments

Comments
 (0)