Google Analytics MCP Server

The experimental official Google Analytics 4 MCP server: reports, funnels and realtime data on request

MCP serverMedium risk

googleanalytics/google-analytics-mcp

Install

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

Set up ADC first with gcloud auth application-default login

This is third-party code. Review the repository files before installing.

What it does

The server runs locally and calls the Google Analytics Admin API and Data API with read-only scope. The agent lists accounts and properties, reads property details and linked Google Ads accounts. It runs standard, funnel and realtime reports and reads custom dimensions and metrics. You can ask about traffic and events in plain language instead of building reports by hand.

Who it is for. For marketers, analysts and product managers who track site data in GA4.

Good fit when

  • You need a quick answer about traffic or events without building a report
  • You need to check property configuration and custom dimensions
  • You want a funnel or realtime view

Not a fit when

  • Your site analytics runs on Yandex Metrica
  • You need to change GA4 settings; the server is read-only

Example request

What were the most popular events in my GA4 property over the last 180 days?

Limitations

The project is marked experimental. It needs a Google Cloud project with the Analytics APIs enabled, Application Default Credentials and pipx. Google Cloud access from Russia is restricted, so VPN-free use is not guaranteed.

How to disable. Run claude mcp remove analytics-mcp or delete the analytics-mcp block from ~/.gemini/settings.json.

MCP

Transport
stdio
Authentication
OAuth
Environment variables
Environment variables
GOOGLE_APPLICATION_CREDENTIALS
required, secret
Path to the ADC credentials JSON
GOOGLE_PROJECT_ID
Google Cloud project ID

Security check

  • Reads analytics data using Google credentials
  • Stores a path to a credentials file

README in short

The README lists the server tools in groups: account info, core reports and realtime reports. Setup has three steps: pipx, enabling APIs and ADC credentials via gcloud, then wiring it into Gemini CLI or Claude Code. Sample prompts and a video walkthrough link are included. Apache-2.0 licensed.

FAQ

Can the agent change anything in Analytics?

No, credentials use a read-only scope and the tools only read data and configuration.

Which APIs must be enabled?

The Google Analytics Admin API and Data API in your Google Cloud project.

A Claude Code plugin for SEO audits: technical SEO, E-E-A-T, schema, local and AI search via parallel subagents

PluginHigh risk16.9K

A Claude Code skill set for auditing sites for AI search: citability, AI crawler access, llms.txt, schema and reports

SkillMedium risk10.6K

Google Search Console MCP

Google Search Console MCP Server for SEOs

An MCP server for Google Search Console: queries and pages with clicks and positions, URL indexing checks, sitemaps and ready SEO skills

MCP serverMedium risk1.5K

SEO audits for sites, articles and GitHub repos: topic sub-skills, evidence-collecting scripts and a fix plan

SkillMedium risk907