Subject: MCP Server not showing up in Gemini CLI despite valid bridge #5016
Replies: 2 comments
-
Set breakpoints using the Gemini CLI code base (cloned locally) and also add log statements and/or breakpoints in your MCP server code, find the source of the issue, then report back? Gemini CLI does support MCP servers and has been tested/used with dozens at this point. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, @bdmorgan, for taking the time to respond and for your helpful advice! I really appreciate your guidance. I wanted to clarify that I haven't had any problems with other MCPs for Gemini CLI, such as Toolbox MCP or mcp-genmedia-go - they work perfectly. The specificity of my MCP is that it's designed to transform ADK Agents into MCP tools so that Gemini CLI can identify and use them. I'll definitely follow your suggestion to set breakpoints using the locally cloned Gemini CLI codebase and add log statements to my MCP server code to find the source of the issue. Once I've done that debugging work, I'll report back with my findings. Thank you again for your interest and support in helping me solve this issue! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Subject: MCP Server not showing up in Gemini CLI despite valid bridge
Description:
I have implemented a custom MCP bridge (adk-gemini-bridge) exposing 4 tools for Gemini CLI. The bridge is fully MCP-compliant: it correctly responds to initialize and tools/list, with protocolVersion: "2025-02-01", complete schemas, and <500 ms latency.
Manual tests confirm responses are correct and mimic working references (compare_mcp.py diff is clean).
No more BrokenPipeError thanks to sys.exit(0) handling.
mcp_servers.json (or settings.json) contains:
"prober": "stdio"
correct command/args
stderr redirected, not stdout
I clear ~/.gemini/cache/mcp before every test.
Problem:
Despite this, Gemini CLI does NOT list adk-gemini-bridge in /mcp list.
No errors are shown, the server launches and stops quickly, but stays invisible. I have verified that all schemas, protocol versions, and config structure match the documentation and working examples (e.g. toolboxFixed, Zapier stubs).
Attempts/Symptoms:
Logs confirm initialize & tools/list are received before disconnect.
If I run the bridge standalone, tools can be called and behave correctly.
Adding "prober": "stdio" changes nothing.
Both mcp_servers.json and settings.json have been tested.
The CLI version is >= 0.7; tried both with mcp_servers.json and settings.json.
Request:
Can you help diagnose why Gemini CLI keeps ignoring the bridge, and won’t display it in /mcp list even though the MCP handshake, protocol, and probe seem OK?
Beta Was this translation helpful? Give feedback.
All reactions