MCP serversAnalytics & researchLeer en español

Official · Google (googleanalytics/google-analytics-mcp)Locally (stdio)OAuthRead only

Set up the Google Analytics 4 MCP server

Run GA4 traffic, channel attribution, funnel and real-time reports locally using Google's official MCP.

Before you start

  1. Install Python 3.8+, pipx and the Google Cloud CLI (gcloud).

  2. Enable Google Analytics Data API and Admin API in your Google Cloud project, then run gcloud auth application-default login.

Add it to your client

  1. This server runs locally over stdio, so use Claude Desktop rather than Claude web.

  2. Open Settings › Developer › Edit Config (claude_desktop_config.json).

  3. Add the block below, restart Claude Desktop and test a read-only prompt.

{
  "mcpServers": {
    "google-analytics": {
      "command": "pipx",
      "args": [
        "run",
        "analytics-mcp"
      ]
    }
  }
}

Browser-only clients like Claude web and ChatGPT require a remote HTTPS endpoint; local stdio servers run in desktop apps and terminal clients.

What you can do

  • Run standard GA4 reports by source, medium, campaign UTM and landing page.
  • Inspect real-time traffic spikes after a social post goes live.
  • List GA4 properties, custom dimensions and conversion events.
Try asking

“Show which social UTM campaigns drove the most engaged sessions and signups in GA4 over the last 30 days.”

What it can change

Strictly read-only by default; reads GA4 properties and reports without altering your analytics configuration.

Pair Google Analytics 4 MCP + Spica Post MCP

Ask GA4 MCP which social posts and UTM campaigns actually drove site traffic this month, then ask Spica Post MCP to write follow-up variations of your winning topics.

Combined prompt

“Check our top social landing pages in GA4 over the last 30 days, then ask Spica Post to draft three follow-up posts for LinkedIn and X.”

Questions

Is analytics-mcp officially maintained by Google?

Yes. It is published by the googleanalytics organization at github.com/googleanalytics/google-analytics-mcp.

Can Google Analytics MCP modify my GA4 settings?

No. It runs read-only by default for reporting and property inspection.

Pair your stack with one remote OAuth MCP for social publishing.

Start 7 days free

Works with the assistant you already use: Claude, ChatGPT, Gemini, Grok and more.