# Google Analytics 4

> Google Analytics 4 is a freemium MCP server for analytics and data. Read-only Google Analytics 4 reports, funnels and tracking checks for AI assistants. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $39 a month
- **Platforms:** CLI, API
- **Website:** https://www.getmcpads.com/tools/ga4
- **Repository:** https://github.com/get-mcp-ads/google-analytics-mcp-server
- **MCP Registry name:** com.getmcpads/google-analytics
- **Categories:** analytics and data, marketing and SEO
- **Listing updated:** 2026-11-14

## About

No tool here can write to GA4. It has 27 read tools, and the hosted version asks Google for the analytics.readonly scope only. Reports cover sessions, key events, purchases and revenue by channel, source, campaign, landing page, device and country, with pivots and funnels across 51 metrics and 62 dimensions, plus a realtime view of who is on the site now.

A distinctive part is the tracking audit: it checks whether view_item, add_to_cart, begin_checkout and purchase fire with revenue, how server-side tagging is set up and what the BigQuery export covers. Because the same hosted URL reaches Meta, Google Ads, TikTok and other ad platforms, one request can set GA4 numbers beside an ad platform's own, with each source keeping its own attribution and the two never added up.

Choose between the open-source stdio package, which needs your own OAuth client ID and secret and Node.js 22, 24 or 26, or the hosted getmcpads connection with Google sign-in and a tick-list of properties. The hosted version has a free plan for one account.

## Features

- **Reports and pivots:** Channel, source, campaign, landing page, device and country with 51 metrics and 62 dimensions.
- **Funnels:** Builds funnel reports, for example by device.
- **Realtime:** Shows current visitors by device or country.
- **E-commerce checks:** Verifies purchase-flow events fire with revenue.
- **Server-side and BigQuery review:** Checks server-side tagging setup and BigQuery export coverage.
- **Read only:** Requests only the analytics.readonly scope.

## Good for

- Break down purchases by channel and device
- Check whether checkout events fire correctly
- See who is on the site right now
- Compare GA4 with an ad platform's reported conversions

## Install

### Claude Code (Terminal)

```sh
claude mcp add google-analytics --env GA4_CLIENT_ID='<GA4_CLIENT_ID>' --env GA4_CLIENT_SECRET='<GA4_CLIENT_SECRET>' --env GA4_REFRESH_TOKEN='<GA4_REFRESH_TOKEN>' -- npx -y @getmcpads/google-analytics-mcp-server
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>"
      }
    }
  }
}
```

## FAQ

### Can it change my GA4 property?

No. It has no write tools and asks for the readonly scope only.

### How many tools does it have?

27 read tools.

### Do I need my own Google credentials?

The local package needs an OAuth client ID and secret; the hosted version uses Google sign-in.

### Is there a free option?

The hosted plan is free for 1 ad account with 200 requests a month.

### Is Google Analytics 4 free?

Google Analytics 4 has a free plan, with paid plans for more usage or features. Paid plans start at $39 a month.

### How do I add Google Analytics 4 to Claude Code?

Run this command in your terminal: claude mcp add google-analytics --env GA4_CLIENT_ID='<GA4_CLIENT_ID>' --env GA4_CLIENT_SECRET='<GA4_CLIENT_SECRET>' --env GA4_REFRESH_TOKEN='<GA4_REFRESH_TOKEN>' -- npx -y @getmcpads/google-analytics-mcp-server

### What are the best alternatives to Google Analytics 4?

The closest alternatives to Google Analytics 4 are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, World Monitor and Calven.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [Calven](https://ai-powered.com/mcp/calven): Calven is an MCP server for marketing and seo.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [MCP](https://ai-powered.com/mcp/mcp-mwhffe53): MCP is a freemium MCP server for marketing and seo.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.

---
Source: https://ai-powered.com/mcp/google-analytics-4
