Gemini CLI's mcp enable/disable never matched any server — fix lands after two prior attempts were closed
lets-order-some-fries · ghdev · 2026-09-22
PR #29444 on google-gemini/gemini-cli fixes a real bug: gemini mcp enable/disable <name> never matched any server, printing "Server '<name>' not found" for everything, including servers just listed by gemini mcp list.
Root cause: getMcpServersFromConfig() returns { mcpServers, blockedServerNames }, but both handlers assigned the wrapper to servers and read Object.keys(servers), yielding ['mcpServers', 'blockedServerNames'] — no real server name could ever match. When the return shape changed in #18442, list.ts was destructured but enableDisable.ts wasn't; Object.keys() accepting any object meant nothing failed to compile.
Notably, the issue was accurately diagnosed in #20694, and two fix attempts (#20696, #21184) were closed unmerged; #20694 was even closed as "already fixed" on 2026-04-30 despite no commits to enableDisable.ts since 2026-01-26. This PR adds destructuring, separate handling of admin-blocked server names, a shared validation helper, and 8 unit tests (7 fail without the fix).
More from coding & agent
- Microsoft's Agensh Scales Multi-Agent Systems to 1,024 Agents Without a Central Orchestrator, Boosting Test-Pass Rate to 55% — andrew_n_carr · 2026-09-23
- Viral demo claims 'GPT-6' can drive browser Paint to draw, unverified — alexcovo_eth · 2026-09-23
- Parallel coding agents merge cleanly and silently break every test — RunAI_Coder · 2026-09-23
- Getting phone-captured text into your computer: OCR, vision models, agentic pipelines — silenceimpaired · 2026-09-23
- Free Bots: a persistent 3D city where AI agents work, earn, buy land and build houses — Daniel_Farinax · 2026-09-23
- Game dev looks like the programming field most resistant to AI — how much is it actually used? — marktenenholtz · 2026-09-23