Digital Marketing Consultant

14+ years helping businesses in US, UK, Canada, Australia, UAE & India grow through SEO and AI-powered marketing.

Information

Book a Free Call

Google Analytics MCP: Connect GA4, Search Console and Bing to Claude

SEO Tips Kulbhushan Pareek 8 min read Updated 9 views 0 comments

In short: Google's official Analytics MCP server lets Claude read your GA4 data with a read-only login. On its own it only answers "what happened." Pair it with Search Console and Bing and Claude can answer the question that matters: which page should I fix this week, and why? Setup takes about 15 minutes. Here is the exact path, plus the one mistake that exposes every client in your account.

Most guides stop at "Claude can now see your traffic."

That is the easy part.

I run this setup on my own site every Monday (a scheduled job pulls the data; I review it). Claude reads GA4, Search Console and Bing together, flags pages that lost clicks, and lists the queries sitting at positions 8 to 20. I approve every edit before anything goes live.

In October, Bing sent this site 27 clicks, up from 5 in September. That came from a single habit: checking Bing alongside Google.

This guide shows you the setup, the three prompts I use, and the safety rules.

What is the Google Analytics MCP server?

MCP (Model Context Protocol) is the standard that lets an AI assistant call tools on your computer. Google's analytics-mcp server wraps the Google Analytics Admin and Data APIs, so Claude can run GA4 reports without you opening the dashboard.

I installed version 1.1.0 (released 6 November 2026) and listed what it exposes. By default it has ten tools:

  • Account and property: account summaries, property details, Google Ads links, annotations, key events
  • Reports: standard report, realtime report, funnel report, conversions report
  • Schema: custom dimensions and metrics

Out of the box it is read-only. Three more tools (create an annotation, a custom dimension or a key event) only appear if you start the server with the --allow-write flag and give the login the edit scope. Leave that flag off for reporting.

It runs on your machine. That means claude.ai in the browser cannot reach it, but Claude Code and Claude Desktop can.

The 3-Source Check

GA4 tells you what visitors did. It does not tell you why they arrived or what to change. So I use three sources and one question each:

Source Question it answers
GA4 Which pages get engaged visitors, and which channel brought them?
Search Console Which queries and pages are slipping, and which sit just off page one?
Bing Webmaster Are we visible where ChatGPT-style search gets its index?

Any page that falls in two of the three gets fixed first.

Step 1: Create a read-only login

  1. In Google Cloud, create a project and enable the Google Analytics Admin API and Google Analytics Data API.
  2. Create a service account and download its JSON key.
  3. In GA4, add the service account's email as Viewer on one property.

Do this part carefully. When I called get_account_summaries, it listed every account and property the login could see. Use a personal agency login and Claude sees every client. A service account with Viewer on a single property shows only that site.

Step 2: Install and register it

You need Python 3.10 or newer and pipx. Then, in your terminal:

claude mcp add analytics-mcp --scope user \
  -e GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\key.json" \
  -e GOOGLE_CLOUD_PROJECT="your-project-id" \
  -- pipx run analytics-mcp

Use an absolute path for the key. Many MCP hosts do not expand ~.

Run claude mcp list and confirm analytics-mcp shows as connected.

If you see 403 ACCESS_NOT_CONFIGURED, the project is missing or the APIs are not enabled on it.

Step 3: Add Search Console

Google does not ship a Search Console server in this repo. Follow my step-by-step guide to connect Search Console to Claude, which uses the same service-account approach.

Step 4: Add Bing

Bing Webmaster Tools has a free API key (Settings, then API access). A short script can pull query stats, page stats and crawl stats, and Claude reads the output. Two Bing reports are not in the API, so open them by hand:

  • AI Performance (public preview since February 2026): how often Copilot and partners cited your pages, plus the grounding queries. It shows no click data and does not include ChatGPT.
  • Topics Portfolio (beta, added 13 October 2026).

Bing's index also matters beyond Bing. See why ChatGPT search depends on Bing's index.

The three prompts I actually use

1. Weekly drop finder "Using GA4 and Search Console, compare the last 28 days with the 28 days before. List the 5 pages that lost the most clicks, with position change and engaged sessions. Do not suggest edits yet."

2. Striking distance "From Search Console, list queries at positions 8 to 20 with more than 100 impressions. Group by page. For each page, say what the title and first paragraph would need to answer."

3. Bot filter "In GA4, show Direct sessions by country with engaged-session counts. Flag any country with more than 50 sessions and fewer than 2% engaged."

That third one saved me from a wrong conclusion. About 130 of my 673 recent sessions were Singapore Direct visits with one engaged session between them. Without the filter, my traffic looked 20% better than it really was.

What else you can ask it

The server's ten read tools map to a short list of questions. These are the ones I find useful for SEO work:

  • Channel quality (run_report): "Which channels brought engaged sessions in the last 28 days? Show sessions, engaged sessions and key events per channel."
  • Landing pages (run_report): "Top 15 landing pages from Organic Search by engaged sessions. Flag any with an engagement rate under 30%."
  • Conversions (run_conversions_report): "Which pages and channels preceded a form submit or a booking this month?"
  • Funnel (run_funnel_report): "Of visitors who reach the pricing page, how many reach the booking page?"
  • Live check after a release (run_realtime_report): "Are visitors arriving on the page I just published? Show active users by page."
  • Tracking audit (get_custom_dimensions_and_metrics): "Which custom dimensions exist on this property, and which of them look unused?"

One habit that saves you from wrong answers: end every prompt with "State the metrics, dimensions and date range you used." Claude picks the metrics itself, and a different choice (sessions versus engaged sessions, for example) can change the story.

Claude Desktop instead of Claude Code

Claude Desktop uses a JSON config file instead of the claude mcp add command. The server command and the two environment variables are the same:

{
  "mcpServers": {
    "analytics-mcp": {
      "command": "pipx",
      "args": ["run", "analytics-mcp"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "C:\\path\\to\\key.json",
        "GOOGLE_CLOUD_PROJECT": "your-project-id"
      }
    }
  }
}

Restart the app after saving, then ask "What can the analytics-mcp server do?" to confirm it loaded.

Troubleshooting

What you see Likely cause Fix
403 ACCESS_NOT_CONFIGURED The Google Cloud project has no GA APIs enabled, or user credentials have no quota project Enable the Admin and Data APIs, and set GOOGLE_CLOUD_PROJECT
"Insufficient authentication scopes" Credentials were created without the Analytics read scope Log in again with the analytics.readonly scope, or use a service account
Server shows as failed in claude mcp list Python older than 3.10, or pipx missing Check python --version, install pipx
Key file not found A relative path or ~ in the path Use a full absolute path
Works for one property, not another The login is Viewer on one property only Add Viewer on the second property
Credentials stopped working User credentials expired Log in again, or switch to a service account

What it cannot do

  • It runs on your computer, so claude.ai in the browser and the mobile app cannot use it.
  • It cannot show Search Console or Bing data. That needs the separate connections in Steps 3 and 4.
  • In the default mode it cannot change anything in GA4. That is a feature.
  • It does not decide for you. It will report that a page lost engaged sessions; it will not know whether you changed the page or Google changed the results.

GA4 MCP, the GA4 screen or Looker Studio?

Use When it is the right tool
GA4 MCP with Claude One-off questions in plain English, comparing sources, drafting what to do next
The GA4 interface Setting up events, audiences and key events; exploring visually
A Looker Studio dashboard A fixed report for a client or team that must look the same every month

I use all three. The MCP is for the questions I did not plan for.

Safety rules

  • Keep it read-only. Do not enable write tools on a client property.
  • One service account, one property.
  • Claude proposes edits; a human approves them. Nothing publishes itself.
  • Rotate the key if a laptop is lost.

Kulbhushan's Take

I do not trust any dashboard that cannot disagree with me. The reason I join GA4, Search Console and Bing is that a page which looks healthy in one source usually looks different in another. The setup is the easy 15 minutes; the discipline of acting on only the pages that fall in two sources is what grows traffic.

Frequently Asked Questions

Is the Google Analytics MCP server free?

The server is open source (Apache-2.0). GA4 API usage is free within Google's quotas.

Can it change my GA4 settings?

Not by default. Three optional write tools (annotations, custom dimensions, key events) need the --allow-write flag and the analytics.edit scope.

Does it work with the Claude mobile app or claude.ai?

No. It runs locally, so use Claude Code or Claude Desktop.

Does it include Search Console data?

No. Search Console needs a separate connection (see Step 3).

Is it safe for agency accounts?

Only if you use a single-property service account. Otherwise it can list every client property the login can see.

Frequently Asked Questions

The server is open source (Apache-2.0). GA4 API usage is free within Google's quotas.

Not by default. Three optional write tools (annotations, custom dimensions, key events) need the `--allow-write` flag and the `analytics.edit` scope.

No. It runs locally, so use Claude Code or Claude Desktop.

No. Search Console needs a separate connection (see Step 3).

Only if you use a single-property service account. Otherwise it can list every client property the login can see.
Tags: google analytics mcp ga4 mcp claude google analytics analytics-mcp search console bing webmaster tools claude code
Share this article:
Weekly Newsletter

Get SEO + AI marketing insights in your inbox

One email every Sunday. Latest SEO tactics that work in 2026, AI search updates, and the occasional client case study. No spam, unsubscribe anytime.

We'll send a confirmation email. Your address is never shared or sold.
Kulbhushan Pareek
Written by

Kulbhushan Pareek

Digital Marketing Consultant

14+ years · $584K verified organic revenue · 482% traffic growth · cited by Claude, ChatGPT and Perplexity

Kulbhushan Pareek is a digital marketing consultant with 14+ years of experience helping businesses in the US, UK, France, and Switzerland grow their organic presence. He specializes in technical SEO, AI-powered marketing strategies, online reputation management, and GEO/AEO optimization for AI search visibility.

View full profile

Leave a Comment

Your email address will not be published. Comments are moderated before appearing.