analytics Official server available

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.

View on GitHub
pipx run analytics-mcp
Website

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)

This is the official server, built by the Google Analytics team. It runs locally and there's no Google-hosted endpoint yet, so you can't add it to claude.ai as a one-click connector. Community GA4 servers mostly wrap the same Data API, so only reach for one if you need a feature Google hasn't shipped or you want a hosted setup.

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

1. Install pipx. The server needs Python 3.10+. 2. In a Google Cloud project, enable the Google Analytics Admin API and the Google Analytics Data API. 3. Create an OAuth client (Desktop app), download its JSON, then set up Application Default Credentials with the read-only scope:
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

surendranb/google-analytics-mcp

Popular community GA4 server. Worth a look if you want a different setup flow than Google's gcloud route.

Google Search Console MCP (AminForou/mcp-gsc)

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?
Yes. Google publishes it at github.com/googleanalytics/google-analytics-mcp and installs it from PyPI as analytics-mcp. It's still marked experimental.
How do I connect Google Analytics to Claude?
Enable the GA4 Admin and Data APIs in Google Cloud, set up Application Default Credentials with the 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?
No. It only reads data and property configuration, and the credentials it asks for are read-only.
Is the Google Analytics MCP free?
Yes. The server is open source and GA4 is free. You only need a free Google Cloud project for the API credentials.
Does it work with claude.ai in the browser?
Not directly. It's a local server, so you need Claude Desktop, Claude Code or another client that can launch local MCP servers.

Added: 2025-02-18 · Last reviewed: 2026-09-22