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 know | Detail |
|---|---|
| What it costs | 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. |
| Sign-in | OAuth 2.0 or API key |
| Rate limits | Data 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 SDKs | Java, PHP, Python, Node.js, .NET, Ruby, Go |
| Docs | API 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 know | Detail |
|---|---|
| Who makes it | Official, run by |
| Where it runs | Runs on your computer |
| Address or package | analytics-mcp |
| Sign-in | Application Default Credentials (ADC) with OAuth 2.0 |
| Works with |
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.
| Tool | What it does | Access |
|---|---|---|
get_account_summaries | List Analytics accounts and properties available to the signed-in user. | Read only |
get_property_details | Get the configuration for one Analytics property. | Read only |
list_google_ads_links | List | Read only |
list_property_annotations | List annotations configured for a property. | Read only |
create_property_annotation | Create an annotation for a property when writes are explicitly enabled. | Changes data |
list_key_events | List the key events defined for a property. | Read only |
create_custom_dimension | Create a custom dimension when writes are explicitly enabled. | Changes data |
create_key_event | Mark an event as a key event when writes are explicitly enabled. | Changes data |
get_custom_dimensions_and_metrics | Retrieve custom dimensions and metrics for a property. | Read only |
run_report | Run a standard Analytics report. | Read only |
run_realtime_report | Run a realtime Analytics report. | Read only |
run_funnel_report | Run a funnel exploration report. | Read only |
run_conversions_report | Run 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
- Enable the
Google Analytics Admin API and Data API in a Google Cloud project. - Grant the user or service account Viewer access to the Analytics property.
- Create Application Default Credentials with the analytics.readonly scope.
- Add analytics-mcp to claude_desktop_config.json with pipx run analytics-mcp and the credentials path and project ID environment variables.
Claude Code
- Enable the
Google Analytics Admin API and Data API in a Google Cloud project. - Create Application Default Credentials with the analytics.readonly scope.
- Run one claude mcp add analytics-mcp command with the credentials path and project ID environment options, followed by -- pipx run analytics-mcp.
Cursor
- Enable the
Google Analytics Admin API and Data API in a Google Cloud project. - Create Application Default Credentials with the analytics.readonly scope.
- 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.