fix(mcp): improve CCW config update logic and add debug logging

- Fix McpManagerPage to read config after optimistic update and pass only expected fields
- Add debug logging for enabledTools config building and ccw-tools server saving
This commit is contained in:
catlog22
2026-03-02 12:27:42 +08:00
parent 7af258f43d
commit 0af4ca040f
3 changed files with 19 additions and 3 deletions

View File

@@ -945,6 +945,11 @@ function addGlobalMcpServer(serverName: string, serverConfig: unknown) {
config.mcpServers = {};
}
// Debug logging for ccw-tools
if (serverName === 'ccw-tools') {
console.log('[addGlobalMcpServer] Saving ccw-tools config:', JSON.stringify(serverConfig, null, 2));
}
// Add the server to top-level mcpServers
config.mcpServers[serverName] = serverConfig;