MCP Server Studio

Google Analytics 4 MCP server

Google Analytics 4 MCP server: 27 read tools, no write tools.

Registry name: com.getmcpads/google-analytics

Publisher
getmcpads.com
Runs
Runs locally
Package
npm
Version
2.1.2
Category
Marketing & SEO
Updated
2026-11-08

Source code on GitHub

Set up Google Analytics 4 (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/[email protected]"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>",
        "GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
        "GA4_PROPERTY_IDS": "<GA4_PROPERTY_IDS>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add google-analytics -e GA4_CLIENT_ID='<GA4_CLIENT_ID>' -e GA4_CLIENT_SECRET='<GA4_CLIENT_SECRET>' -e GA4_REFRESH_TOKEN='<GA4_REFRESH_TOKEN>' -e GA4_PROPERTY_ID='<GA4_PROPERTY_ID>' -e GA4_PROPERTY_IDS='<GA4_PROPERTY_IDS>' -- npx -y @getmcpads/[email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/[email protected]"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>",
        "GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
        "GA4_PROPERTY_IDS": "<GA4_PROPERTY_IDS>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/[email protected]"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>",
        "GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
        "GA4_PROPERTY_IDS": "<GA4_PROPERTY_IDS>"
      }
    }
  }
}

Windsurf

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

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/[email protected]"
      ],
      "env": {
        "GA4_CLIENT_ID": "<GA4_CLIENT_ID>",
        "GA4_CLIENT_SECRET": "<GA4_CLIENT_SECRET>",
        "GA4_REFRESH_TOKEN": "<GA4_REFRESH_TOKEN>",
        "GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
        "GA4_PROPERTY_IDS": "<GA4_PROPERTY_IDS>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
GA4_CLIENT_IDYesOAuth client ID.
GA4_CLIENT_SECRETYesOAuth client secret.
GA4_REFRESH_TOKENYesOAuth refresh token, analytics.readonly scope.
GA4_PROPERTY_IDNoDefault GA4 property ID.
GA4_PROPERTY_IDSNoComma-separated property IDs every tool is limited to. Optional in 2.x, required in 3.0.0.

More marketing & seo MCP servers