Google Analytics MCP
Provides tools for interacting with Google Analytics (GA4), enabling queries such as running reports, accessing account summaries, property details, custom dimensions, and more, scoped to the authenticated user's permissions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Analytics MCPShow me page views and users for the last 30 days."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Analytics MCP (shared, per-user OAuth)
A GCP-hosted MCP server for Google Analytics (GA4) where each user logs in with their own Google account and queries are scoped to that user's GA permissions — no shared service-account, no server-held keys, no ACL table.
It re-hosts the official analytics-mcp
tools under FastMCP so we get
streamable-HTTP + Google OAuth — the same pattern as the official Google Ads MCP
and the sibling Naver Search Ads MCP.
How it works
Claude (each teammate) ──streamable-HTTP + Google OAuth (analytics.readonly)──▶
FastMCP server (Cloud Run)
├ GoogleProvider : brokers Google login, forwards the user's Google token
├ credential shim : each request → Credentials(token=<user's Google token>)
└ analytics-mcp : 9 GA tools, now running as the calling user
└─▶ GA Admin/Data API (returns only what that user may see)The one swap that makes it per-user: analytics_mcp.tools.client._get_credentials
is replaced (in server.py) with a resolver that reads the current request's
Google token via fastmcp.server.dependencies.get_access_token(). When there is
no authenticated request (local stdio), it falls back to Application Default
Credentials.
Related MCP server: Google MCP Server
Tools (all read-only)
get_account_summaries, get_property_details, list_google_ads_links,
list_property_annotations, get_custom_dimensions_and_metrics, run_report,
run_realtime_report, run_funnel_report, run_conversions_report.
Local dev (stdio, ADC)
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e .
# Uses your gcloud ADC. GA_MCP_TRANSPORT defaults to stdio, no OAuth.
GA_MCP_TRANSPORT=stdio .venv/bin/google-analytics-mcpHosted (Cloud Run, per-user OAuth)
See DEPLOY.md. In short: create an Internal OAuth Web client
(with the analytics.readonly scope on the consent screen), store the secret in
Secret Manager, then run deploy/deploy.sh.
Environment
Var | Purpose |
|
|
| Google OAuth Web client. Presence activates OAuth. |
| Cloud Run HTTPS URL (OAuth redirect base; callback |
| Workspace domain hint (e.g. |
| Stable key so issued tokens survive redeploys. |
| Enables Firestore OAuth-state persistence. |
| Firestore location for OAuth state. |
Connect (teammates)
claude mcp add --transport http google-analytics <PUBLIC_BASE_URL>/mcp
# first use opens the browser for Google loginCredits
The 9 GA tools come from Google's official analytics-mcp (Apache-2.0). This project imports them and overrides only the credential resolver so each request runs as the calling user.
OAuth + streamable-HTTP transport are provided by FastMCP (Apache-2.0).
See NOTICE for attribution details.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server for Google Tag Manager and GA4, enabling tag management, consent auditing, workspace versioning, and analytics reporting through natural language.Last updated18642MIT
- Alicense-qualityDmaintenanceA unified MCP server that gives AI assistants direct access to Google Analytics 4, Google Search Console, Google Ads and Google Merchant Center data using OAuth2 user credentials.Last updatedMIT
- Alicense-qualityDmaintenanceMCP server for secure BigQuery access across multiple Google Cloud projects, enabling querying, schema exploration, and data analysis with SQL validation and read-only controls.Last updated2MIT
- Flicense-qualityDmaintenanceExposes a semantic layer on GA4 event data in BigQuery via an MCP server for consistent querying.Last updated3
Related MCP Connectors
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PlatAid/google-analytics-mcp-oauth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server