Google Analytics MCP
GA4 MCP server: an agent reads Google Analytics 4 reports, schema and real-time data and analyses traffic by playbooks.
- 244 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads site analytics data that may carry visitor information, with the service account rights.
- Sends anonymous diagnostics unless it is turned off.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/google-analytics-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads site analytics data that may carry visitor information, with the service account rights.
- Sends anonymous diagnostics unless it is turned off.
This is third-party code. Review the repository files before installing.
What it does
The server gives agents access to Google Analytics 4 data: dimension and metric schema discovery, server-side aggregation and analysis-ready defaults. `get_ga4_data` builds multi-dimensional reports with automatic totals, `list_accounts` and `list_properties` list accessible accounts and properties, `get_property_metadata` returns the schema of dimensions and metrics with compatibility rules and `run_realtime_report` shows active users and events from the last 30 minutes. Three tools, `search_skills`, `skill_read` and `skills_list`, load analytical playbooks from GitHub: traffic drop diagnosis, channel grouping and attribution, e-commerce analysis and tracking referrals from ChatGPT, Claude, Perplexity and Gemini. Access needs a GA4 property ID and a Google Cloud service account key.
Who it is for. Marketers and analysts who go through GA4 traffic, channels and conversions together with an agent with no manual exports.
Good fit when
- Traffic dropped sharply and the agent walks through the diagnosis playbook by channels and pages.
- Acquisition channels and revenue by channel have to be compared for a quarter.
- You need to know what share of traffic comes from AI assistants.
- Before a report, the dimensions and metrics compatible in a query are checked.
Not a fit when
- There is no service account key with access to the GA4 property.
- Data is needed from Universal Analytics or another analytics system.
- Client policy forbids sending anonymous diagnostics to the developer.
Example request
Show acquisition channels for the last 30 days with sessions and revenue, then find the cause of last week's traffic drop.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
GOOGLE_APPLICATION_CREDENTIALSrequired, secret- Path to a Google Cloud service account JSON key with GA4 access.
GA4_PROPERTY_IDrequired- Numeric GA4 property ID.
Limitations
It needs the GA4 property ID (`GA4_PROPERTY_ID`) and the path to a Google Cloud service account JSON key with access to the property (`GOOGLE_APPLICATION_CREDENTIALS`). The package collects anonymous diagnostic telemetry with no queries or credentials: command executions, latency and error codes. It is turned off with `DO_NOT_TRACK=1` or `MCP_TELEMETRY_OPT_OUT=1`. Playbooks load dynamically from GitHub, so their text may change. The README has a `curl | bash` installer, so read the script before running it.
How to disable. Remove the google-analytics entry from the MCP configuration (`claude mcp remove google-analytics`). Revoke the service account key in Google Cloud and remove its access to the property in GA4.
FAQ
How do I connect GA4 MCP to Claude Code?
Run `claude mcp add google-analytics -- uvx google-analytics-mcp` and set `GA4_PROPERTY_ID` and `GOOGLE_APPLICATION_CREDENTIALS`. For Claude Desktop the same variables go into the `env` block.
What access is needed in Google?
A Google Cloud service account added to the needed GA4 property with read rights. The path to its JSON key goes into `GOOGLE_APPLICATION_CREDENTIALS`.
What are the dynamic playbooks?
Analytical recipes the server loads from GitHub: traffic drop diagnosis, channels and attribution, e-commerce, AI referrals. `search_skills` finds them and `skill_read` reads them.
What real-time data is available?
The `run_realtime_report` tool shows active users and events from the last 30 minutes with chosen dimensions and metrics.
Does the package collect telemetry?
Yes, anonymous and with no queries, credentials or personal data. Turn it off with `DO_NOT_TRACK=1` or `MCP_TELEMETRY_OPT_OUT=1`.
Discussion
No questions or reviews yet.
Related
MCP serversThe experimental official Google Analytics 4 MCP server: reports, funnels and realtime data on request
Google, Meta Ads and GA4 MCP
Google + Meta Ads + GA4 MCP
Remote MCP server for Google Ads, Meta Ads and Google Analytics 4 in one connection, OAuth login without API keys
Search Console MCP: Google, Bing and GA4 data for agents
Search Console MCP
An MCP server that gives an agent Google Search Console, Bing Webmaster, GA4 and AdSense data with ready SEO checks
MCP server for Google Ads: analyze campaigns, metrics and keywords with GAQL queries right in the chat with an agent
Google Search Console MCP
Google Search Console MCP Server for SEOs
An MCP server for Google Search Console: queries and pages with clicks and positions, URL indexing checks, sitemaps and ready SEO skills
Suganthan's GSC MCP
Google Search Console MCP Server
29 Google Search Console tools for an agent: quick wins, cannibalization, content decay, image audits and URL indexing
README in short
The package is on PyPI (`google-analytics-mcp`) and npm (`@surendranb/google-analytics-mcp`), and the documentation portal is at ga4mcp.com. It supports installing into Claude Desktop, Cursor, VS Code and other clients.