Query Google Analytics 4 reports, real-time data, and custom dimensions via Claude. Developers integrate GA4 property data into AI workflows using service account authentication.
io.github.mharnett/ga4
Local install
STDIO
2 required env vars
How models use it and what it is built for.
Query Google Analytics 4 reports, real-time data, and custom dimensions via Claude. Developers integrate GA4 property data into AI workflows using service account authentication.
Local install — runs as a subprocess.
Configuration this server reads at startup.
GA4 property ID (numeric)
Path to service account JSON credentials file
Where to find authoritative docs and source for Mharnett Ga4.
Paste any of these into Agent Studio after connecting Mharnett Ga4.
Common questions about connecting and running Mharnett Ga4.
What authentication does this MCP server require?
You need a Google service account JSON credentials file (set via GOOGLE_APPLICATION_CREDENTIALS) and your GA4 property ID (GA4_PROPERTY_ID). The service account must have read access to your GA4 property in Google Analytics.
Can I query real-time data with this server?
Yes. The server supports real-time data queries alongside standard GA4 reports, allowing you to fetch current user activity and traffic metrics.
What types of reports can I pull?
You can query GA4 reports, real-time data, and work with custom dimensions. The server integrates with GA4's reporting API to retrieve metrics and dimensions relevant to your property.
How do I install and run this server?
Install via `npx mcp-ga4@2.0.1`. Set the required environment variables GA4_PROPERTY_ID and GOOGLE_APPLICATION_CREDENTIALS, then connect it to Claude or your MCP client.
Is there a cost to use this MCP server?
The server itself is open-source and free. You pay only for Google Analytics 4 usage under Google's standard GA4 pricing, which includes free tier access for most properties.
MCP Playground runs 10,000+ hosted MCP servers — GitHub, Linear, Notion, Stripe, Sentry and more — across Claude, GPT, Gemini, DeepSeek and 30+ AI models. Compare model answers side-by-side, save agent presets, share runs. Zero install.
Open Agent Studio