Skip to content

[Bug] Persistent -32001 Request timed out on Windows despite correct configuration #73

@BCC24

Description

@BCC24

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:

  1. Follow the official setup guide on a clean Windows environment.
  2. Authenticate using the gcloud auth application-default login flow with a Desktop App OAuth Client ID.
  3. Configure ~/.gemini/settings.json to use the generated application_default_credentials.json.
  4. Launch Gemini CLI (npx https://github.com/google-gemini/gemini-cli).
  5. 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 API and Analytics Data API are both Enabled.
  • Confirmed use of a Desktop app type OAuth Client ID.
  • Confirmed successful gcloud auth login and creation of application_default_credentials.json.
  • Tested in a completely isolated Python venv environment, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions