PluginBench
MCP Server

Google Analytics 4 MCP Server

io.github.stucchi/google-analytics

What is the Google Analytics 4 MCP server?

Manage GA4 properties, data streams, conversions, and run reports via Admin & Data APIs.

How to install Google Analytics 4

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • GA_CREDENTIALS

    Google Service Account JSON key content (copy-paste the entire JSON)

  • GA_CREDENTIALS_PATH

    Alternative: path to the Service Account JSON key file

Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": [
        "google-analytics-4-mcp"
      ],
      "env": {
        "GA_CREDENTIALS": "<YOUR_GA_CREDENTIALS>",
        "GA_CREDENTIALS_PATH": "<YOUR_GA_CREDENTIALS_PATH>"
      }
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": [
        "google-analytics-4-mcp"
      ],
      "env": {
        "GA_CREDENTIALS": "<YOUR_GA_CREDENTIALS>",
        "GA_CREDENTIALS_PATH": "<YOUR_GA_CREDENTIALS_PATH>"
      }
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": [
        "google-analytics-4-mcp"
      ],
      "env": {
        "GA_CREDENTIALS": "<YOUR_GA_CREDENTIALS>",
        "GA_CREDENTIALS_PATH": "<YOUR_GA_CREDENTIALS_PATH>"
      }
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "google-analytics-4-mcp"
      ],
      "env": {
        "GA_CREDENTIALS": "<YOUR_GA_CREDENTIALS>",
        "GA_CREDENTIALS_PATH": "<YOUR_GA_CREDENTIALS_PATH>"
      }
    }
  }
}
Claude Code
claude mcp add google-analytics --env GA_CREDENTIALS=<YOUR_GA_CREDENTIALS> --env GA_CREDENTIALS_PATH=<YOUR_GA_CREDENTIALS_PATH> -- uvx google-analytics-4-mcp

Related MCP servers

Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.

View repository →

Check domain availability across 500+ TLDs. Single and bulk checks with UI.

View repository →

Italian open data: municipalities, provinces, regions, postal codes, coordinates.

View repository →

Browse, search, and discover MCP servers from your AI assistant

View repository →

MCP server for Nexi XPay Back Office APIs: orders, transactions, warnings.

View repository →

MCP server for the Telnyx API — billing, phone numbers, and messaging

View repository →