mcp-google-analytics

v1.3.0
io.github.leonardosepulvedat/mcp-google-analytics Checked 25 minutes ago Published 3 months ago

GA4 MCP that reads AND writes: reports, funnels, audits, and server-side events.

Values you need

VariableWhat it is
GA_SERVICE_ACCOUNT_JSONoptional secret Service account JSON for reading reports: file path or inline JSON (needed for read tools)
GA_PROPERTY_IDoptional Numeric GA4 property ID, e.g. 123456789 (needed for read tools)
GA_MEASUREMENT_IDoptional Measurement ID of the data stream, e.g. G-XXXXXXXXXX (needed for event-sending tools)
GA_API_SECREToptional secret Measurement Protocol API secret (needed for event-sending tools)

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-google-analytics -- npx -y mcp-google-analytics@1.3.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-google-analytics": {
      "args": [
        "-y",
        "mcp-google-analytics@1.3.0"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-google-analytics": {
      "args": [
        "-y",
        "mcp-google-analytics@1.3.0"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "mcp-google-analytics": {
      "args": [
        "-y",
        "mcp-google-analytics@1.3.0"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-google-analytics]
command = "npx"
args = ["-y", "mcp-google-analytics@1.3.0"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: ga_run_report, ga_run_realtime_report, ga_get_metadata, ga_list_accounts, ga_list_properties, ga_get_property, ga_list_data_streams, ga_run_pivot_report, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json