GO

google analytics MCP Server

Published by surendranb

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

CATEGORY
More to explore
DEPLOYMENT
Local package
LATEST SOURCE VERSION
2.12.6
SOURCE CHECKED
Nov 27, 2026

Quick answers

How do I add google analytics MCP Server to Claude Code, Cursor or Codex?

Claude CodeCommand

Run this in your terminal:

claude mcp add --env 'GOOGLE_APPLICATION_CREDENTIALS=<your-google-application-credentials>' --env 'GA4_PROPERTY_ID=<your-ga4-property-id>' --transport stdio google-analytics -- uvx google-analytics-mcp

Replace the <your-…> placeholder with your own GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID.

Claude Code setup guide
CursorConfig

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:

{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<your-google-application-credentials>",
        "GA4_PROPERTY_ID": "<your-ga4-property-id>"
      }
    }
  }
}

Replace the <your-…> placeholder with your own GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID.

Cursor setup guide
CodexCommand

Run this in your terminal:

codex mcp add google-analytics --env 'GOOGLE_APPLICATION_CREDENTIALS=<your-google-application-credentials>' --env 'GA4_PROPERTY_ID=<your-ga4-property-id>' -- uvx google-analytics-mcp

Replace the <your-…> placeholder with your own GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID.

Codex setup guide
VS CodeConfig

Add this to .mcp.json at the root of your workspace:

{
  "mcpServers": {
    "google-analytics": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<your-google-application-credentials>",
        "GA4_PROPERTY_ID": "<your-ga4-property-id>"
      }
    }
  }
}

Replace the <your-…> placeholder with your own GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID.

VS Code setup guide
Claude DesktopConfig

Add this to claude_desktop_config.json, then restart Claude:

{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<your-google-application-credentials>",
        "GA4_PROPERTY_ID": "<your-ga4-property-id>"
      }
    }
  }
}

Replace the <your-…> placeholder with your own GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID.

Claude Desktop setup guide
ChatGPTNot available

ChatGPT can't add it from its published details: it connects from the cloud and needs a public address, and this server runs on your computer.

ChatGPT setup guide

Which apps can use google analytics MCP Server?

Claude Code, Cursor, Codex, VS Code and Claude Desktop can add it from its published details. ChatGPT can't: it connects from the cloud and needs a public address, and this server runs on your computer.

Does google analytics MCP Server need an API key?

To run it on your computer, set GOOGLE_APPLICATION_CREDENTIALS and GA4_PROPERTY_ID first, with values from the publisher.

Is google analytics MCP Server official?

It's published by surendranb. The Official MCP Registry accepts names under io.github.surendranb only from the GitHub account or organisation surendranb. We last checked its listing on Nov 27, 2026. A listing shows where a server comes from; it isn't a security review.

Published packages

pypi · google-analytics-mcp@2.12.6
View source repository