Gemini CLI fix: corrupt MCP enablement config silently re-enables all disabled servers

lets-order-some-fries · ghdev · 2026-09-22

PR #29445 on google-gemini/gemini-cli fixes a fail-open trust boundary: when mcp-server-enablement. exists but is unreadable, readConfig() collapsed "missing" and "corrupt" into {}, and isFileEnabled() defaults empty configs to enabled (?? true) — so every MCP server the user disabled gets reported as enabled with its tools exposed to the model. The next disable() then overwrites the corrupt file with a one-entry fresh file, erasing all other entries.

The fix:

Original post →

More from coding & agent

coding & agent channel →