Skip to content

tools/call hangs on Windows while direct handler returns successfully #157

@MaheshSurepalli

Description

@MaheshSurepalli

Summary

On Windows, analytics-mcp starts successfully over stdio and responds to initialize and tools/list, but tools/call never returns for get_account_summaries and eventually times out in the MCP client.

The Google Analytics credentials and API access are valid: calling the same package's underlying handler directly returns the expected account/property data in a few seconds.

Environment

  • OS: Windows 11 ARM64
  • Python used for pipx cache: 3.12.6
  • analytics-mcp: 0.4.0
  • mcp: 1.27.1
  • google-adk: 1.33.0
  • starlette: 0.52.1
  • Launch command follows the README:
{
  "command": "pipx",
  "args": ["run", "analytics-mcp"],
  "env": {
    "GOOGLE_APPLICATION_CREDENTIALS": "<path-to-application_default_credentials.json>",
    "GOOGLE_PROJECT_ID": "<project-id>"
  }
}

I also set PIPX_DEFAULT_PYTHON to a Python 3.12 interpreter to avoid a separate Python 3.14 pipx install issue.

Reproduction

Using an MCP client against the official stdio server:

  1. Start server with pipx run analytics-mcp.
  2. Send initialize.
  3. Send notifications/initialized.
  4. Send tools/list.
  5. Send tools/call for get_account_summaries with {}.

Observed:

  • initialize returns successfully.
  • tools/list returns 8 tools.
  • tools/call for get_account_summaries times out after 60-120 seconds.

Expected

tools/call should return the same account summaries that the underlying handler returns directly.

Direct handler succeeds

Running this directly inside the same pipx cache returns successfully in about 6-7 seconds:

import asyncio
from analytics_mcp import coordinator

async def main():
    result = await asyncio.wait_for(
        coordinator.call_mcp_tool("get_account_summaries", {}),
        timeout=30,
    )
    print(result[0].text)

asyncio.run(main())

The underlying Google Analytics Admin API also returns successfully with the same ADC credentials.

Additional checks

  • Cleared stale pipx run caches and rebuilt fresh.
  • Verified fresh cache contains analytics-mcp 0.4.0.
  • Tested mcp==1.24.0 because analytics-mcp declares mcp>=1.24.0; the tools/call timeout still occurred, so reverted to mcp 1.27.1.
  • analytics-mcp 0.4.0 correctly writes the startup message to stderr, not stdout.
  • Raw stdio JSON-RPC shows initialize and tools/list responses, but no response for tools/call before timeout.

Notes

This does not appear to be an auth/scope issue. The same ADC file can call Google Analytics Admin REST and the direct Python handler successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions