Skip to content

Commit a89ce92

Browse files
committed
fix: include mcpServers in getState() for auto-approval
The getState() method was missing the mcpServers property that getStateToPostToWebview() includes. This caused MCP auto-approval to fail even when both alwaysAllowMcp and tool-specific flags were enabled, because isMcpToolAlwaysAllowed() had no servers to check. Fixes #9190
1 parent 69d4efc commit a89ce92

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,7 @@ export class ClineProvider
22202220
language: stateValues.language ?? formatLanguage(vscode.env.language),
22212221
mcpEnabled: stateValues.mcpEnabled ?? true,
22222222
enableMcpServerCreation: stateValues.enableMcpServerCreation ?? true,
2223+
mcpServers: this.mcpHub?.getAllServers() ?? [],
22232224
alwaysApproveResubmit: stateValues.alwaysApproveResubmit ?? false,
22242225
requestDelaySeconds: Math.max(5, stateValues.requestDelaySeconds ?? 10),
22252226
currentApiConfigName: stateValues.currentApiConfigName ?? "default",

0 commit comments

Comments
 (0)