# Google Analytics MCP server

> Run GA4 core, funnel and realtime reports and read Google Analytics account, property and Ads link details.

- Listing: https://mcp.tc/i/google-analytics
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: OAuth sign-in
- Category: [Data & Analytics](https://mcp.tc/c/analytics)
- Vendor: Google
- Verified: yes, mcp.tc checked that this is the official server (https://mcp.tc/verify). It says who runs the server, not that it is safe.
- Homepage: <https://github.com/googleanalytics/google-analytics-mcp>
- Repository: <https://github.com/googleanalytics/google-analytics-mcp>
- Package: pypi `analytics-mcp`

## About

Connects to the Google Analytics Admin API and Data API. You can list accounts and properties, read property details, see linked Google Ads accounts, check custom dimensions and metrics, and run core, funnel and realtime reports. The project is labeled experimental and uses read-only access.

It runs locally over stdio from the analytics-mcp PyPI package, started with pipx. Access uses Google Application Default Credentials with the analytics.readonly scope. The Google Analytics Admin API and Data API must be enabled in your Google Cloud project.

## What it can do

- List Google Analytics accounts and properties
- Read property details and configuration
- List Google Ads links for a property
- Run core GA4 reports
- Run funnel reports
- Run realtime reports
- Retrieve custom dimensions and metrics

## Example prompts

- "What are the most popular events in my Google Analytics property in the last 180 days?"
- "Give me details about my Google Analytics property with 'shop' in the name."
- "What are the custom dimensions and custom metrics in my property?"
- "Show realtime active users by country for my main property."

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio google-analytics -- pipx run analytics-mcp
```

2. Start Claude Code and type `/mcp`. **google-analytics** should show as connected.

Add `--scope user` to make it available in every project.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

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

2. Save the file and restart Claude Desktop.

Needs pipx (Python) on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=google-analytics&config=eyJjb21tYW5kIjoicGlweCIsImFyZ3MiOlsicnVuIiwiYW5hbHl0aWNzLW1jcCJdfQ%3D%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

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

Needs pipx (Python) on your computer.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=google-analytics&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22pipx%22%2C%22args%22%3A%5B%22run%22%2C%22analytics-mcp%22%5D%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"google-analytics","type":"stdio","command":"pipx","args":["run","analytics-mcp"]}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "pipx",
      "args": [
        "run",
        "analytics-mcp"
      ]
    }
  }
}
```

Needs pipx (Python) on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

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

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add google-analytics -- pipx run analytics-mcp
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.google-analytics]
command = "pipx"
args = ["run", "analytics-mcp"]
```

Needs pipx (Python) on your computer.

### Gemini CLI

```bash
gemini mcp add google-analytics pipx run analytics-mcp
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

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

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs pipx (Python) on your computer.

## Details

- Server version: 0.7.0
- Last checked: 2026-10-03
- Listed: 2026-10-03
- Updated: 2026-10-03

---
Source: https://mcp.tc/i/google-analytics (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
