Guide · MCP

Google Analytics MCP: how to set up Google's server, and what it costs you

We installed Google's official GA4 server and measured what it does before you ask it anything.

The short answer

Google's official Google Analytics MCP server is free, read-only and works well in apps that run on your computer, such as Claude Desktop, Claude Code and Cursor. Plan on about five steps first: Python, a Google Cloud project with two APIs turned on, the Google Cloud command line tool, a sign-in with the right scopes, and a config file with absolute paths.

It does not work in claude.ai or ChatGPT on the web unless you host it yourself. And its 10 tools add about 57.9 KB of instructions to every conversation, roughly 14,000 tokens, before your first question.

How much each tool adds to the conversationSize of each tool's definition, which an AI app reads before your first question. Version 1.1.0, read-only mode.
run_realtime_report15.8 KB
run_conversions_report14.9 KB
run_report14.8 KB
run_funnel_report8.8 KB
list_property_annotations0.8 KB
list_key_events0.8 KB
get_custom_dimensions_and_metrics0.6 KB
list_google_ads_links0.6 KB
get_property_details0.6 KB
get_account_summaries0.3 KB
See the numbers
ToolBytes
run_realtime_report15,769
run_conversions_report14,884
run_report14,764
run_funnel_report8,817
list_property_annotations835
list_key_events775
get_custom_dimensions_and_metrics598
list_google_ads_links583
get_property_details550
get_account_summaries273
All 10 tools57,868

Data: Harvv test, Nov 11, 2026

The four report tools make up 94% of that, because each one carries Google's full guide to dimensions, metrics and filters. That is what lets the AI write a correct report. Some apps load tool definitions only when they need them, so the cost depends on the app you use.

How do you set up the Google Analytics MCP?

These are Google's steps from its developer guide and the GitHub README, in the order you'll need them.

  1. Install Python 3.10 or newer, and pipx. The server is a Python package called analytics-mcp. In our test it installed in about 17 seconds and started in about 2.
  2. Turn on two APIs in a Google Cloud project. The Google Analytics Admin API and the Google Analytics Data API. If you've never used Google Cloud, this is where you create a project. gcloud services enable analyticsadmin.googleapis.com analyticsdata.googleapis.com --project=YOUR_PROJECT_ID
  3. Sign in with the read-only scope. This needs the Google Cloud command line tool (gcloud). The README also passes your own OAuth client file, which you create in the same Cloud project. 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 Copy the credentials path it prints.
  4. Check your GA4 access. The Google account you signed in with needs at least Viewer on the property.
  5. Add it to your AI app. For Claude Code: claude mcp add analytics-mcp --scope user -e GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON -e GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID -- pipx run analytics-mcp In desktop apps, write full paths. Many apps don't expand ~ or $HOME in their config files.

What went wrong in our test

We started the server on a computer with no Google sign-in. It started normally, listed all 10 tools, and looked connected. The failure came only when the AI asked its first question: "Your default credentials were not found."

So "connected" in your AI app doesn't mean it works. Ask one simple question, like "list my Google Analytics properties", right after setup. If you get a 403 error instead, Google's checklist names three usual causes: an API not turned on, a missing scope at sign-in, or no Viewer role on the property.

What are its limits?

When a hosted connector is easier

Google's server is the right pick if you want any GA4 report, you use Claude Desktop, Claude Code or Cursor, and you're comfortable in Google Cloud.

Harvv's connector at harvv.com/mcp is the other path. You connect GA4 once with a Google sign-in (read-only), and it works in claude.ai, ChatGPT and the desktop apps. Harvv copies a fixed set of GA4 reports each day (events and key events, sessions and revenue by source and campaign, landing pages) and puts them next to what its own script saw on the page, so the AI can answer "why did this page stop converting", not only "how many". It does not run any report you can think of; for that, use Google's.

The same choice comes up for Search Console, Google Ads and Meta Ads. Our guide to SEO and marketing MCP servers lists the official server for each and how hard each one is to set up.

How we tested this

Ask about GA4 and your pages in one place.

Harvv connects GA4, Search Console and your ad accounts, and its script records 72 event types across 10 categories with zero personal data. Free for 3 sites, no card.