Skip to content
MCP server

Google Analytics 4

Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.2.1
Listing updated
4 days ago

About Google Analytics 4

Google Analytics 4 is an open-source MCP server for analytics and data. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

claude mcp add mcp-server-google-analytics --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' -- npx -y @mindstone/mcp-server-google-analytics

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-server-google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-server-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Configuration

  • GOOGLE_APPLICATION_CREDENTIALSAbsolute path to ADC or service-account JSON fileRequired
  • GA4_PROPERTY_IDDefault GA4 property ID (e.g. 123456789)

Pricing

Open source

Google Analytics 4 FAQ

Is Google Analytics 4 free?

Yes. Google Analytics 4 is open source, so you can use and self-host it for free.

How do I add Google Analytics 4 to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-google-analytics --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' -- npx -y @mindstone/mcp-server-google-analytics

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 CompanyData.

Alternatives to Google Analytics 4

  1. Open-source analytics app where an AI agent builds charts and dashboards from your data

    • Remote
    • Open source
    • 7.7K GitHub stars
    • Analytics and data
  2. Hosted MCP connector for managing Google Ads, Meta Ads, GA4 and Search Console from chat

    • 8 tools
    • Remote
    • Freemium
    • 8.1K GitHub stars
    • Marketing and SEO
  3. Indian NSE and BSE stock market data for AI assistants through 48 MCP tools

    • 17 tools
    • Remote
    • Freemium
    • 150 GitHub stars
    • Finance and payments
  4. World Monitor

    MCP server

    Live geopolitical intelligence dashboard with an API and MCP server for agents

    • Remote
    • Freemium
    • Analytics and data
  5. CompanyData

    MCP server

    Search and enrich company records from official registers via the CompanyData API

    • 3 tools
    • Remote
    • Paid
    • 3 GitHub stars
    • Analytics and data
  6. ChartAnt

    MCP server

    Remote MCP server returning charts, maps and dashboards as hosted PNG links

    • 51 tools
    • Remote
    • Freemium
    • Design and media