Google Analytics MCP Server
Google Analytics MCP setup for Claude: Google's official GA4 server runs reports, funnels and realtime data. Free, read-only, needs a Google Cloud project.
- Pricing
- free
- GitHub stars
- 3,274
- Last commit
- 2026-08-07
- Page updated
Free and open source (Apache 2.0). GA4 and the Google Cloud project it needs cost nothing at normal usage.
The Google Analytics MCP is Google's own server, published under the googleanalytics GitHub org. It's a local Python server (analytics-mcp on PyPI) that talks to the GA4 Admin API and Data API, so Claude can list your properties, run reports and check realtime traffic without you touching the GA4 interface. Google still labels it experimental, but it's actively maintained and sits at v0.7.0 as of July 2026.
There's no hosted version. You run it on your machine with pipx, and the painful part is the Google Cloud setup: enable two APIs, create an OAuth client, run one gcloud command. Budget 20 minutes the first time. If you just want to ask questions about your traffic, this is the one to use. Community GA4 servers exist, but none of them beat the official one on trust.
The workflow I like: every Monday, ask Claude for sessions and conversions by channel for the last 7 days vs the week before, then have it flag any source that dropped more than 20%. Pair it with the Google Search Console MCP and you can match organic traffic drops to the queries that lost clicks.
It's read-only. The credentials only need the analytics.readonly scope, so it can't change your property settings or delete anything. Data API quotas still apply, so a big report across a year of data with lots of dimensions can hit limits. Ask for narrower date ranges when that happens.
Official vs community Google Analytics MCP
Google Analytics MCP Server (by Google)
What you can ask it
- “Compare sessions and key events by default channel group for the last 7 days vs the previous 7 days. Flag any channel down more than 20%.”
- “Which landing pages brought the most new users from organic search last month, and what was their engagement rate?”
- “Run a funnel report for view_item → add_to_cart → begin_checkout → purchase over the last 30 days and tell me where the biggest drop is.”
- “How many people are on the site right now, and which pages are they on?”
- “List the custom dimensions in my property and tell me which ones we never use in reports.”
- “Break down revenue by campaign for the last quarter and rank the campaigns by revenue per session.”
Features
- `run_report`: any GA4 report with your choice of dimensions, metrics, date ranges and filters
- `run_funnel_report`: funnel reports through the Data API
- `run_realtime_report`: who's on the site right now and what they're doing
- `get_account_summaries` and `get_property_details`: list every account and property you can access
- `get_custom_dimensions_and_metrics`: pull your custom definitions so Claude uses the right names
- `list_google_ads_links`: see which Google Ads accounts are linked to a property
- Read-only by design: it only asks for the `analytics.readonly` scope
How to set up the Google Analytics MCP Server
Works with: Claude Code, Claude Desktop, Gemini CLI, Gemini Code Assist
gcloud auth application-default login \
--scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \
--client-id-file=YOUR_CLIENT_JSON_FILE
Copy the PATH_TO_CREDENTIALS_JSON path it prints at the end. The Google account you sign in with needs access to your GA4 properties.
4. Claude Code: add the server with one command:
claude mcp add analytics-mcp \
--scope user \
-e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" \
-e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" \
-- pipx run analytics-mcp
5. Claude Desktop, Gemini CLI and other clients that use an mcpServers config:
{
"mcpServers": {
"analytics-mcp": {
"command": "pipx",
"args": ["run", "analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON",
"GOOGLE_PROJECT_ID": "YOUR_PROJECT_ID"
}
}
}
}
6. Restart the client and ask: "what can the analytics-mcp server do?"Alternatives
Popular community GA4 server. Worth a look if you want a different setup flow than Google's gcloud route.
Not GA4, but it's the other half of the picture: queries, clicks and indexing status from Search Console.
FAQ
Is there an official Google Analytics MCP server?
analytics-mcp. It's still marked experimental.How do I connect Google Analytics to Claude?
analytics.readonly scope, then run claude mcp add analytics-mcp ... -- pipx run analytics-mcp in Claude Code or add the JSON config to Claude Desktop.Can the Google Analytics MCP change my GA4 settings?
Is the Google Analytics MCP free?
Does it work with claude.ai in the browser?
More marketing MCP servers
Supabase MCP Server
Hook your Supabase database into Claude. Query customer data, run SQL, manage tables, generate TypeScript types. 2,500+ GitHub stars. One-click install from your Supabase dashboard.
freemium Figma MCP Server
Official MCP server by Figma. Convert designs into code, extract design tokens, access components and variables — directly from Claude Code or any MCP-compatible editor.
figma (remote MCP) freemium X (Twitter) MCP Server
X has an official MCP server now. How to connect the X (Twitter) MCP to Claude, Cursor or Claude Code, what it can read, and what each API call costs.
npx -y @xdevplatform/xurl mcp https://api.x.com/mcp paid Added: 2025-02-18 · Last reviewed: 2026-09-22