Skip to main content
MCP server CX Codex

Google Analytics 4 · get-mcp-ads — Claude Code MCP server: features and setup

This MCP server lets an agent read GA4 reports, funnels, and property settings. Use it to explore analytics from Claude Code without write access.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env GA4_CLIENT_ID=<GA4_CLIENT_ID> --env GA4_CLIENT_SECRET=<GA4_CLIENT_SECRET> --env GA4_REFRESH_TOKEN=<GA4_REFRESH_TOKEN> --env GA4_PROPERTY_ID=<GA4_PROPERTY_ID> --env GA4_PROPERTY_IDS=<GA4_PROPERTY_IDS> --transport stdio get-mcp-ads-google-analytics-4 -- npx -y @getmcpads/google-analytics-mcp-server
Open on GitHub

What Google Analytics 4 does

The server offers 27 tools for reading Google Analytics 4 data, including reports, funnels, realtime data, and property settings. It can check metric and dimension combinations before an API request, and show a property’s quota snapshot. There are no tools for changing data.

You need GA4 credentials set as GA4_CLIENT_ID, GA4_CLIENT_SECRET, and GA4_REFRESH_TOKEN. The server runs through npx and requires Node.js 22.23.4, 24.22.1, or 26.12.1 or newer within those release lines. An older Node.js version triggers a startup warning. Claude Code connects to it over MCP using stdio.

What it helps with

  • inspect GA4 traffic and conversions
  • check metric and dimension compatibility before querying
  • review funnel reports and realtime data
  • check a property’s GA4 quota
  • read property and data stream settings

Example prompts for the agent

  • Show the conversion report for my GA4 property.
  • Check whether these GA4 metrics and dimensions work together.
  • Check the remaining query quota for my GA4 property.

How to install Google Analytics 4

Platform CLI

claude mcp add --env GA4_CLIENT_ID=<GA4_CLIENT_ID> --env GA4_CLIENT_SECRET=<GA4_CLIENT_SECRET> --env GA4_REFRESH_TOKEN=<GA4_REFRESH_TOKEN> --env GA4_PROPERTY_ID=<GA4_PROPERTY_ID> --env GA4_PROPERTY_IDS=<GA4_PROPERTY_IDS> --transport stdio get-mcp-ads-google-analytics-4 -- npx -y @getmcpads/google-analytics-mcp-server

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Google Analytics 4

How do I install Google Analytics 4 in Claude Code?

Run `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> -- npx -y @getmcpads/google-analytics-mcp-server`. Replace the placeholders with your GA4 credentials.

What does the Google Analytics 4 MCP server do?

It gives an agent 27 tools for reading GA4 reports, funnels, realtime data, and property settings. It cannot write data.

Which Node.js versions does the server require?

Use 22.23.4, 24.22.1, or 26.12.1 or newer in the matching release line. You also need GA4_CLIENT_ID, GA4_CLIENT_SECRET, and GA4_REFRESH_TOKEN.

Similar MCP servers

All MCP servers for Data and databases →

Google Analytics 4 by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor