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
- Same prompt, three tools: Claude vs ChatGPT vs Figma Make UI face-off — Tegadesigns · 2026-11-12
- Pigment Agents now reads and posts in Slack, inheriting user permissions — mattturck · 2026-11-12
- Map of the agent economy: 50+ startups across payments, spend control, identity, memory — venturetwins · 2026-11-12
- OpenCode launches Browse, an on-device browser agent with local logins — Saul_Loveman · 2026-11-12
- VentureTwins maps the B2A economy: dozens of agent infra and app companies in first series installment — venturetwins · 2026-11-12
- Google releases 76-page 'Agents Companion' whitepaper on agent engineering — mdancho84 · 2026-11-12