Skip to content
appsgit

Google Analytics MCP

Google Analytics MCP is an MCP server that adds data and analytics tools to AI assistants such as Claude Desktop, Claude Code and Cursor. GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults. It has 242 GitHub stars, is released under the MIT license and runs locally with uvx google-analytics-mcp.

github.com/surendranb/google-analytics-mcp (opens in a new tab)

Install Google Analytics MCP

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "google-analytics-mcp": {
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "your-value",
        "GA4_PROPERTY_ID": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env GOOGLE_APPLICATION_CREDENTIALS=your-value --env GA4_PROPERTY_ID=your-value --transport stdio google-analytics-mcp -- uvx google-analytics-mcp

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "google-analytics-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "your-value",
        "GA4_PROPERTY_ID": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "google_application_credentials",
      "description": "GOOGLE_APPLICATION_CREDENTIALS",
      "password": true
    }
  ],
  "servers": {
    "google-analytics-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "${input:google_application_credentials}",
        "GA4_PROPERTY_ID": "your-value"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
GOOGLE_APPLICATION_CREDENTIALSsecretYesAbsolute path to your Google Cloud service account JSON key with GA4 property access.
GA4_PROPERTY_IDYesNumeric GA4 Property ID to query, for example 123456789.

About Google Analytics MCP

Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents.

  • ai-agent
  • analytics
  • claude-mcp
  • ga4
  • gemini-extension
  • google-analytics
  • mcp-server
  • model-context-protocol
  • ai-agents
  • claude

FAQ

Google Analytics MCP FAQ

Still curious? Email info@appsgit.com.

What is Google Analytics MCP?

Google Analytics MCP is an MCP server that adds data and analytics tools to AI assistants such as Claude Desktop, Claude Code and Cursor. GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults. It has 242 GitHub stars, is released under the MIT license and runs locally with uvx google-analytics-mcp. The source code is at github.com/surendranb/google-analytics-mcp.

How do I install the Google Analytics MCP MCP server?

Add the command uvx google-analytics-mcp to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Google Analytics MCP free?

The server is open source under the MIT license, so running it is free. It needs credentials (GOOGLE_APPLICATION_CREDENTIALS) for the service it connects to, which may require a paid account.

Is Google Analytics MCP actively maintained?

The most recent commit was on Oct 3, 2026. The latest release is v2.11.3, published Aug 18, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.