GA4 Analytics MCP

v26.11.13
com.renzojohnson/ga4-mcp Checked 3 hours ago Published 18 days ago

GA4 MCP server: Google Analytics 4 reports, realtime data, property admin and Search Console.

Values you need

VariableWhat it is
GOOGLE_APPLICATION_CREDENTIALSoptional Path to a service account key or authorized_user JSON file. Optional if you use gcloud Application Default Credentials or the OAuth variables.
GOOGLE_OAUTH_CLIENT_IDoptional OAuth client ID. Set together with the client secret and refresh token.
GOOGLE_OAUTH_CLIENT_SECREToptional secret OAuth client secret.
GOOGLE_OAUTH_REFRESH_TOKENoptional secret OAuth refresh token with the Analytics, Search Console and Indexing API scopes.

npm (npx) discovery passed

Requires Node.js 18+

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

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: ping, get_account_summaries, get_property_details, list_google_ads_links, run_report, run_realtime_report, get_custom_dimensions_and_metrics, gsc_list_sites, ….
  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