Back to blog
Article

How to Connect Google Analytics 4 to Claude (GA4 MCP Setup)

Updated November 3, 2026
19 min read
By InsightfulPipe
On this page
How to Connect Google Analytics 4 to Claude (GA4 MCP Setup)

InsightfulPipe publishes this guide, and its steps use InsightfulPipe's hosted Google Analytics 4 server.

Last updated: 2026-10-21

To connect Google Analytics 4 to Claude, connect the property in InsightfulPipe, add InsightfulPipe from the Claude Directory or paste https://google-analytics.insightfulmcp.com/ as a custom connector, then click Connect, sign in to InsightfulPipe if asked, and click Authorize access. You need no Google Cloud project, OAuth client or server to host. Claude gets up to 62 GA4 actions, each one a switch your admin controls. Plans start from $29.99 a month.

The quick version

These six steps are the whole GA4 setup, and the sections below explain each one.

  1. In InsightfulPipe, open Connected accounts, click Connect account and choose Google Analytics 4.
  2. Pick Read-only or Read & write, click Continue with Google Analytics and sign in with Google.
  3. Select your properties and click Connect 1 property, or the count you picked.
  4. In Claude, open InsightfulPipe in the Claude Directory, or paste the server URL under Customize > Connectors.
  5. Click Connect, sign in to InsightfulPipe if asked, and click Authorize access.
  6. Turn the connector on in a new chat and run the read-only check under "Verify it worked".

Four ways to connect GA4 to Claude

There are four ways to connect GA4 to Claude, and InsightfulPipe is the one that reads and changes GA4, with a switch on every action. Every other route below only reads GA4 by its own pages, apart from one annotation tool behind a flag on Google's server, and except Markifact, whose GA4 page lists settings changes that wait for approval while its tutorial still calls its GA4 operations read-only.

Route

What you set up

Reads GA4

Changes GA4 settings

InsightfulPipe hosted server

A Google sign-in, then the Claude Directory listing or one server URL

Yes, any Data API report

Yes: 24 write actions, plus 12 destructive ones that stay off until an admin switches them on

Google's official server

Python, a Google Cloud project and local credentials

Yes

No settings; one annotation tool behind an --allow-write flag

Hosted connectors: Windsor.ai, Supermetrics, Whatagraph, Markifact, Porter Metrics, Stape

An account with the vendor, then a connector in Claude

Yes

No GA4 writes on their own pages, except Markifact, whose GA4 page lists settings changes held for approval

CSV export

An export from GA4 and an upload

A snapshot

No

The GA4 MCP server page lists all 62 actions, with the same setup steps for each client.

Bar chart: InsightfulPipe has 36 actions that change GA4 settings, each a switch; Markifact's docs list 16, each held for approval, though its tutorial says read-only; Google's server changes no settings but adds one annotation tool behind a flag, and Windsor.ai, Supermetrics, Whatagraph, Porter Metrics and Stape have none, by their own pages.

Watch the GA4 setup in Claude

This three-minute video shows the same connection on screen, from the Google sign-in to a first GA4 report in Claude.

Watch: Connect Google Analytics 4 to Claude with MCP, the full tutorial, 3 minutes 13 seconds

The video may show earlier versions of some screens. Follow the steps in this guide for the current labels.

What you are actually connecting

Claude never sees your Google password. It sends a structured request over MCP to InsightfulPipe's GA4 server, which calls the Google Analytics Data API or Admin API with the access you approved.

Claude → InsightfulPipe GA4 server → the GA4 properties you authorized

The GA4 MCP server page on insightfulpipe.com: 62 read and write actions, a Google sign-in, one server URL and no Google Cloud project needed.

Four things bound what Claude can do: your workspace, the connection you authorized, the property's action list and your own role in GA4.

The access level also sets the Google scope. Read-only asks Google for analytics.readonly, and Read & write adds analytics.edit. You need no Google Cloud project, OAuth client, server to host or API version to track. MCP vs API explains the difference from calling the API yourself.

Before you start

You need four things before the first click, and the roles on both sides decide what Claude can do.

  • GA4 access. A Google login that can open the property in Google Analytics.
  • An InsightfulPipe workspace, from $29.99 a month with 8 connections and unlimited tool calls. Each GA4 property counts as one connection. Start a trial if you have no workspace yet.
  • The right workspace role. Owners, admins and operators can connect accounts. Members on the User role cannot.
  • A client that supports remote MCP servers. Claude offers custom connectors on every plan, and Free allows one, per Anthropic. ChatGPT, Claude Code, Cursor, Gemini CLI and Codex work too.

Google's own roles still apply. In Google's role list, a Viewer "can see settings and data", a Marketer "can create, edit, and delete audiences, events, and key events", and an Editor has "full control of settings at the property level". InsightfulPipe cannot expand the authority of the Google account you connect.

Step 1: Connect Google Analytics 4 in InsightfulPipe

You choose the access level and see every GA4 action before Google asks you to sign in.

  1. In InsightfulPipe, open Connected accounts and click Connect account.
  2. On Add an integration, find Google Analytics 4 and click Connect.
  3. Under Access level, choose Read-only or Read & write.
  4. Check the MCP / CLI actions panel. On Read & write it reads 50 of 62 enabled, and the Destructive tab shows 0/12.
  5. Click Continue with Google Analytics, then sign in with Google and approve access.
  6. Under Properties, pick your properties and click Connect 1 property, or the count you picked.

Each property becomes its own connection with its own action list. On Read-only, the panel reads 26 of 62 enabled · writes locked. A read-only connection locks every write until an admin reconnects it with Read & write. The GA4 connector docs cover each field.

InsightfulPipe's access level step for Google Analytics 4, before any Google sign-in: Read & write selected, 50 of 62 actions enabled, and the 12 destructive actions off.

Step 2: Connect Google Analytics 4 to Claude

Claude takes InsightfulPipe in one of two ways, and the approval at the end is the same. The flow matches on claude.ai and in Claude Desktop.

Fastest: the Claude Directory. Open InsightfulPipe in the Claude Directory and click Connect. This adds the full InsightfulPipe MCP server, which reaches every account your workspace has connected, GA4 included.

Scoped to GA4: the server URL.

  1. Copy the server URL: https://google-analytics.insightfulmcp.com/
  2. In Claude, open Customize > Connectors.
  3. Click + Add, then Add custom connector.
  4. Name it, paste the URL, click Continue twice, then Add.
  5. Click Connect on the new connector.
The Claude tab of InsightfulPipe's GA4 MCP server page: the Claude Directory callout, the server URL https://google-analytics.insightfulmcp.com/ and four steps ending with Click Connect.Claude's Add custom connector dialog with the name Google Analytics and https://google-analytics.insightfulmcp.com/ filled in, ready for Continue.

Approve access. Sign in to InsightfulPipe if asked. A Grant access page then names the app asking, where its access goes, Your accounts and Requested permissions. On the GA4 server, the accounts are your GA4 properties. Click Authorize access, and Claude lists the connector as connected.

Claude's Customize > Connectors page for the InsightfulPipe GA4 server: Google Analytics connected at https://google-analytics.insightfulmcp.com, with Disconnect showing and four GA4 tools under Tool permissions

On Team and Enterprise plans, an Owner first adds the connector under Organization settings > Connectors, and members then connect it from Customize > Connectors.

Step 3: Turn the connector on in a new chat

Claude uses a connector only in chats where you switch it on.

  1. Start a new chat in Claude.
  2. Click + in the lower left and open Connectors.
  3. Switch the GA4 connector on.
A new Claude chat with the + menu open on Connectors and the Google Analytics connector switched on.

Step 4 (optional): Connect GA4 to ChatGPT

ChatGPT takes InsightfulPipe the same two ways: the plugin from ChatGPT Plugins, or the GA4 server URL as a custom MCP server.

  1. Fastest: open InsightfulPipe in ChatGPT Plugins, click Install plugin. When the sign-in opens, sign in to InsightfulPipe if asked, and click Authorize access. It reaches every account your workspace has connected.
  2. Scoped to GA4: in ChatGPT on the web, open Plugins, click Add and choose Add custom MCP server. Enter a Name, paste the server URL under Connection as the Server URL, leave Authentication on OAuth, tick I understand and want to continue and click Create as a plugin. When the sign-in opens, sign in to InsightfulPipe if asked, and click Authorize access.
  3. In a chat, type @ and pick the plugin.

The ChatGPT setup guide has every click. Under Settings > Plugin settings, set the plugin's Permissions to Allow read-only tools, and ChatGPT runs reports freely and asks before every change. A two-minute ChatGPT walkthrough shows a GA4 report end to end.

Step 5 (optional): Claude Code, Gemini CLI, Codex and Cursor

Terminal clients take one command each, then the same InsightfulPipe sign-in and Authorize access step in a browser.

claude mcp add --transport http google-analytics-mcp https://google-analytics.insightfulmcp.com/
gemini mcp add --transport http google-analytics-mcp https://google-analytics.insightfulmcp.com/
codex mcp add google-analytics-mcp --url https://google-analytics.insightfulmcp.com/
  • Claude Code: type /mcp, select google-analytics-mcp and choose Authenticate. Add --scope user to use it in every project.
  • Gemini CLI: run /mcp auth google-analytics-mcp.
  • Codex CLI: run codex mcp login google-analytics-mcp if no browser opens.
  • Cursor: add the entry below to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json for one. Then click Connect, sign in to InsightfulPipe if asked, and click Authorize access.
{ "mcpServers": { "google-analytics-mcp": { "url": "https://google-analytics.insightfulmcp.com/" } } }

Step 6: Choose which actions Claude may run

Every GA4 action on a property has its own switch, and InsightfulPipe's server enforces it in every client.

  1. In InsightfulPipe, open Connected accounts and find the GA4 property.
  2. Click its actions button, such as 50/62 actions. Its tooltip reads Configure actions for this account.
  3. Open the Destructive tab. All 12 start off.
  4. Open the Write tab and switch off any write Claude does not need.
  5. Click Save actions.

The server refuses any action that is off, whichever client asks.

Verify it worked

Three checks, shortest first, show that the connection works and where a failure sits.

The connection is live. In Claude, the + menu lists the GA4 connector under Connectors. In Claude Code, claude mcp list shows google-analytics-mcp as ✔ Connected. If it shows ! Needs authentication, run /mcp and sign in.

A prompt that cannot change anything. Paste this into a new chat.

List the Google Analytics 4 properties available to this connection.
Return the property name, property ID, time zone and currency.
Do not run a report and do not change anything.

Your property names in the answer confirm the sign-in and the workspace mapping.

A real read. Ask for last week's sessions by session default channel group. Then compare one number with the Traffic acquisition report in GA4. A match confirms the property and the dates.

Prompts to run first

Start with reads on a property you know, and try one write on a test property first.

Prompt

What Claude does

"Which channels drove the most sessions and key events last month?"

Runs the traffic sources report

"Which landing pages had the most sessions but the lowest engagement rate?"

Runs the pages report and ranks it

"List the key events and custom dimensions on this property"

Reads the property's configuration

"Create a key event for the generate_lead event"

Creates a key event, on Read & write only

Two prompts worth copying as they are:

Use Google Analytics 4 property [PROPERTY_ID].

Compare the last 28 complete days with the previous 28 complete days.
Break the report down by session default channel group.
Include sessions, engaged sessions, engagement rate, key events and total revenue.
Use Google Analytics 4 property [PROPERTY_ID].

For the last 14 days, list landing pages with more than [NUMBER] sessions.
Show sessions, engagement rate, key events and average engagement time.
Do not change any setting on the property.
Example data: the first GA4 report for an example online store, with sessions, engaged sessions, engagement rate, key events and revenue by channel, each against the previous 28 days.

The prompt library and the Claude skills library are free to use. The measurement skills include a GA4 weekly report you can run on this connection.

Ask GA4 questions with Search Console and Google Ads

Connect Search Console and Google Ads in the same workspace, and Claude can join them with GA4 in one answer. The full InsightfulPipe connector from the Claude Directory reaches all three, or you add each server.

The cross-platform reports guide has more joined prompts.

GA4, Search Console and Google Ads in one Claude chat: Claude asks one question, InsightfulPipe runs each call within the access you approved, and one prompt joins landing pages, key events, clicks and campaign spend.

Why Claude's GA4 numbers can differ from the GA4 interface

Claude's numbers match GA4 when the property, dates, metrics and filters match. Most gaps come from GA4 itself, so check these four things before you act on a number.

  • Processing time. Google says "Data processing can take 24-48 hours", and figures can change during that time. Leave today out of comparisons.
  • Thresholds. GA4 applies data thresholds to protect user identity, so small rows can drop out of a report.
  • The fields Claude picked. Ask Claude to state the dimensions, metrics, filters and date range it used. Then rerun the query by day if a number looks off.
  • Different tools, different counts. Search Console clicks and GA4 sessions never match one to one, because consent banners and ad blockers remove sessions. Compare trends.

What Claude may change in GA4, and who decides

The GA4 server exposes 62 actions: 26 read, 24 write and 12 destructive. Each one is a switch your admin controls, which makes InsightfulPipe the safest way to let an AI agent change GA4.

GA4 has no paused state, so every write lands at once. No GA4 action spends money. What a write changes is how you measure.

  • Control over every single action. The actions modal has All, Read only, Write and Destructive tabs. An owner, admin or operator switches each action on or off, and the server refuses any action that is off.
  • Destructive actions stay off until an admin switches them on. The 12 are delete_property, delete_data_stream, delete_key_event, delete_channel_group, delete_bigquery_link, delete_google_ads_link, delete_measurement_protocol_secret, archive_audience, archive_custom_dimension, archive_custom_metric, update_data_retention_settings and acknowledge_user_data_collection. Shortening retention deletes history, and the acknowledgement has no undo, so both sit in this group.
  • A read-only connection locks every write until an admin reconnects it with Read & write. It holds Google's analytics.readonly scope, so none of the 36 write and destructive actions can go on.
  • Secrets sit behind the write switch. list_accounts and the two Measurement Protocol secret reads count as writes. The first lists every account your Google login administers, and the other two return a credential. A read-only connection never reaches them.
  • Each property is its own boundary. Edits and deletes stay pinned to the property you connected. create_property can add a new property under any account your Google login can edit, so switch it off where nobody should add one.
  • Deleting the property stays off until an admin switches it on. delete_property moves the property to the GA4 trash. Google's API "does not have a method to restore soft-deleted properties", but an administrator can restore one from the Trash Can.
  • Roles hold. Writes need an operator, admin or owner. Members on the User role run only the switched-on read actions, on the properties an owner or admin grants them.
  • Claude adds a switch of its own. Under a connector's Tool permissions, you can set each tool to Always allow, Needs approval or Blocked.
The actions for a connected GA4 property in InsightfulPipe, Destructive tab: all 12 destructive actions off, the default, from acknowledge_user_data_collection to delete_measurement_protocol_secret, each a switch an admin can turn on.

Start a trial, connect GA4 and switch on only the actions Claude needs.

Troubleshooting

Most failures are one of these eight, and six of them come with an exact message.

  • The connector does not appear in the chat. Turn it on from + > Connectors in Claude, or pick the plugin with @ in ChatGPT. In Claude Code, run /mcp.
  • "No accessible accounts" on the Grant access page. Your workspace has no GA4 property you can use yet, so Authorize access stays greyed out. Connect one in Connected accounts, or ask an owner or admin for access, then click Connect again.
  • "We could not list any Google Analytics 4 properties for that Google account." Sign in with the Google account that has GA4 access, and check that the property is GA4, not Universal Analytics.
  • "This action is disabled for this connected account. An owner or admin must enable it for the account." Action control is doing its job. An owner, admin or operator switches the action on under Configure actions for this account.
  • "This account is connected read-only, so this action cannot be enabled for it. An owner or admin must reconnect it with Read & Write permissions." Reconnect the property with Read & write, or keep the work to reads.
  • "Your role does not have permission to execute write actions. Only operators, admins, and owners can execute write operations." Your workspace role is User. Ask an owner or admin to change it, or keep the work to reads.
  • "Authentication failed. The provided bearer token is invalid, expired, or no longer recognized by the server." Remove the connector's saved sign-in in your client and connect again. In Claude Code, run /mcp and authenticate once more.
  • The report is empty. Try a wider date range and remove optional filters. Confirm the property had traffic in that period. An empty report is not always an authentication problem.

Google's own GA4 server and the other routes

Google publishes its own GA4 MCP server, and several hosted connectors read GA4 as well. Each claim below comes from the vendor's own page on 2026-10-21.

Google's official server. Google publishes google-analytics-mcp under Apache-2.0 as "Google Analytics MCP Server (Experimental)", version 0.8.0 from 2026-10-22. It runs on your machine through pipx on Python 3.10 or later. You switch on the Analytics Admin and Data APIs in a Google Cloud project and set up Application Default Credentials with the read-only scope. Google's guide says: "The MCP server is available for read requests only." Version 0.8.0 adds one write tool, create_property_annotation, which registers only with an --allow-write flag and the analytics.edit scope.

Need reports only? Connect InsightfulPipe with Read-only: it asks Google for one Analytics scope, analytics.readonly, and every write stays locked until an admin reconnects it with Read & write.

Hosted connectors that read GA4:

  • Windsor.ai: its GA4 how-to says "Both the Windsor.ai connector and Google's server have read-only access to GA4."
  • Supermetrics: its GA4 page lists write access for Facebook Ads, Google Ads, Microsoft Ads, TikTok Ads and LinkedIn Ads, and not for GA4.
  • Whatagraph: its GA4 article says "Claude's MCP connection is read-only and won't create or edit reports".
  • Markifact: its GA4 page now says "It can change settings, not data", with each change held for approval, while its GA4 tutorial still says "Markifact's GA4 operations are read-only." Checked 2026-11-02.
  • Porter Metrics: its GA4 tutorial lists "Porter's read-only tools".
  • Stape: hosts a copy of Google's server that, per its README, can "query GA4 accounts and run reports, but never modify anything".

A CSV export goes stale after one question. InsightfulPipe runs hosted in claude.ai and ChatGPT, changes GA4 settings such as key events, and puts a switch on every action.

HAVE QUESTIONS?

Frequently asked questions

Yes. With InsightfulPipe, connect the property, add InsightfulPipe from the Claude Directory or paste https://google-analytics.insightfulmcp.com/ as a custom connector, click Connect, sign in to InsightfulPipe if asked, and click Authorize access. Then turn the connector on in a new chat.

Sources (checked 2026-10-21)

Every third-party claim above comes from that vendor's own page, opened on 2026-10-21. InsightfulPipe facts come from the app's code, the GA4 MCP server page and the pricing page.

Related articles

MCP Server for SEO Reporting with Search Console and GA4
Blog

MCP Server for SEO Reporting with Search Console and GA4

InsightfulPipe's hosted MCP server puts Search Console and GA4 data in one Claude or ChatGPT chat for SEO reporting: connect both in InsightfulPipe, add one connector URL and click Authorize access.

Read article
Best Mailchimp MCP Server in 2026: Official and Community Options Compared
Blog

Best Mailchimp MCP Server in 2026: Official and Community Options Compared

The best Mailchimp MCP server in 2026 is InsightfulPipe, a hosted server that gives an AI agent 231 Mailchimp actions, each one switched on or off per account by your admin.

Read article
MCP Server to Analyze Meta Ads Creative Performance with AI
Blog

MCP Server to Analyze Meta Ads Creative Performance with AI

InsightfulPipe's Meta Ads MCP server and two Claude skills from its free skills library rank Meta ad creatives by cost per result and score creative fatigue on live data, from Claude or ChatGPT. Here is the six-step setup, the prompts to run and the Meta fields behind every number.

Read article
Best Google Sheets MCP Server in 2026: 11 Options Compared
Blog

Best Google Sheets MCP Server in 2026: 11 Options Compared

The best Google Sheets MCP server in 2026 is InsightfulPipe, because it reaches only the spreadsheets you pick and lets your admin switch each of its 26 actions on or off.

Read article
Official Google Analytics MCP vs Hosted GA4 MCP Servers
Blog

Official Google Analytics MCP vs Hosted GA4 MCP Servers

The best hosted GA4 MCP server in 2026 is InsightfulPipe, because it changes GA4 and puts a switch on every action.

Read article
Best Shopify MCP Server in 2026: 12 Options Compared
Blog

Best Shopify MCP Server in 2026: 12 Options Compared

The best Shopify MCP server in 2026 is InsightfulPipe, because it lets an AI agent run real store work within limits you set.

Read article

Ready to connect your data?

Join hundreds of agencies and brands using InsightfulPipe to connect marketing data to AI.

Start a trial today.