Key Takeaways

  • Google Analytics 4 API access: Yes.
  • Google Analytics 4 MCP server: Official, local, Application Default Credentials (ADC) with OAuth 2.0.
  • Google Analytics 4 pricing and limits: Data API only: property tokens per request, usually 10 or fewer; each standard property has separate 200,000-token daily allowances for Core, Realtime, and Funnel requests.
  • Google Analytics 4 connects with Claude, Claude Code, Cursor.

You want an AI agent or your own code to query and administer Google Analytics 4. Google documents Data and Admin APIs plus an official local MCP package; its Data API, not its Admin API, has published property-token quotas and no published per-call dollar price.

For full seat pricing, plan limits and team workflows beyond developer endpoints, read our Google Analytics 4 review or compare category peers in Analytics & Reporting tools with an API.

What does the Google Analytics 4 API include?

Google Analytics 4 provides API access using OAuth 2.0 or API key.

What you need to knowDetail
What it costsData API only: property tokens per request, usually 10 or fewer; each standard property has separate 200,000-token daily allowances for Core, Realtime, and Funnel requests.
Sign-inOAuth 2.0 or API key
Rate limitsData API only, for each of the Core, Realtime, and Funnel categories on standard properties: 200,000 tokens per property per day, 40,000 per property per hour, 14,000 per project per property per hour, 10 concurrent requests per property, and 10 server errors per project per property per hour. Analytics 360 has higher limits.
Official SDKsJava, PHP, Python, Node.js, .NET, Ruby, Go
DocsAPI documentation

What you can do with it

  • Run standard, realtime, and funnel reports
  • Check report dimension and metric compatibility
  • Create and retrieve audience exports
  • Manage Analytics accounts, properties, and data streams

Sources:Google Analytics Data API referenceData API limits and quotasGoogle Analytics API quickstartGoogle Analytics Admin API overview

How does the Google Analytics 4 MCP server work?

Google Analytics 4 supports an official local MCP server authenticated with Application Default Credentials (ADC) with OAuth 2.0.

What you need to knowDetail
Who makes itOfficial, run by Google Analytics 4
Where it runsRuns on your computer
Address or packageanalytics-mcp
Sign-inApplication Default Credentials (ADC) with OAuth 2.0
Works withClaudeClaude CodeCursor

Before you connect it

  • Google's developer guide documents a default read-only setup using the analytics.readonly scope and read-only tools.
  • The official repository also documents optional create_property_annotation, create_custom_dimension, and create_key_event tools when --allow-write and the analytics.edit scope are used; the latter two also require specified property roles.
  • Give the authenticating user or service account at least Viewer access to each target property, and store its ADC or service-account JSON file outside the client configuration by absolute path.

See how sibling tools handle programmatic connections in MCP servers for analytics & reporting tools and step-by-step Google Analytics 4 tutorials.

Sources:Try the Google Analytics MCP serverGoogle Analytics MCP repository

Which MCP tools does Google Analytics 4 expose?

The Google Analytics 4 MCP server exposes 13 documented MCP tools for connected AI clients.

ToolWhat it doesAccess
get_account_summariesList Analytics accounts and properties available to the signed-in user.Read only
get_property_detailsGet the configuration for one Analytics property.Read only
list_google_ads_linksList Google Ads account links for a property.Read only
list_property_annotationsList annotations configured for a property.Read only
create_property_annotationCreate an annotation for a property when writes are explicitly enabled.Changes data
list_key_eventsList the key events defined for a property.Read only
create_custom_dimensionCreate a custom dimension when writes are explicitly enabled.Changes data
create_key_eventMark an event as a key event when writes are explicitly enabled.Changes data
get_custom_dimensions_and_metricsRetrieve custom dimensions and metrics for a property.Read only
run_reportRun a standard Analytics report.Read only
run_realtime_reportRun a realtime Analytics report.Read only
run_funnel_reportRun a funnel exploration report.Read only
run_conversions_reportRun a conversions performance report.Read only

How do you connect Google Analytics 4 to your AI app?

Google Analytics 4 documents direct connection steps for Claude, Claude Code, Cursor.

Claude

  1. Enable the Google Analytics Admin API and Data API in a Google Cloud project.
  2. Grant the user or service account Viewer access to the Analytics property.
  3. Create Application Default Credentials with the analytics.readonly scope.
  4. Add analytics-mcp to claude_desktop_config.json with pipx run analytics-mcp and the credentials path and project ID environment variables.

Claude Code

  1. Enable the Google Analytics Admin API and Data API in a Google Cloud project.
  2. Create Application Default Credentials with the analytics.readonly scope.
  3. Run one claude mcp add analytics-mcp command with the credentials path and project ID environment options, followed by -- pipx run analytics-mcp.

Cursor

  1. Enable the Google Analytics Admin API and Data API in a Google Cloud project.
  2. Create Application Default Credentials with the analytics.readonly scope.
  3. Add google-analytics-mcp to .cursor/mcp.json with uvx, the analytics-mcp package, and the credentials path and project ID environment variables.

How did we check Google Analytics 4 API and MCP access?

Google Analytics 4 verification summary: Every fact comes from the vendor's own pricing, documentation and help pages, read on the date shown. Last checked 27 Nov 2026 following how we check figures and our AI agent readiness study.

Sources:Google Analytics Data API referenceData API limits and quotasGoogle Analytics API quickstartGoogle Analytics Admin API overviewTry the Google Analytics MCP serverGoogle Analytics MCP repository

What are common questions about Google Analytics 4 API and MCP?

Can a team query GA4 data through an API?

Yes. The Data API runs standard, realtime, and funnel reports, while the Admin API manages Analytics configuration. Google publishes property-token quotas for the Data API, not the Admin API, and does not state a per-call dollar price.

Is there an official Google Analytics MCP server?

Yes. Google documents the local analytics-mcp package and setup for Claude, Claude Code, and Cursor. It uses Application Default Credentials with the read-only Analytics OAuth scope.

Can the documented MCP server change GA4 settings?

The developer guide documents a read-only default setup. The official repository also lists three optional write tools that require --allow-write and the analytics.edit scope; creating custom dimensions and key events also requires the documented property roles.