Skip to content
MCP server

MCP Google Analytics

GA4 MCP that reads AND writes: reports, funnels, audits, and server-side events. 26 tools.

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

About MCP Google Analytics

MCP Google Analytics 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-google-analytics --env GA_SERVICE_ACCOUNT_JSON='<GA_SERVICE_ACCOUNT_JSON>' --env GA_API_SECRET='<GA_API_SECRET>' -- npx -y mcp-google-analytics

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "<GA_SERVICE_ACCOUNT_JSON>",
        "GA_API_SECRET": "<GA_API_SECRET>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "<GA_SERVICE_ACCOUNT_JSON>",
        "GA_API_SECRET": "<GA_API_SECRET>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "<GA_SERVICE_ACCOUNT_JSON>",
        "GA_API_SECRET": "<GA_API_SECRET>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "mcp-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "<GA_SERVICE_ACCOUNT_JSON>",
        "GA_API_SECRET": "<GA_API_SECRET>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "mcp-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "<GA_SERVICE_ACCOUNT_JSON>",
        "GA_API_SECRET": "<GA_API_SECRET>"
      }
    }
  }
}

Configuration

  • GA_SERVICE_ACCOUNT_JSONService account JSON for reading reports: file path or inline JSON (needed for read tools)
  • GA_PROPERTY_IDNumeric GA4 property ID, e.g. 123456789 (needed for read tools)
  • GA_MEASUREMENT_IDMeasurement ID of the data stream, e.g. G-XXXXXXXXXX (needed for event-sending tools)
  • GA_API_SECRETMeasurement Protocol API secret (needed for event-sending tools)

Pricing

Open source

MCP Google Analytics FAQ

Is MCP Google Analytics free?

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

How do I add MCP Google Analytics to Claude Code?

Run this command in your terminal: claude mcp add mcp-google-analytics --env GA_SERVICE_ACCOUNT_JSON='<GA_SERVICE_ACCOUNT_JSON>' --env GA_API_SECRET='<GA_API_SECRET>' -- npx -y mcp-google-analytics

What are the best alternatives to MCP Google Analytics?

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

Alternatives to MCP Google Analytics

  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