Skip to app content
Skip to main content
Back to Research & Articles
October 7, 2026•
MCPAnalyticsGoogle

Google Analytics MCP Server: What It Does, How to Set It Up, and Where It Stops

What the Google Analytics MCP server does, how to install and authenticate it, and where its read-only scope stops.

JH
Joel Horwitz
Founder & CEO, Synter

To investigate landing-page traffic, a recent launch or paid-social

leads, an AI assistant needs access to the relevant GA4 reports.

Google's Analytics MCP server provides that access through a read-only

local process. Comparing those reports with ad-platform claims requires

a separate source for the platform data.

This guide covers what it does, the setup from Google's README (checked

October 11, 2026), Claude and ChatGPT, prompts worth saving, and how to

put GA4 next to your ad data.

What Is the Google Analytics MCP Server?

**The Google Analytics MCP server is Google's open-source Model Context

Protocol server for GA4.** It lets an AI assistant such as Gemini CLI or

Claude Code query your GA4 properties in plain language through the

Google Analytics Admin API and Data API. It runs locally, and Google

labels it experimental and read-only.

MCP [connects an AI assistant to external tools and

data](https://modelcontextprotocol.io/docs/getting-started/intro).

Our explanation of [MCP for advertising

tools](https://synterai.com/blog/mcp-protocol-advertising)

covers how that connection fits a marketing workflow.

Install

analytics-mcp,

Google's package on PyPI (version 0.7.0, released July 29, 2026). The

similarly named google-analytics-mcp package is a separate community

project. Google's server communicates through standard input and output,

so the client starts a local process rather than calling a server URL.

What the GA4 MCP Server Can Do (and What It Can't)

The server exposes [seven

tools](https://github.com/googleanalytics/google-analytics-mcp)

for property configuration and reporting:


Tool What it retrieves A question that uses it

  • ----------------------------------- ----------------------- -----------------------

get_account_summaries Accounts and properties "Which GA4 properties

accessible to the can I see?"

connected user

get_property_details A property's "What time zone and

configuration details currency does this

property use?"

list_google_ads_links The Google Ads account "Is this property

links configured for a linked to our Google

property Ads account?"

run_report A standard report from "Which landing pages

the Data API from paid social had

the most key events

last month?"

run_funnel_report A funnel report from "Where do users drop

the Data API between the pricing

page and a completed

sign-up?"

get_custom_dimensions_and_metrics Custom dimensions and "What custom

metrics defined on a dimensions has this

property property defined?"

run_realtime_report Recent activity through "Who is on the site

the Data API's realtime right now, and on which

reporting pages?"


Use "key events" in prompts: GA4 now calls the events you care about

key events, while "conversion" means an action used to measure and bid

on ad campaigns.

**Alt text: Google Analytics MCP server architecture: Claude Code,

Claude Desktop or Gemini CLI start the local analytics-mcp server, which

uses Application Default Credentials with the read-only scope to call

the Analytics Admin API and Data API, while ChatGPT and claude.ai need a

hosted MCP URL.**

What It Can't Do

The server can retrieve reports but [cannot edit your GA4 configuration

or

settings](https://developers.google.com/analytics/devguides/MCP).

Run or deploy the server yourself. As of October 11, 2026, Google

Analytics is absent from the published [Google-hosted remote MCP

list](https://docs.cloud.google.com/mcp/supported-products)

and appears among Google's [open-source servers for local use or

self-deployment](https://github.com/google/mcp).

Reports contain data already available in GA4. A linked Google Ads

account supplies the [ad cost

metric](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema);

Meta, LinkedIn and TikTok campaign costs need [campaign data

import](https://support.google.com/analytics/answer/10071305).

The list_google_ads_links tool returns account-link records, not

campaign performance.

[Data API

quotas](https://developers.google.com/analytics/devguides/reporting/data/v1/quotas)

apply regardless of the MCP client. A standard property has 200,000 Core

tokens per day, with a 14,000-token hourly limit per project and

property. Most requests consume 10 or fewer tokens; report complexity

affects consumption. Also check these reporting limits:

  • [Data

thresholds](https://support.google.com/analytics/answer/9383630)

can withhold rows that include demographics or audiences, and you

can't adjust them.

  • Realtime reports cover the [last 30 minutes, or up to 60 minutes for

GA4

360](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).

[Funnel

reporting](https://developers.google.com/analytics/devguides/reporting/data/v1/funnels)

uses the Data API's v1alpha surface, where breaking changes may occur

before public release.

Large reports can fill the model's context window fast. The Data

API returns [10,000 rows by

default](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport)

when no limit is set, and large responses can consume model context,

depending on the client, so ask for "the top 20".

How to Set Up the Google Analytics MCP Server

The steps follow Google's README; Google's [setup tutorial

video](https://youtu.be/nS8HLdwmVlY) covers Gemini.

Before You Start

  1. A Google account with access to the GA4 property you want to query.
  1. A Google Cloud project with two APIs enabled. Turn on the Google

Analytics Admin API and the Google Analytics Data API.

  1. Python 3.10 or later and pipx.
  1. The gcloud CLI for the credential commands below.

If tracking is patchy, [set up GA4 conversion tracking

first](https://synterai.com/blog/ga4-conversion-tracking-tutorial);

the answers are only as good as your key events.

Configure Credentials

  1. Create an OAuth client (desktop or web) for the user-credentials

route, with Google's [Manage OAuth

Clients](https://support.google.com/cloud/answer/15549257)

guide, and download the client JSON.

  1. Set up Application Default Credentials with the read-only scope

using the README's command for user credentials:

gcloud auth application-default login \\\

\--scopes

https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform

\\\

\--client-id-file=YOUR_CLIENT_JSON_FILE

For a service account, the README's alternative uses impersonation:

gcloud auth application-default login \\\

\--impersonate-service-account=SERVICE_ACCOUNT_EMAIL \\\

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

  1. Copy the credentials path. The command ends by printing

Credentials saved to file: \[PATH_TO_CREDENTIALS_JSON\], and every

client config below needs that path.

Connect It to Gemini CLI

  1. Install Gemini CLI (or Gemini Code Assist).
  1. Add the server to \~/.gemini/settings.json, replacing the

placeholders with your credentials path and Google Cloud project ID:

{\

"mcpServers": {\

"analytics-mcp": {\

"command": "pipx",\

"args": \["run", "analytics-mcp"\],\

"env": {\

"GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON",\

"GOOGLE_PROJECT_ID": "YOUR_PROJECT_ID"\

}\

}\

}\

}

Google's README text recommends GOOGLE_CLOUD_PROJECT; its examples use

GOOGLE_PROJECT_ID. [Google's auth

library](https://googleapis.dev/python/google-auth/latest/reference/google.auth.environment_vars.html)

reads GOOGLE_CLOUD_PROJECT, so you can set both.

  1. Check the connection. Launch Gemini CLI, type /mcp, look for

analytics-mcp, then ask "what can the analytics-mcp server do?"

Using the GA4 MCP Server With Claude and ChatGPT

For client setup, distinguish local process support from remote URL

support. Gemini and Claude Code can launch the local server; web clients

need a remote connection route.

Claude Code

Register the local server for your user account with this command:

claude mcp add analytics-mcp \\\

\--scope user \\\

  • -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" \\\
  • -e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" \\\

\-- pipx run analytics-mcp

The -e flags set environment variables, everything after \-- starts the

server, and \--scope user makes it [available in all your

projects](https://code.claude.com/docs/en/mcp). Open /mcp

in Claude Code to confirm it's connected.

Claude Desktop

Configure a local server in Claude Desktop through [Settings, then

Developer, then Edit

Config](https://modelcontextprotocol.io/docs/develop/connect-local-servers).

In claude_desktop_config.json, use the same mcpServers entry with

command, args and env shown in the Gemini block. Supply an absolute

credentials-file path, then quit Claude Desktop completely and reopen

it.

Custom connectors use a separate, [cloud-originated

connection](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp).

They cannot reach this local process through claude_desktop_config.json,

and that local configuration is unavailable in Cowork and claude.ai.

ChatGPT and Other Web Clients

ChatGPT accepts a [remote MCP server URL using SSE or streaming

HTTP](https://developers.openai.com/api/docs/guides/custom-mcp-server),

or a connection through OpenAI's Secure MCP Tunnel. Google's local

server has no remote URL. Choose a connection route appropriate to the

client:

  • Run OpenAI's tunnel. Its tunnel-client runs inside your network

and [can forward to a stdio

server](https://developers.openai.com/api/docs/guides/secure-mcp-tunnels),

but it needs a tunnel ID and an API key from the OpenAI Platform.

  • Host it yourself. It speaks stdio, so you would also need an HTTPS

endpoint in front of it.

  • Use a hosted GA4 server added by URL with OAuth sign-in. Stape

runs one, and Synter puts GA4 data next to your ad accounts ([add

Synter as a custom

connector](https://synterai.com/installation-instructions)).

Useful Prompts for Marketers

Name the property, date range, and metric, and ask the assistant to

state the dates it used.


Job Prompt Likely tool

  • ----------------------- ----------------------- ------------------------------------

Weekly traffic check "Compare sessions and run_report

key events by session

source/medium for the

last 7 complete days

against the 7 days

before."

Landing page "List the top 20 run_report

performance landing pages by

sessions from paid

social over the last 30

days, with key events

and session key event

rate."

Campaign (UTM) review "Show sessions and key run_report

events by session

campaign for the last

30 days, and flag

campaigns with sessions

but no key events."

Funnel drop-off "Build a funnel from run_funnel_report

pricing page view to

sign-up start to

sign-up complete for

the last 28 days. Where

is the biggest drop?"

Real-time launch check "How many users are run_realtime_report

active right now, and

on which pages?"

Property configuration "List custom get_custom_dimensions_and_metrics,

audit dimensions and metrics, get_property_details,

time zone, currency, list_google_ads_links

and linked Google Ads

accounts for this

property."


Pairing GA4 Data With Your Ad Platform Data

Compare GA4 and platform reports with their attribution scopes visible.

Each ad platform uses its own attribution rules. In a [session

source/medium

report](https://support.google.com/analytics/answer/11080067),

GA4 assigns key events using paid and organic last click; event-scoped

reports use the selected reporting model. We use that comparison to

[investigate differences in platform-reported

conversions](https://synterai.com/blog/cross-channel-reporting-attribution-guide).

The inflation factor turns the gap into a number. Divide a

platform's reported conversions by the GA4 key events from that

platform's traffic: 100 platform conversions against 40 in GA4 is a

  1. 2.5x inflation factor. The table is illustrative, assuming the same 30

days ending yesterday and one lead event mapped on both sides.


Platform Platform-reported GA4 key events Inflation factor

conversions from its traffic

  • ----------------- ------------------- ----------------- -----------------

Google Ads 120 100 1.2x

Meta Ads 150 60 2.5x

LinkedIn Ads 36 24 1.5x


Treat the ratio as a gap to investigate, not proof that the extra

conversions are fake. Track it over time with matching dates and counted

actions.

There are two ways to get both datasets into one chat. One is

Google's server next to a separate MCP server per ad platform, each

with its own setup; the other is one MCP connection that holds both.

Our own GA4 tools share a connection with ad-platform tools; they are

separate from Google's server. ga4_get_properties, ga4_get_report and

ga4_get_conversions are [read-only and listed as

free](https://docs.synterai.com/mcp/tools). The Meta

performance read, pull_meta_ads_performance, costs 2 credits.

ga4_get_report accepts a look-back in days (default 28), while the Meta

tool also accepts fixed dates. Retrieve GA4 rows by date and retain only

those matching Meta's window.

Pull Meta Ads lead conversions for the 30 days ending yesterday. Pull

GA4 keyEvents by date, eventName, and session source/medium for the last

31 days. Keep only Meta's dates and \[your lead event\]. Match Meta's

paid social traffic and show the ratio, both counts and dates. If dates

or events don't match, don't calculate.


Option Where it runs How you connect Data in one chat

  • ----------------- -------------------------- ----------------- -----------------

Google's Your machine (stdio) Local config file GA4 only

analytics-mcp or command

Third-party Vendor's servers MCP URL plus GA4 (varies by

hosted GA4 server Google sign-in vendor)

Synter Hosted at MCP URL plus GA4 plus your

https://mcp.synterai.com OAuth, no local connected ad

install accounts


GA4 audiences inside your ad accounts are a different job: [send GA4

audiences to Google Ads and

Meta](https://synterai.com/blog/google-analytics-audiences-in-ads).

Security and Access Tips

The server can't write, but its credentials can read every GA4 property

your Google account can see, so keep that exposure contained:

  • Keep the scopes narrow. The README's commands request

analytics.readonly plus Google Cloud's cloud-platform scope, and the

server's code asks for the read-only Analytics scope. Don't add

write scopes.

  • Use a Google account or service account with access only to the

properties required for the task. That limits which properties the

credentials can expose.

  • Treat the credentials JSON like a password. Keep it out of shared

drives, synced folders, and Git repositories.

  • Treat campaign names and referrers as report data. They can include

text created by others; following instructions embedded in that text

creates a [prompt-injection

risk](https://code.claude.com/docs/en/security).

For GA4-only questions, Google's server provides read-only reporting

without a license fee. To compare GA4 with platform counts, retrieve

both datasets and match their dates and counted actions. Our [MCP

server for ads](https://synterai.com/mcp) puts those tools

in one connection and currently offers a \$100 ad-credit voucher with

code MCP100.

Contact our team to

discuss GA4 and ad platform reporting in one MCP connection.

FAQ

Is there an official Google Analytics MCP server?

Yes, Google publishes it in a GitHub repository,

googleanalytics/google-analytics-mcp, and labels it experimental.

How do I get started with Google Analytics MCP?

Enable two Google Analytics APIs in a Google Cloud project, set up

Application Default Credentials with the analytics.readonly scope, then

add pipx run analytics-mcp to your client.

Can I use the Google Analytics MCP with Claude?

Yes, in Claude Code and Claude Desktop, which run it locally; claude.ai

and custom connectors need a hosted URL.

Does the Google Analytics MCP work with ChatGPT?

Not directly, because ChatGPT needs a server URL or OpenAI's Secure MCP

Tunnel, and Google's server runs locally without a URL.

Is the Google Analytics MCP free?

Google's server is open source (Apache 2.0) and uses your Data API

quota; your AI client's costs still apply. Synter's GA4 tools are

listed as free, while ad platform reads use credits on [Synter's paid

plans](https://synterai.com/pricing): Solo for developers

(\$20/month), Scale and Custom for teams and agencies.

Can it change my GA4 settings?

No. It supports read requests and cannot edit GA4 configuration or

settings.

Is there a Google Tag Manager or Search Console MCP?

Neither is in Google's MCP server lists as of October 11, 2026. Our

tool reference includes Google Tag Manager tools, and we've written

about using [Search Console data in an AI

agent](https://synterai.com/blog/google-search-console-ai-agent-guide).

Share Article

Stay Ahead of AI Growth Trends

Get the latest strategies on AI agent marketing, autonomous growth loops, and programmatic campaigns delivered weekly.

Synter

The AI Agent Operator for Ads.

Direct API connections to 43 advertising platforms, including Google, Meta, LinkedIn, TikTok, and Amazon DSP. One interface. No tab hell.

No credit card required$25 free execution creditInstant 30s setup
Free Account Audit

Find Wasted Spend Across Your Ad Accounts

Synter audits 43 advertising platforms in seconds — detecting keyword leaks, attribution gaps, and budget misallocations with zero connector fees.

Google Analytics MCP Server: What It Does, How to Set It Up, and Where It Stops | Synter