Google Analytics 4 MCP Server
Reads linked Google Ads accounts alongside GA4 data and can update ads personalization for GA4 audiences so they can be used as Google Ads remarketing lists, subject to approval.
Connects to Google Analytics 4 to read traffic, engagement, conversions, attribution, landing pages, events and funnels, item-scoped ecommerce metrics, and property configuration; can create or archive GA4 audiences with user approval.
Allows analyzing Shopify sales questions alongside GA4 performance data for cross-channel reporting.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Google Analytics 4 MCP Server
Connect Google Analytics 4 to Claude, ChatGPT, Cursor and any MCP client. Ask what happened to traffic or conversions and get the answer, read beside the ad accounts that drove the traffic.
Server URL: https://mcp.sprites.ai/mcp · streamable HTTP · OAuth sign-in · 6 read tools · 14 write tools · every write approved by you
This repository holds the documentation, client configs and MCP Registry metadata for the hosted Google Analytics 4 MCP server run by Sprites. The server itself is hosted by Sprites and its source is not in this repository. There is nothing to install or run.
What's new
Date | Change |
2026-11-23 | Initial public release of connector docs and configs |
Related MCP server: GA4 MCP Server
Works with
Claude: claude.ai and Claude Desktop, custom connector (renders approval cards)
Claude Code:
claude mcp addChatGPT: developer mode app (Plus, Pro, Business, Enterprise, Edu) (renders approval cards)
Codex:
codex mcp addorconfig.tomlCursor:
mcp.jsonGemini CLI:
settings.jsonGitHub Copilot (VS Code):
.vscode/mcp.json, agent modeGoogle Antigravity:
mcp_config.jsonWindsurf:
mcp_config.jsonLovable: Connectors, Custom MCP
Grok: grok.com/connectors, Custom
Cline: Remote Servers, Streamable HTTP
Devin: Customize, MCPs
Replit Agent: Integrations, MCP Servers
Any other client that speaks remote MCP over streamable HTTP with OAuth should work with the same URL.
Quick start
Connect GA4 in Sprites. Sign up at sprites.ai and connect GA4 once in the Sprites integrations menu. Start a trial from the Sprites site.
Add the server to your client with the URL
https://mcp.sprites.ai/mcp(one endpoint for every client and every channel).Sign in. Your client opens the Sprites consent screen. Sign in with the account your channels are connected to and approve.
Ask. Try: "With Sprites, what happened to conversions last week and which channel caused it?"
Setup by client
Claude (claude.ai and Claude Desktop)
Works on Free (one custom connector), Pro, Max, Team and Enterprise.
Settings, then Customize, then Connectors. On Team and Enterprise an Owner adds it once under Organization settings, Connectors.
Click +, then Add custom connector. Name it
Spritesand pastehttps://mcp.sprites.ai/mcp. Leave Advanced settings empty.Click Connect, sign in to Sprites and approve.
Claude draws the Sprites approval card in the chat, so you can edit a budget or a headline in place and approve it.
Claude Code
claude mcp add --transport http sprites https://mcp.sprites.ai/mcpThen type /mcp inside Claude Code to finish the browser sign-in.
ChatGPT
Plus, Pro, Business, Enterprise and Edu, on the web app. Not available on Free.
Settings, Security and login: turn on Developer mode. On Business and Enterprise an admin has to allow it first.
Settings, Plugins (formerly Connectors), then + to create an app.
Name
Sprites, MCP server URLhttps://mcp.sprites.ai/mcp, Authentication OAuth. Tick the trust box and click Create.Connect the app and sign in to Sprites.
Cursor
~/.cursor/mcp.json (every project) or .cursor/mcp.json (one repo):
{
"mcpServers": {
"sprites": {
"url": "https://mcp.sprites.ai/mcp"
}
}
}Cursor discovers the Sprites authorization server from the endpoint and opens a browser to sign in.
Codex
codex mcp add sprites --url https://mcp.sprites.ai/mcp
codex mcp login spritesOr by hand in ~/.codex/config.toml:
[mcp_servers.sprites]
url = "https://mcp.sprites.ai/mcp"
auth = "oauth"VS Code and GitHub Copilot
.vscode/mcp.json. The top-level key is servers, not mcpServers, and a remote server needs "type": "http":
{
"servers": {
"sprites": {
"type": "http",
"url": "https://mcp.sprites.ai/mcp"
}
}
}Run Auth above the entry, sign in, then switch Copilot Chat to Agent mode. Ask mode does not call MCP tools.
Gemini CLI
~/.gemini/settings.json. Use httpUrl; a url entry is treated as SSE:
{
"mcpServers": {
"sprites": {
"httpUrl": "https://mcp.sprites.ai/mcp"
}
}
}Restart the CLI; the first call opens the sign-in. Check with gemini mcp list.
Other clients
Client | How |
Windsurf |
|
Google Antigravity |
|
Cline | Remote Servers tab, transport Streamable HTTP; in the file, |
Lovable | Connectors, Custom MCP, paste the URL |
Grok | grok.com/connectors, New Connector, Custom (paid tiers) |
Devin | Customize, MCPs, Add custom MCP, transport HTTP, authentication OAuth |
Replit Agent | Integrations, MCP Servers, Add MCP server, Test & Save |
Copy-ready files for each are in configs/.
What it can read
Sessions, users, engagement and conversions by any GA4 dimension
Channel, source, medium and campaign attribution
Landing pages (organic landing pages included), events and funnels
Item-scoped ecommerce: revenue and units per product
Property configuration and linked Google Ads accounts
What it can change (with your approval)
GA4 audiences, created from templates (for example "visited pricing but never purchased") or archived
Ads personalization on a linked Google Ads account, so those audiences reach Google Ads as remarketing lists
Nothing else in GA4: reports, events and property settings are read-only
Every change arrives as an approval with the before and after. In Claude and ChatGPT it is a card you can edit
in place. In clients without cards, Sprites returns the change written out with a gate id, and applies it only
after you confirm (approve_change). Nothing is applied by the model on its own.
Permissions
OAuth. You connect GA4 once inside Sprites with Google. Sprites requests
https://www.googleapis.com/auth/analytics.readonlyfor reports andhttps://www.googleapis.com/auth/analytics.editfor the two writes above (audiences and ads personalization), plusopenid email profile.Older connections. A GA4 connection made before the edit scope was added holds read access only. The first write shows a card asking you to grant edit access.
No Google Cloud project. You do not create a service account or OAuth client.
Your AI client never holds a Google credential. It holds a Sprites OAuth token bound to
https://mcp.sprites.ai/mcp.
Tools
The server exposes 20 tools to the model: 6 read tools and 14 write tools. Write tools that touch an ad account or a site only propose; nothing reaches either until you approve it. The tools that do the GA4 work:
Tool | What it does on GA4 |
| Sessions, users, conversions and revenue for any period, with the comparison. |
| The landing pages, channels and cohorts behind a change. |
| GA4 audiences for remarketing, proposed as approval cards. |
| Anything that crosses GA4 and another channel in one job. |
| A recurring brief that arrives without anyone opening GA4. |
GA4 requests use channel: seo_web (the schema groups website, Search Console and GA4 there), or all when the question spans ad channels too.
Every task tool takes the same input: goal (the request written to stand on its own: Sprites sees only this
string, not the chat), title (a short label), channel, and today (the user's local date, so "last 30 days"
resolves correctly). Long tasks return a run id; task_status collects the result and cancel_task stops it.
Tool | Type | What it does |
| read | Performance, reports, spend, revenue and Shopify sales questions, period comparisons, diagnosing a drop. Reads only. |
| read | Competitors and their ads, keyword research (paid or SEO), market and audience research, AI visibility. |
| write | Audits, wasted spend, scaling winners, moving budget. Reads, reports, and queues the recommended changes as approval cards. |
| write | Ad copy, headlines and descriptions, and written concepts for image or video ads. Writes creative; does not generate images, video or audio. |
| write | New campaigns, ad sets or ad groups, audiences, retargeting, duplicating a campaign, A/B tests, proposed as approval cards. |
| write | One named edit: budget, pause or enable, keywords or negatives, targeting, rename. Opens one approval card. |
| write | Recurring work that runs inside Sprites: weekly briefs, monitors, alerts, recurring content. |
| write | A researched blog post for your site, drafted in your CMS and published once approved. |
| write | Create or edit a landing or service page, meta titles and descriptions, schema; a diff card before publishing. |
| write | Content meant to be cited by ChatGPT, Perplexity, Gemini or AI Overviews: answer, FAQ and comparison pages, llms.txt. |
| write | Anything else: setup, capability questions, cross-channel and multi-step jobs. |
| read | LinkedIn Ads performance: spend, leads, CPL, CTR, reach, period comparisons. |
| read | LinkedIn's own forecast for up to 5 audiences: members, cost per lead, CPC and CTR over 30 days. Creates nothing. |
| write | Create a LinkedIn campaign: Sponsored Content, lead gen forms, message ads, retargeting. |
| write | LinkedIn account-based marketing: target account lists, company matched audiences. |
| write | Any other LinkedIn Ads task, routed by intent (audit, budget, pause, targeting, creative). |
| read | Which channels are connected in Sprites and how many credits are left. |
| write | Select which Sprites business the tools work on, by name, or list your businesses. |
| read | Status and result of a Sprites task by its run id. |
| write | Stop a running task. |
| write | Only on clients that do not render the approval card (Codex, Cursor, Claude Code and others): apply or decline a pending change by its gate id, after you confirm it. |
Example prompts
With Sprites, what happened to conversions last week and which channel caused it?
Ask Sprites for our top 10 landing pages by conversion rate this month.
Use Sprites to compare organic and paid revenue quarter over quarter in GA4.
Have Sprites break down ecommerce revenue by product for the last 30 days.
With Sprites, set up a Monday brief on traffic, conversions and the biggest change.
Use Sprites to find which Google Ads campaigns bring sessions that never convert.
Ask Sprites to create a GA4 audience of people who visited pricing but never purchased.
With Sprites, check whether ads personalization is on for our linked Google Ads account.
Have Sprites list the organic landing pages that lost the most sessions in 28 days.
Use Sprites to explain the traffic spike on the 14th: source, landing page and conversion.
More in examples/prompts.md. Saying "with Sprites" or "use Sprites" helps clients that
rank their own built-in tools first (Cursor, Grok).
Official server vs this one
Google Analytics MCP server (googleanalytics/google-analytics-mcp). Google publishes an official Google Analytics MCP server: reports, funnels, realtime and account summaries. It is read-only, labelled experimental, and runs on your machine with your own Google Cloud credentials.
Official / self-hosted | Sprites (this server) | |
Where it runs | Your machine, with your Google Cloud credentials | Hosted: paste |
Writes | None | GA4 audiences and ads personalization, each an approval card |
Other channels | GA4 only | GA4 beside Google Ads, Meta, LinkedIn, TikTok, Reddit, Microsoft, Search Console and Shopify |
If you want GA4 reports in a chat and are happy to run a local process, Google's server is the direct route. Use Sprites when the question is which campaign caused the change, or when the answer should become an audience or an ad change.
FAQ
Is this a server I have to host?
No. It is a hosted remote MCP server. Paste https://mcp.sprites.ai/mcp into your client and sign in.
Do I need to know GA4 dimensions and metrics? No. You ask the question; Sprites picks the dimensions, runs the report and states what it queried.
Can it change my GA4 property? Only two things, each behind an approval: it can create or archive audiences, and turn on ads personalization for a linked Google Ads account. Reports, events and settings are read-only.
Which GA4 property does it use? The one connected in your Sprites business. If several are connected, name the property in the request.
Does it handle ecommerce? Yes, including item-scoped breakdowns: revenue and units per product.
Does it cover other channels? Yes. The same URL reaches Google Ads, Meta Ads, LinkedIn Ads, TikTok Ads, Reddit Ads, Microsoft Advertising, Apple Ads, GA4, Search Console, Shopify, SEO and AI visibility, and Google Business Profile, for whatever is connected in Sprites. See ads-mcp-servers.
How much does it cost? The connector is included in every Sprites plan, and every plan starts with a short trial. See sprites.ai for current plans. GA4 charges its own media cost as usual.
The client says it has no tools, or every call is unauthorized.
Remove the server, re-add it with exactly https://mcp.sprites.ai/mcp, and sign in again. Grants are bound to that one URL.
How do I revoke access? Disconnect the connector in your client, or remove the connection in Sprites. The next tool call fails closed.
Maintained by Sprites
This server is built and run by Sprites, an AI marketing agent for paid ads, SEO and AI visibility.
Product page: sprites.ai/mcp/google-analytics
Setup guide: sprites.ai/google-analytics-mcp
All Sprites MCP servers: github.com/sprites-ai
Issues with these docs or configs: open an issue here. Security reports: see SECURITY.md.
Licensed under the MIT License. The license covers the documentation and configuration files in this repository.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Search Console, GA4, Bing Webmaster and PageSpeed MCP for Claude, ChatGPT, Cursor. Free.
Connect Google Analytics to ChatGPT. Query GA4 data in plain English and get instant insights.
Ask Claude, ChatGPT or any MCP client about your Google Analytics 4 and Search Console data, plus Bing Webmaster Tools when connected, for every site you manage, with one Google sign-in. Read only: traffic changes, why a page dropped, top queries and pages, quick-win queries, AI assistant referral traffic, URL indexing, sitemaps, custom GA4 reports and client reports. Built for site owners and agencies with many sites. Free for 1 site.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Related MCP Servers
- AlicenseAqualityBmaintenanceConnects Google Analytics 4 data to Claude, Cursor and other MCP clients, enabling natural language queries of website traffic, user behavior, and analytics data with access to 200+ GA4 dimensions and metrics.124,647 PyPI243MIT
- AlicenseAqualityCmaintenanceConnects MCP clients like Claude Desktop to Google Analytics 4 Data API, enabling natural language queries for reports, top pages, traffic sources, conversions, realtime users, and period comparisons.776 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Google Analytics 4 data using natural language through MCP clients like Claude and Cursor, supporting 200+ dimensions and metrics for traffic, user behavior, and e-commerce analysis.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants like Claude, ChatGPT, and Cursor to query GA4 traffic, conversion, channel, e-commerce, and demographic reports conversationally, and to manage properties, data streams, audiences, key events, and other configuration through 62 read and write actions. Access can be scoped per account with read-only mode and destructive actions disabled by default.MIT