-
Notifications
You must be signed in to change notification settings - Fork 218
Description
Describe the bug:
After a complete and clean setup following the official GitHub guide, every attempt to query the Google Analytics API through the analytics-mcp tool in Gemini CLI fails with MCP error -32001: Request timed out.
The failure happens for both general account listing (list-accounts) and specific report queries (run-report).
Crucial Finding: A direct API call using a standalone Python script (google-analytics-data library) works perfectly. This proves that the underlying credentials, API permissions, and network connectivity are all correct. The failure seems to be specific to the analytics-mcp tool's execution layer when called by Gemini CLI.
Steps to Reproduce:
- Follow the official setup guide on a clean Windows environment.
- Authenticate using the
gcloud auth application-default loginflow with a Desktop App OAuth Client ID. - Configure
~/.gemini/settings.jsonto use the generatedapplication_default_credentials.json. - Launch Gemini CLI (
npx https://github.com/google-gemini/gemini-cli). - Run the query:
@analytics-mcp dime las cuentas a las que tienes acceso.
Expected behavior:
The tool should connect to the Google Analytics API and return a list of accounts without a timeout error.
Anything else we should know about your project / environment:
- OS: Windows 10/11
- Gemini CLI Version: v0.8.0-nightly
- Python Version: 3.1x
- Installation Method:
pipx
Extensive Troubleshooting Steps Already Taken:
- Verified that
Analytics Admin APIandAnalytics Data APIare both Enabled. - Confirmed use of a
Desktop apptype OAuth Client ID. - Confirmed successful
gcloud authlogin and creation ofapplication_default_credentials.json. - Tested in a completely isolated Python
venvenvironment, which also failed with the same timeout. - Temporarily disabled Antivirus/Firewall with no change in result.
Request: Could there be an issue with how the MCP server handles connection timeouts on Windows? Is there a verbose debug logging mode we can enable?
UPDATE:
Further tests confirm the issue. Even when the AI correctly identifies the authenticated user ([email protected]), it still fails with a timeout when trying to fetch details for a specific property ID.
The AI's own diagnosis confirms the problem is not authentication, but the communication with the GA API service itself, stating: "The problem seems to be the communication with the Google Analytics API service, which appears to be down or inaccessible at this time."
This reinforces that the connection from the analytics-mcp tool is the point of failure.