← Index

io.github.mharnett/ga4

io.github.mharnett/ga4·v2.0.1·Analytics
Quality Score
85
/100

Google Analytics 4 MCP: reports, realtime data, custom dimensions, data streams.

§01  Install
Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ga4"
      ],
      "env": {
        "GA4_PROPERTY_ID": "<ga4_property_id>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<google_application_credentials>"
      }
    }
  }
}
Cursor (.cursor/mcp.json)
{
  "mcpServers": {
    "ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ga4"
      ],
      "env": {
        "GA4_PROPERTY_ID": "<ga4_property_id>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<google_application_credentials>"
      }
    }
  }
}
Cline (cline_mcp_settings.json)
npx -y mcp-ga4
§02  Environment variables
GA4_PROPERTY_ID
required

GA4 property ID (numeric)

GOOGLE_APPLICATION_CREDENTIALS
required

Path to service account JSON credentials file

§03  MCP Quality Score  ·  methodology
freshness
25
completeness
10
installability
25
documentation
15
stability
10
§04  Alternatives in Analytics