Claude and MCP

How to Connect Google Analytics to Claude for Local SEO Reporting

Google ships an official, read only Google Analytics MCP server that drops your GA4 data straight into Claude. Here is how to wire it up and what to ask it for local SEO.

A laptop showing a Google Analytics GA4 dashboard next to a Claude chat window answering a question about traffic channels
Ari Kesavan
Ari Kesavan · Local SEO Expert
Updated November 27, 2026 · 9 min read
Key takeaways
  • Google ships an official Google Analytics MCP server, a read only Python package called analytics-mcp that connects GA4 to Claude through the Admin API and Data API.
  • It runs locally in Claude Desktop or Claude Code. You enable two Google Cloud APIs, set Application Default Credentials, and run one command.
  • Once connected, Claude can read sessions, users, channels, landing pages, events, and conversions, plus real time, funnel, and conversions reports.
  • It uses the analytics.readonly scope, so Claude can report your data but can never change a GA4 setting.
  • For local SEO the payoff is seeing which channels drive calls and forms, which landing pages convert, and what moved after you shipped a change.
  • Connecting the data is step one. Someone still has to act on it and rebuild the pages. That is the real work.

Google Analytics tells you what happened after someone found you: how they got to your site, which pages they landed on, and whether they called or filled out the form. For a home service business that is the whole ballgame. The problem is GA4 itself. The interface is a maze of reports and explorations, the useful answer is always three clicks and a date picker away, so most owners open it, feel lost, and close it.

Connecting Google Analytics to Claude fixes that. Instead of hunting through reports, you ask one question in plain English and Claude reads your live GA4 data: sessions, users, channels, landing pages, events, conversions, all of it. And unlike Search Console, Google actually ships an official connector here, so the straightest path is real Google code, not a third party guess.

This guide walks every path with exact steps, explains what the GA4 Data API actually exposes, and then shows the local SEO questions that make the five minute setup worth it. It is a setup guide, not a pitch.

Free tool: see if ChatGPT can read your site before you claim.Run the checker →

How GA4 data reaches Claude at all

Claude connects to outside data through the Model Context Protocol (MCP), Anthropic's open standard. A connector, also called an MCP server, is a small service Claude can call to read a data source. You add it once, then you just ask questions and Claude reads the source directly.

GA4 has two documented APIs that matter here: the Admin API, which lists your accounts and properties, and the Data API, which returns the actual numbers. Google wraps both in an official MCP server, so unlike most sources there is a first party option. The data gets in one of four ways.

  • Google's official MCP server, run locally in Claude Desktop or Claude Code. Real Google code, read only, free. This is the one most people should use.
  • A hosted MCP provider you add as a custom connector in claude.ai. Fastest to live, paste a URL and sign in, no terminal.
  • Zapier MCP, if your business already runs on Zapier and you want GA4 alongside other actions.
  • Your own code on the Data API. Full control, but you need a developer.
If you want the full MCP background first, read our companion guide, the Claude SEO MCP setup guide for local businesses. This post stays focused on Google Analytics.

Path 1: Google's official GA4 MCP server (the one to use)

Google publishes an open source Analytics MCP server as a Python package named analytics-mcp, available on PyPI. It runs on your own machine, it is read only, and it is still marked experimental, which just means Google reserves the right to change it. It calls the Analytics Admin API and Data API directly, so you are not trusting a middleman with your data.

What you set up once in Google Cloud

  • Create or pick a Google Cloud project.
  • Enable the Google Analytics Admin API and the Google Analytics Data API in that project.
  • Set up Application Default Credentials with gcloud, using either an OAuth client or a service account, with the read only scope.
  • Make sure the account you authorize has at least the Viewer role on the GA4 property you want to read.

Add it to Claude Code in one command

In Claude Code, a single command wires it up. You point it at your credentials file and project, and it runs the server through pipx: `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`. In Claude Desktop you add the same command and environment variables to the config file and restart. Then ask Claude for your top channels by sessions for the last 28 days.

To use the official server inside claude.ai rather than a desktop app, you host it over HTTP with OAuth and add it as a custom connector under Settings then Connectors. That is because claude.ai reaches connectors from Anthropic's cloud, not your laptop, so the server has to be publicly reachable. Most people just run it locally in Claude Desktop or Claude Code instead.

Path 2: A hosted provider or Zapier MCP (no terminal)

If a Google Cloud project and a terminal are not your thing, several companies run a hosted GA4 MCP server you add to claude.ai as a custom connector. You paste a URL and sign in with Google, and they handle the API plumbing. It is the fastest way to live, usually read only, and fine if you would rather not touch credentials yourself.

Zapier MCP is the other no code route. If your business already runs on Zapier, you grab your personal MCP URL at zapier.com/mcp, add it to Claude as a custom connector, and GA4 actions ride alongside everything else you automate. Convenient when Analytics is one of several sources you want Claude to touch in the same place. For reporting alone, the official server from Path 1 gives cleaner, deeper access. We cover the wider landscape in our best MCP connectors for local SEO roundup.

What the official server actually exposes

The server gives Claude a set of read only tools split across account discovery and reporting. Knowing these names helps you understand what you can ask for and what you cannot.

ToolWhat it does
get_account_summariesLists your GA4 accounts and properties so Claude knows what it can read
get_property_detailsReturns details about a specific property
get_custom_dimensions_and_metricsShows your custom schema so reports use the right fields
run_reportThe workhorse, pulls sessions, users, channels, landing pages, and events
run_realtime_reportLive activity on the site right now
run_funnel_reportStep by step conversion funnels
run_conversions_reportConversions and key events, with campaign breakdowns

Underneath, run_report is the Data API's core method, so you can slice almost any metric by almost any dimension: sessions and users by channel, source and medium, landing page, device, city or region, and date. Key events are GA4's term for conversions, so a call click, a form submit, or a booking shows up there once you have marked it as a key event. That is the piece that ties traffic to actual leads.

GA4 only knows about conversions you have set up. If your call tracking and form submits are not configured as key events in GA4, Claude cannot report on them. Get those events firing first, then the lead questions below start paying off.

Auth and privacy: it is read only by design

The official server authenticates through Application Default Credentials and requests the analytics.readonly scope, plus cloud-platform for quota handling. Google is explicit that the server is available for read requests only: it cannot create, modify, or delete any Google Analytics configuration or setting. That is exactly what you want for reporting.

  • analytics.readonly lets the tool read all your GA4 data but change nothing. This is the default and the right choice for reporting.
  • The server does ship optional write tools behind an explicit allow write flag and a broader scope. You do not need them to analyze performance, so leave them off.
  • You sign in with Google, grant at least Viewer on the property, and can revoke access from your Google account whenever you want.

Two rules keep this safe. Keep it read only, and only connect servers you trust. Because a connector is code Claude talks to, a malicious server could try to hide instructions meant to steer Claude, so stick with Google's official package or a well known provider and review what you are authorizing. Claude only pulls data when you ask, and only ever sees what the connected Google account already can.

The local SEO payoff: what to actually ask

Getting the pipe connected is the easy part. The value is the questions. For a home service business, GA4 is where you find out whether your traffic turns into calls and forms, and which pages do the converting. These prompts pull real signal.

Which channels drive calls and forms

  • Break down key events by default channel grouping for the last 90 days. Which channel drives the most form submits and call clicks, not just the most traffic?
  • Compare organic search against Google Business Profile or maps referral traffic by conversions. Which one actually sends me leads?
  • Show me channels with lots of sessions but almost no conversions. That is traffic I am paying attention to for no payoff.

Landing page performance

  • Rank my landing pages by sessions and by conversion rate for the last 28 days. Which service pages convert and which just collect visits?
  • Which landing pages get organic traffic but convert below site average? Those are the pages to rewrite first.
  • Show me the landing pages for my city pages and how many calls or forms each one produced.

Before and after a change

  • Compare the 28 days after I republished my HVAC service page against the 28 days before, by sessions, conversion rate, and key events.
  • Did conversions from organic search go up after I shipped the new city pages last month? Break it down by landing page.

That last bucket is the one owners underuse. When you ship a change, a rewritten service page, a new city page, a batch of citations, GA4 is where you see whether it turned into leads, not just visits. Claude turns that into a two line answer instead of a report hunt. Pair it with how to connect Search Console to Claude to tie rankings to those sessions, and with how to get Google Business Profile data into Claude for the map side.

Where GA4 data fits in a full local SEO stack

Analytics is one feed. On its own it tells you traffic and conversions but nothing about where you rank, the map pack, your competitors, or your reviews. The strongest setup connects GA4 alongside those other sources so Claude has the whole picture in one context: rankings, traffic, leads, and competitors together.

We run a free Google Business Profile audit at gbpaudit.ai that collects Analytics, Search Console, map grid rankings, competitors, and reviews on a weekly scan and serves them read only over a single connector. That means Claude can cross reference your GA4 conversions against your actual map rankings without you exporting anything. For a ready made set of prompts and workflows, grab our free local SEO skill pack for Claude, and browse our other free tools while you are at it.

The honest limit: data is not the work

Connecting Google Analytics to Claude removes the report hunting and gives you a fast, patient analyst. What it does not do is fix anything. Claude will tell you that your water heater page pulls organic traffic but converts at half your site average. It will not go rewrite that page, fix the weak call to action, or build the city page you are missing. That is the job, and it is the same job every week.

That is where we come in. We do local SEO and AI SEO for home service businesses, with focused programs for HVAC and dental practices. See what that looks like in our case studies, check pricing, or just contact us and we will wire the data up and then actually move the numbers.

Sources

  1. Try the Google Analytics MCP server - Google for Developers
  2. googleanalytics/google-analytics-mcp - GitHub
  3. analytics-mcp - PyPI
  4. Connect GA4 to Claude with Google's MCP server - Trackingplan
  5. Get started with custom connectors using remote MCP - Claude Support
  6. Google Analytics MCP: How to Connect GA4 and Cross-Channel Data to Claude - Whatagraph
  7. Google Analytics MCP Server: GA4 in Claude, ChatGPT and Gemini - Windsor.ai

Frequently asked questions

Is there an official Google Analytics connector for Claude?

Yes. Google publishes an official, open source Google Analytics MCP server. It is a Python package called analytics-mcp that you run on your own machine, and it is read only. It is still marked experimental, but it is real Google code calling the Analytics Admin API and Data API. Community servers and Zapier MCP exist too, but the official one is the straightest line.

What GA4 data can Claude read once it is connected?

Through the Data API the server can pull sessions, users, new users, engagement, channels and sources, landing pages, events, and key events or conversions, broken down by date, device, geography, and more. It also covers real time reports, funnel reports, and a conversions report. It cannot see anything GA4 does not already show you.

Do I need to be a developer to set this up?

For the official local server, you need a little comfort with a terminal. You enable two APIs in a Google Cloud project, set up Application Default Credentials, and run one command in Claude Code or add a block to Claude Desktop's config. It is a known recipe, not custom coding. If you want zero setup, a hosted MCP provider or Zapier MCP is the paste a URL route.

Is it read only and is my data safe?

The official server is read only by design. It uses the analytics.readonly scope, so it can report your data but cannot create, change, or delete any GA4 setting. You sign in with Google through Application Default Credentials and can revoke access anytime. Only connect servers run by people you trust, because a connector is code Claude talks to.

Which Claude plan and app do I need?

The official server runs locally, so it works in Claude Desktop and Claude Code on any plan. If you host it over HTTP with OAuth, you can add it to claude.ai as a custom connector, which works on Free, Pro, Max, Team, and Enterprise, with Free capped at one custom connector and Team or Enterprise needing owner approval first.

How is this better than just opening GA4?

The GA4 interface buries the answer under reports, filters, and date pickers. With Claude on the Data API you ask one plain English question and it pulls sessions, channels, landing pages, and conversions together, compares two date ranges, and tells you which channel actually drives calls and forms. It turns a reporting chore into a two line answer.

Ari Kesavan
About the author
Ari Kesavan
Founder, Local SEO Guy

Ari Kesavan has run Local SEO Guy for eight years, working only with local home service businesses that live or die by the phone ringing. He spends his own money every month testing what actually moves Google rankings, then puts what works into client accounts.