Gemini AI sidecar fails on startup due to retired default MCP port 16687
Requirement
Run the Gemini AI sidecar locally with Jaeger v2 using the standard launcher (make run-ai-gemini) without needing manual MCP endpoint overrides.
Problem
When the standalone jaeger_mcp extension was merged into jaegerquery, telemetry tools moved to the query port (16686) under <basePath>/api/ai/mcp/, and the standalone listener on port 16687 was retired.
However, scripts/ai-sidecar/gemini/main.py still defaults to http://127.0.0.1:16687/mcp. When launching with make run-ai-gemini (or running main.py directly with default settings), JAEGER_MCP_URL is unset, so the sidecar attempts to connect to port 16687:
HTTPConnectionPool(host='127.0.0.1', port=16687): Max retries exceeded with url: /mcp (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=16687): Failed to establish a new connection: [Errno 111] Connection refused"))Tool discovery fails and raises RuntimeError: Unable to connect to MCP at http://127.0.0.1:16687/mcp on first attempt. Stopping request., crashing the turn.
Proposal
- Update
DEFAULT_MCP_URLinscripts/ai-sidecar/gemini/main.pyto"http://127.0.0.1:16686/api/ai/mcp/". - Update sidecar documentation and architecture diagrams referencing
16687/mcp. - Add a test verifying default CLI argument resolution in
test_sidecar_workflow.py.
Open questions
None.
Source: jaegertracing/jaeger