
Google Analytics 4
Wraps both the GA4 Admin and Data APIs so you can spin up properties, configure web data streams, pull tracking snippets, and run dimension/metric reports without leaving Claude. The setup uses a GCP service account with JSON key auth, sidestepping the usual OAuth dance. You get 23 tools covering the full lifecycle: create properties and streams, mark events as conversions, define custom dimensions, link Google Ads accounts, and query historical or real-time data. Reach for this when you're provisioning analytics infrastructure or need to pull session breakdowns by country, device, or custom parameters directly in a conversation.
- tools
- 23
- transport
- STDIO
- env vars
- 2
- last updated
- Mar 1, 2026
Tools
23 toolsPublic tool metadata for what this MCP can expose to an agent.
check_auth_statusVerify service account is configured and valid
Verify service account is configured and valid
No parameter schema in public metadata yet.
list_accountsList accessible GA4 accounts
List accessible GA4 accounts
No parameter schema in public metadata yet.
list_propertiesList properties for an account
List properties for an account
No parameter schema in public metadata yet.
create_propertyCreate a GA4 property
Create a GA4 property
No parameter schema in public metadata yet.
get_propertyGet property details
Get property details
No parameter schema in public metadata yet.
delete_propertySoft-delete a property
Soft-delete a property
No parameter schema in public metadata yet.
list_data_streamsList data streams
List data streams
No parameter schema in public metadata yet.
create_web_data_streamCreate web stream → get Measurement ID
Create web stream → get Measurement ID
No parameter schema in public metadata yet.
delete_data_streamDelete a data stream
Delete a data stream
No parameter schema in public metadata yet.
get_tracking_snippetGenerate gtag.js HTML snippet
Generate gtag.js HTML snippet
No parameter schema in public metadata yet.
list_key_eventsList conversion events
List conversion events
No parameter schema in public metadata yet.
create_key_eventMark event as conversion
Mark event as conversion
No parameter schema in public metadata yet.
delete_key_eventRemove conversion
Remove conversion
No parameter schema in public metadata yet.
list_custom_dimensionsList custom dimensions
List custom dimensions
No parameter schema in public metadata yet.
create_custom_dimensionCreate custom dimension
Create custom dimension
No parameter schema in public metadata yet.
list_custom_metricsList custom metrics
List custom metrics
No parameter schema in public metadata yet.
create_custom_metricCreate custom metric
Create custom metric
No parameter schema in public metadata yet.
list_google_ads_linksList Google Ads links
List Google Ads links
No parameter schema in public metadata yet.
create_google_ads_linkLink Google Ads account
Link Google Ads account
No parameter schema in public metadata yet.
get_measurement_protocol_secretGet/create Measurement Protocol secret
Get/create Measurement Protocol secret
No parameter schema in public metadata yet.
run_reportRun report with dimensions, metrics, dates, filters
Run report with dimensions, metrics, dates, filters
No parameter schema in public metadata yet.
run_realtime_reportReal-time active users and events
Real-time active users and events
No parameter schema in public metadata yet.
get_metadataList available dimensions and metrics
List available dimensions and metrics
No parameter schema in public metadata yet.
Sponsors
Configuration
GA_CREDENTIALSGoogle Service Account JSON key content (copy-paste the entire JSON)
GA_CREDENTIALS_PATHdefault: ~/.google-analytics-mcp/credentials.jsonAlternative: path to the Service Account JSON key file
Readme
Google Analytics 4 MCP Server
MCP server for Google Analytics 4 — create properties, configure data streams, manage conversions, and run reports via the Admin & Data APIs.
Setup (one-time, ~3 minutes)
-
Google Cloud Console → IAM & Admin → Service Accounts
- Create a service account (any name)
- Click it → Keys → Add Key → JSON → Download
-
Enable APIs in your GCP project:
-
GA4 Admin → Property Access Management → Add the service account email (from the JSON) as Editor
-
Configure credentials (pick one):
- Option A (recommended): Copy the JSON content into the
GA_CREDENTIALSenv var in your MCP config - Option B: Save the file to
~/.google-analytics-4-mcp/credentials.json
- Option A (recommended): Copy the JSON content into the
Done. No browser flow, no consent screen, no tokens to refresh.
Installation
Claude Code
Details
- Repository
- github.com/stucchi/mcp-google-analytics
- Categories
- Monitoring & Observability, Data & Analytics
- Package
google-analytics-4-mcp- Transport
- STDIO
- Registry
- MCP registry, active