GA4 MCP
Tag Pilot GA4 MCP is a free, read-only Model Context Protocol server for Google Analytics 4. Add it to Claude Desktop, Claude Code, Cursor, VS Code, Gemini CLI or any other MCP client and ask questions such as "Which channels brought the most purchases last month?". It runs reports, funnels and realtime queries, reads your property setup, and runs two Tag Pilot tracking-health checks.
You don't need a Google Cloud project, OAuth client, service account or gcloud, and there's no API key to copy. Add the server, ask a question, approve once in your browser, and ask away.
How it works
- You install the GA4 MCP in your AI client: a Claude Desktop extension, a one-click button or
npx -y @tagpilot/ga4-mcp. No configuration needed. - On the first question, you get a link to app.tagpilot.io/connect and a code like
ABCD-1234. Open it in any browser, on any device, log in to your free Tag Pilot account, check the code and approve this computer. - Google's consent screen follows: approve read-only access to Google Analytics. Google hands the one-time sign-in code to Tag Pilot's API, which holds it for at most 10 minutes until the GA4 MCP collects it and exchanges it, together with a secret that never left your computer.
- The computer's credentials are saved on it, and it shows up under Connected devices on your GA4 MCP page. From then on, every GA4 request goes from your computer straight to Google.
Privacy
- Your GA4 data goes from your machine straight to Google. Reports, property settings and everything else the tools read never pass through Tag Pilot.
- Tag Pilot only brokers the token exchange. It stores no Google tokens and no GA4 data, and never logs codes or tokens. The one-time sign-in code is held for at most 10 minutes, then deleted, and is useless without a secret that stays on your computer. Tag Pilot records only which connected device made a request, and when (the Last used time on your GA4 MCP page).
- Read-only. The only Google permission requested is
analytics.readonly("See and download your Google Analytics data"). No tool can change anything in GA4.
More in Account, Security & Privacy.
Requirements
- A free Tag Pilot account, to approve your computers. You can also create it during the first connect.
- Node.js 18 or newer on the computer that runs your AI client, except with the Claude Desktop extension, which brings its own.
- A Google account with at least Viewer access to the GA4 properties you want to ask about.
The package is open source (Apache 2.0): @tagpilot/ga4-mcp on npm, source on GitHub. It's also listed in the MCP Registry as io.github.tagpilot/ga4-mcp.