GA4 MCP

GA4 and Tag Manager, in the same conversation as Search Console.

Clicks tell you who arrived. GA4 tells you what they did. GSC Magic gives your agent both, with one Google sign-in and no local setup.

Last updated: 2026-10-18

In short

GSC Magic is a hosted Google Analytics 4 MCP server: 6 read-only GA4 tools (reports, realtime, key events, metadata) and 7 Tag Manager tools, behind the same Google sign-in as Search Console, usable in Claude, ChatGPT, Cursor and Claude Code without running Google's local server.

Why GA4 next to Search Console

Search Console stops at the click. To know whether a ranking change mattered you need sessions, engagement and key events per landing page, and in 2026 you also need to know how much traffic ChatGPT, Perplexity, Claude and Gemini send you. GSC Magic exposes the GA4 Data API and the Tag Manager API as MCP tools, read-only, on the same connector as Search Console and Bing. The dashboard stores daily AI-assistant sessions per site so the trend is visible without a query.

GA4 tools

GA4 reports next to your search data: sessions, key events, landing pages and referral traffic from AI assistants.

  • ga_list_propertiesGoogle Analytics accounts and GA4 properties the account can access.
  • ga_list_data_streamsData streams of a GA4 property, including the Measurement ID used by the tag on the site.
  • ga_get_metadataDimensions and metrics available for a property, including custom ones, with search.
  • ga_run_reportRun a GA4 report with dimensions, metrics, date ranges, filters, ordering and paging.
  • ga_run_realtime_reportGA4 realtime report for the last 30 minutes.
  • ga_list_key_eventsKey events (formerly conversions) configured on a property.

Tag Manager tools

Read-only view of what is actually firing on the site: containers, tags, triggers, variables and the live version. Useful when the agent is debugging why GA4 numbers look wrong: it can read the live container and tell you which tag fires on which trigger.

  • gtm_list_accountsTag Manager accounts the account can access.
  • gtm_list_containersContainers of an account, with the public GTM-XXXX id.
  • gtm_list_workspacesWorkspaces (drafts) of a container.
  • gtm_list_tagsTags of a workspace with type, triggers and parameters, including GA4 measurement ids and event parameters.
  • gtm_list_triggersTriggers of a workspace with type and conditions.
  • gtm_list_variablesUser-defined variables of a workspace.
  • gtm_get_live_versionThe currently published container version: what is really running on the site.

Prompts to try

  • "How many sessions came from ChatGPT, Perplexity, Claude and Gemini last month, to which pages, and did they convert?"
  • "For the ten pages with the most Search Console clicks, show GA4 engagement rate and key events."
  • "Why do Search Console clicks and GA4 organic sessions differ for /pricing?"
  • "Which GA4 tag fires on the purchase event in the live Tag Manager container?"

Guides: How to track ChatGPT and Perplexity traffic in GA4 and Why GSC clicks and GA4 sessions don't match.

Questions

How is this different from Google's official Analytics MCP server?

Google's server is open source and runs locally with your own credentials, in desktop clients only. GSC Magic is hosted, works in claude.ai and ChatGPT, shares one Google sign-in with Search Console and Tag Manager, and stores daily AI-referral sessions so you can see the trend.

Which GA4 permission does it need?

Read-only analytics access (analytics.readonly). It is part of the single Google consent at sign-in. GSC Magic never writes to GA4 or Tag Manager.

How do you detect traffic from ChatGPT and Perplexity?

From the session source and referrer dimensions in GA4: chatgpt.com, perplexity.ai, claude.ai, gemini.google.com and others. Some AI traffic arrives as direct; the agent is told so it does not over-claim.

Can I link one GA4 property to several sites?

Yes. Properties are linked per site in the dashboard, and the import picker matches them by host automatically when the GA4 stream URI is set.