Black FridaySave up to $10,000 on setup, expert support & 1M events · Ends in 15d 00h 00mClaim offer →

Google Analytics MCP setup guide, tools and limits

Adeel KhanGrowth Marketing Expert8 min read

Google Analytics MCP is Google’s official, open-source Model Context Protocol server for GA4. It lets AI assistants such as Claude and Cursor read your Google Analytics data, run reports and answer questions in plain language. It is free, runs on your own computer and is read-only by default.

This guide covers what the server does, every tool it exposes, a step-by-step setup, prompts that work, common errors and the limits to plan around. It also explains when GA4 alone falls short and you need cross-channel attribution data in the same conversation.

Key takeaways

  • Official and free: Google’s server is the open-source analytics-mcp package under the Apache 2.0 license. You only need a Google Cloud project with two Analytics APIs turned on.
  • Local by design: It runs on your machine and talks to AI clients such as Claude Desktop, Claude Code, Cursor and Antigravity. Web apps that need a remote server cannot connect to it directly.
  • Read-only by default: It reports and lists settings. Google’s README documents one optional write tool for annotations, behind an explicit flag.
  • GA4 only: It cannot see ad spend from Meta or LinkedIn, CRM revenue or Search Console data, so it cannot answer cross-channel attribution questions.
  • Check the numbers: Thresholding, processing delays and AI math on raw rows can produce wrong answers, so ask the AI to show the query it ran.

What is Google Analytics MCP?

The Model Context Protocol, or MCP, is an open standard that lets AI assistants call external tools in a consistent way. An MCP server wraps an API as a set of tools, and the AI decides which tool to call based on your question.

Google’s Analytics team released its MCP server as an experimental project in July 2025. It connects to the Google Analytics Admin API for account and property details, and to the Data API for reports. As of December 2026 the official package is analytics-mcp, version 1.1.0.

How the Google Analytics MCP server connects an AI client to a GA4 property through the Admin and Data APIs

Official package vs community servers

Search results mix up several servers with similar names. Check the package name before you install anything, because only one of them is maintained by Google and the others use different tools and authentication.

ServerMaintained byHow it runsBest for
analytics-mcpGoogle, open sourcePython package on your computerTeams that want the official GA4 tools
google-analytics-mcp on PyPIIndependent developerPython package on your computerTesting an alternative tool set
Community npm serversIndependent developersNode package with a service accountDevelopers comfortable reviewing third-party code
Hosted connectorsCommercial vendorsRemote server run by the vendorWeb-based AI apps and multi-source reporting

What the Google Analytics MCP server can do

The server exposes two groups of tools. Admin tools describe your accounts and properties, and reporting tools pull data. Your AI client picks the right tool for each question, so you never call them by name.

Account and property tools

ToolWhat it doesExample question
get_account_summariesLists the accounts and properties you can accessWhich GA4 properties can I see?
get_property_detailsReturns a property’s settings, such as time zone and currencyWhat currency does our main property use?
list_google_ads_linksLists Google Ads accounts linked to a propertyIs our Google Ads account linked?
list_property_annotationsLists annotations saved on a propertyWhat annotations did we add in Q3?

Reporting tools

ToolWhat it doesExample question
get_custom_dimensions_and_metricsLists a property’s custom dimensions and metricsWhich custom events do we track?
run_reportRuns a standard Data API reportWhat were sessions by channel last month?
run_realtime_reportReturns activity from the last 30 minutesHow many people are on the site right now?
run_funnel_reportRuns a funnel report across steps you defineWhere do users drop off between product page and checkout?

Funnel reports are a quick way into funnel analysis without building an exploration in GA4.

Google’s developer guide, updated in December 2026, also lists a conversions report tool. The GitHub README documents create_property_annotation as an optional write tool, which only works when you start the server with the allow-write flag and the analytics.edit scope.

How to set up Google Analytics MCP

Setup takes about the same effort as any Google Cloud API project, and typical use costs nothing, much like Google Analytics itself is free for most sites.

The steps below follow Google’s guide. You need Python 3.10 or later, a Google account with access to the GA4 property and a few minutes in the terminal.

Five steps to set up the Google Analytics MCP server, from enabling APIs to adding the client config

Step 1. Enable the Admin and Data APIs

Create or pick a Google Cloud project, then enable the Google Analytics Admin API and the Google Analytics Data API. The server cannot list properties without the first or run reports without the second.

Step 2. Confirm property access

The Google account or service account you use needs at least the Viewer role on each GA4 property you want to query. Viewer access is enough for every read-only tool and keeps the connection low risk.

Step 3. Create credentials

The server uses Application Default Credentials. Most people sign in with the gcloud command below, which saves a credentials file and prints its path. Teams that prefer not to use personal accounts can point the server at a service account key instead.

gcloud auth application-default login \
  --scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform

Step 4. Install the server

Install pipx or uv if you do not have one already. Both run the analytics-mcp package in its own environment, so you do not need to manage Python dependencies by hand. Use the full path to pipx or uvx if your AI app cannot find it.

Step 5. Add the server to your AI client

Add an entry like the one below to your client’s MCP configuration. Use absolute file paths, not shortcuts such as ~, and replace the project ID with your own.

{
  "mcpServers": {
    "analytics-mcp": {
      "command": "pipx",
      "args": ["run", "analytics-mcp"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/credentials.json",
        "GOOGLE_CLOUD_PROJECT": "your-project-id"
      }
    }
  }
}
AI clientWhere the configuration goes
Claude Desktopclaude_desktop_config.json
Claude CodeThe claude mcp add command, or a project .mcp.json file
Cursor.cursor/mcp.json in a project, or ~/.cursor/mcp.json for all projects
Antigravity~/.gemini/config/mcp_config.json

Restart the client, then ask “Which Google Analytics accounts and properties can you access?” If you get a list back, the connection works. Google’s guide now points to Antigravity rather than Gemini CLI, so older tutorials may show outdated steps.

Can you use it with ChatGPT or Claude on the web?

Not directly. The official server runs locally, while ChatGPT and Claude on the web connect to remote MCP servers. Google has not documented a hosted version in its MCP guide as of December 2026, so web users need a hosted connector or another remote server.

Google Analytics MCP prompts that work

Good prompts name the property, the date range and the exact metric you want. Vague questions make the AI guess field names, which is where most errors start. These examples work well as starting points. Channel names follow the default channel groups used in GA4 acquisition reports.

GoalPromptWhat you should get back
Traffic overviewShow sessions, engaged sessions and key events by default channel group for property 123456789, last 28 days vs the previous 28 days.A channel table with both periods and the change
Landing pagesList the 20 landing pages with the most sessions last month and their engagement rate.A ranked page list with rates from GA4, not recalculated
Realtime checkHow many active users are on the site right now, by country and device?A realtime breakdown for the last 30 minutes
FunnelRun a funnel from view_item to add_to_cart to purchase for last quarter, split by device.Step counts and drop-off rates per device
Campaign reviewShow sessions and purchases by session campaign for paid traffic this month.A campaign table, without cost data
Setup auditList our custom dimensions and metrics and any that look unused.An inventory of custom definitions
Answer checkShow the exact property ID, date range, dimensions, metrics and filters you used for that answer.The query behind the last result

The last prompt is the most useful habit to build. It lets you rerun the same report in GA4 and confirm the AI read it correctly before you share the number. Save prompts that work as shared templates so the whole team asks the same way.

Unlock insights that drive growth

Common Google Analytics MCP errors and fixes

Most setup problems come from APIs, permissions or file paths. This table covers the errors people report most often, with the usual fix for each.

Error or symptomLikely causeFix
403 PERMISSION_DENIEDAn API is not enabled, the role is missing or the scope is wrongEnable both APIs, confirm Viewer access and sign in again with the analytics scope
Quota project errorNo Cloud project attached to your credentialsSet GOOGLE_CLOUD_PROJECT or run gcloud auth application-default set-quota-project
401 or credentials file not foundRelative path or expired sign-inUse an absolute path and repeat the gcloud sign-in
Server fails to startPython older than 3.10 or pipx not foundUpgrade Python and use the full path to pipx or uvx
Invalid metric or dimension nameThe AI guessed a field that does not existAsk it to list custom dimensions and metrics first, then retry
429 or quota exhaustedToo many reports fired at onceAsk for fewer, combined reports and space out requests

If answers look wrong rather than failing, check the date range and property first. Most “bad data” turns out to be the AI querying a different property or a different period than you meant.

See what's working. Fix what's not. Grow faster.

Limits of Google Analytics MCP

The server is a thin layer over the GA4 APIs, so it inherits every GA4 limit and adds a few of its own. Knowing these helps you decide which questions it can answer reliably.

GA4 data limits carry over

Each Data API request accepts up to 9 dimensions and 10 metrics, and quotas are shared with your other GA4 tools. Thresholding can hide rows for small audiences, and recent data may still be processing, a common cause of GA4 data delays.

No cross-channel or revenue view

GA4 sees what its tag collects. It has no Meta, LinkedIn or Microsoft Ads spend, no CRM pipeline and no deal revenue. Questions about true ROAS or which channel created pipeline need more than one source.

The tag also misses visitors who block it, one of the GA4 ad blocker problems. Moving to GA4 server-side tracking recovers part of that loss, but the MCP server can only report what GA4 stored.

Attribution stays inside GA4’s models

The server reports whatever attribution settings the property uses. It cannot compare first touch, U-shaped or W-shaped credit, because GA4 now offers only data-driven and last click options for GA4 marketing attribution. Comparing marketing attribution models side by side needs an attribution platform.

AI accuracy traps

The AI does arithmetic on the rows it receives. Averaging rates across rows, mixing date ranges or reading thresholded totals can produce confident but wrong numbers. Ask for GA4’s own calculated metrics and the query behind every figure you plan to share.

Security checklist for Google Analytics MCP

The server is read-only by default, but it still gives an AI assistant access to your analytics. A few habits keep that access contained.

  • Use least privilege: Give the account Viewer access only to the properties the AI needs.
  • Prefer a service account for teams: It avoids tying the connection to one person’s login.
  • Protect key files: Keep credentials out of synced or shared folders.
  • Leave writes off: Only add the allow-write flag if you need annotations, and remove it afterwards.
  • Know where data goes: Report results are sent to your AI provider, so follow your company’s AI data policy.

Is there a Google Search Console MCP?

Google has not released an official Search Console MCP server as of December 2026. Several community-built servers exist, so review their code and permissions before connecting them to a production Search Console property.

Search Console data also helps explain traffic from AI search. Tracking Google AI Mode traffic and ChatGPT traffic alongside GA4 gives a fuller picture of how buyers find you.

AI traffic attribution then connects those visits to signups and revenue, while AI visibility tools show where your brand appears inside AI answers in the first place.

Google Analytics MCP vs other analytics MCP options

The official server is the right starting point for GA4 questions. Teams that need web access, more data sources or attribution usually add a second option. The table compares the three main routes.

Three ways to query analytics data with AI: the official Google Analytics MCP, hosted connectors and attribution MCP servers
NeedOfficial Google Analytics MCPHosted GA4 connectorsAttribution MCP servers
CostFree, API quotas applyUsually a paid subscriptionIncluded with the attribution platform
SetupGoogle Cloud project, credentials and local installSign in through the vendorSign in and approve permissions
Works in web AI appsNo, local clients onlyUsually yesUsually yes
Data sourcesOne GA4 property per queryGA4 plus other marketing sourcesFirst-party tracking, ad platforms and CRM
Cross-channel ad spendNoDepends on the connectorYes
Multi-touch attributionNo, GA4 models onlyRarelyYes, several models side by side
Write actionsAnnotations only, behind a flagVariesVaries, often with approval steps

If your questions are mostly about traffic and engagement, the official server is enough. If they are about which channels drive pipeline and revenue, pair it with a tool built for multi-touch attribution.

Teams weighing a full switch can compare Usermaven, GA4 and Matomo on tracking accuracy, attribution and privacy before deciding.

Plan your 2027 AI analytics stack

Many teams now set their analytics budget for next year in December. Use this decision matrix to choose how AI assistants should reach your data in 2027, based on who asks the questions and what they need to answer.

Your situationBest fitWhy
Analysts using Claude Desktop, Claude Code or CursorOfficial Google Analytics MCPFree, official and enough for GA4 reporting
Marketers who work in ChatGPT or Claude on the webHosted connector or remote MCP serverNo local install or Cloud project needed
Paid teams asking about ROAS across Google, Meta and LinkedInAttribution MCP serverAd spend and conversions in one place
B2B teams reporting pipeline and revenue by channelAttribution MCP with CRM connectionConnects touchpoints to deals, not just sessions
Agencies managing many client propertiesRemote MCP with workspace controlsSwitch clients by prompt with scoped access

Whichever route you pick, write down which properties and permissions each connection has. Reviewing that list every quarter keeps AI access in step with team changes.

Use Usermaven MCP for attribution questions GA4 cannot answer

Usermaven is an AI-powered marketing attribution platform for B2B SaaS companies, ecommerce brands and agencies. Where the official GA4 server stops at GA4 reports, Usermaven brings first-party tracking, ad platform data and revenue into one place that AI assistants can query.

As a marketing attribution platform, Usermaven offers eight attribution models, paid ads attribution down to the ad level, funnels and customer journeys. Its web and product analytics sit alongside these as supporting features, so traffic and conversion questions draw on the same data.

Usermaven attribution model comparison

Usermaven MCP

Usermaven MCP is a hosted remote server, so it works with ChatGPT, Claude and Cursor without a local install or Google Cloud project. You sign in, choose which workspaces to connect and approve the permissions you want to allow.

Ask questions such as “Which campaigns generated the most paying customers?” or “Where are users dropping off in our onboarding funnel?” Creating a funnel, goal or dashboard needs your approval before anything changes, and MCP is included in all plans.

Maven AI and MCP architecture

Maven AI and Maven AI Agents

Maven AI answers attribution questions inside Usermaven, such as how a channel’s credit changes across models. Maven AI Agents run scheduled investigations and flag shifts in channel performance, so issues surface without anyone building a report.

Maven AI Agents in Usermaven running scheduled investigations

Final thoughts

Google Analytics MCP is the fastest free way to chat with your GA4 data, as long as you are comfortable with a local setup and GA4’s limits. Use it for traffic, engagement and funnel questions, and always ask the AI to show the query behind its answer.

When the questions move to ad spend, pipeline and revenue across channels, you need attribution data as well. To see how that works in your AI assistant, book a demo.

FAQs

What is Google Analytics MCP?

Google Analytics MCP is Google’s official, open-source Model Context Protocol server for GA4. It lets AI assistants such as Claude and Cursor list your properties and run reports through the Google Analytics Admin and Data APIs.

Is the Google Analytics MCP server free?

Yes. The analytics-mcp package is open source under the Apache 2.0 license. You need a Google Cloud project with the Analytics Admin and Data APIs enabled, and normal API quotas apply.

How do I get started with Google Analytics MCP?

Enable the Analytics Admin and Data APIs, confirm Viewer access to your property, sign in with Application Default Credentials, install the package with pipx or uv and add the server to your AI client’s MCP configuration.

Does Google Analytics MCP work with Claude?

Yes. It works with Claude Desktop and Claude Code as a local server. Claude on the web needs a remote MCP server, so it cannot connect to the official package directly.

Can Google Analytics MCP change my GA4 settings?

Not by default. The server is read-only out of the box. Google’s README documents one optional tool for creating annotations, which only works when you enable writes with a flag and the analytics.edit scope.

Does Google Analytics MCP work with ChatGPT?

Not directly. ChatGPT connects to remote MCP servers, while the official package runs on your own computer. ChatGPT users need a hosted connector or another remote MCP server for their analytics data.

Is there an official Google Search Console MCP?

Google has not released an official Search Console MCP server as of December 2026. Community-built servers exist, so review their code and the permissions they request before you connect a live property.

What can’t Google Analytics MCP do?

It only reads GA4. It cannot see ad spend from other platforms, CRM revenue or Search Console data, and it cannot compare attribution models beyond GA4’s data-driven and last click options.

Find out more about: