The Google Analytics MCP server connects Google Analytics 4 data to AI agents and workflows, providing analysis-ready access to website traffic, user behavior, and performance metrics through tools like live schema discovery, server-side aggregation, and safe defaults that minimize data processing overhead. It enables agents to query GA4 properties directly via the Google Analytics Data API using a service account, reducing the need for manual data wrangling and making analytics insights accessible across Claude, ChatGPT, Cursor, and other MCP-compatible platforms. The server solves the problem of agents spending excessive time preparing raw analytics data for analysis by pre-aggregating results server-side and estimating large datasets to prevent workflow disruptions.
Public tool metadata for what this MCP can expose to an agent.
GOOGLE_ANALYTICS_BATCH_RUN_REPORTSTool to return multiple analytics data reports in a batch. Use when you need to fetch multiple reports for one GA4 property in a single request.2 paramsTool to return multiple analytics data reports in a batch. Use when you need to fetch multiple reports for one GA4 property in a single request.
propertystringrequestsarrayGOOGLE_ANALYTICS_CHECK_COMPATIBILITYTool to list dimensions and metrics compatible with a GA4 report request. Use when you need to validate compatibility of chosen dimensions or metrics before running a report.6 paramsTool to list dimensions and metrics compatible with a GA4 report request. Use when you need to validate compatibility of chosen dimensions or metrics before running a report.
metricsarraypropertystringdimensionsarraymetricFilterobjectdimensionFilterobjectcompatibilityFilterstringCOMPATIBILITY_UNSPECIFIED · COMPATIBLE · INCOMPATIBLEGOOGLE_ANALYTICS_CREATE_AUDIENCE_EXPORTTool to create an audience export. Use after configuring the audience and dimensions to produce a long-running Operation.3 paramsTool to create an audience export. Use after configuring the audience and dimensions to produce a long-running Operation.
parentstringaudiencestringdimensionsarrayGOOGLE_ANALYTICS_CREATE_AUDIENCE_LISTTool to create an audience list. Use when you need to define and asynchronously populate a new AudienceList resource under a GA4 property.4 paramsTool to create an audience list. Use when you need to define and asynchronously populate a new AudienceList resource under a GA4 property.
parentstringaudiencestringdimensionsarraywebhookNotificationobjectGOOGLE_ANALYTICS_CREATE_EXPANDED_DATA_SETTool to create an expanded data set for a property. Use when you need to combine specific dimensions and metrics into a custom dataset after property creation.2 paramsTool to create an expanded data set for a property. Use when you need to combine specific dimensions and metrics into a custom dataset after property creation.
parentstringexpandedDataSetobjectGOOGLE_ANALYTICS_CREATE_ROLLUP_PROPERTYTool to create a GA4 Roll-up Property and optionally initial source links.4 paramsTool to create a GA4 Roll-up Property and optionally initial source links.
accountstringtimeZonestringdisplayNamestringsourcePropertiesarrayGOOGLE_ANALYTICS_GET_ACCOUNTTool to retrieve a single Account by its resource name. Use when you need detailed account info after confirming the account resource name (e.g., accounts/100).1 paramsTool to retrieve a single Account by its resource name. Use when you need detailed account info after confirming the account resource name (e.g., accounts/100).
namestringGOOGLE_ANALYTICS_GET_AUDIENCE_EXPORTTool to get configuration metadata for an Audience Export. Use after creating an Audience Export to retrieve its status and details.1 paramsTool to get configuration metadata for an Audience Export. Use after creating an Audience Export to retrieve its status and details.
namestringGOOGLE_ANALYTICS_GET_AUDIENCE_LISTTool to get configuration metadata about a specific audience list. Use after confirming the audience list resource name.1 paramsTool to get configuration metadata about a specific audience list. Use after confirming the audience list resource name.
namestringGOOGLE_ANALYTICS_GET_KEY_EVENTTool to retrieve a Key Event. Use after confirming the key event resource name.1 paramsTool to retrieve a Key Event. Use after confirming the key event resource name.
namestringGOOGLE_ANALYTICS_GET_METADATATool to get metadata for dimensions, metrics, and comparisons for a GA4 property. Use when you need to discover available fields before building a report.1 paramsTool to get metadata for dimensions, metrics, and comparisons for a GA4 property. Use when you need to discover available fields before building a report.
namestringGOOGLE_ANALYTICS_GET_PROPERTY_QUOTAS_SNAPSHOTTool to retrieve all property quotas organized by category for a given property. Use when you need to check current quota usage for a GA4 property.1 paramsTool to retrieve all property quotas organized by category for a given property. Use when you need to check current quota usage for a GA4 property.
propertystringGOOGLE_ANALYTICS_LIST_ACCOUNTSTool to list all Accounts accessible by the caller. Use when you need to enumerate all Google Analytics accounts your credentials can access.3 paramsTool to list all Accounts accessible by the caller. Use when you need to enumerate all Google Analytics accounts your credentials can access.
pageSizeintegerpageTokenstringshowDeletedbooleanGOOGLE_ANALYTICS_LIST_AUDIENCE_EXPORTSTool to list all audience exports for a GA4 property. Use when you need to fetch its export history after initiating exports.3 paramsTool to list all audience exports for a GA4 property. Use when you need to fetch its export history after initiating exports.
parentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_LIST_AUDIENCE_LISTSTool to list all audience lists for a GA4 property. Use when you need to retrieve a property's configured audience lists after confirming the property ID.3 paramsTool to list all audience lists for a GA4 property. Use when you need to retrieve a property's configured audience lists after confirming the property ID.
parentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_LIST_AUDIENCESTool to list all audiences on a property. Use when you need to fetch all audiences for a GA4 property after confirming its existence.3 paramsTool to list all audiences on a property. Use when you need to fetch all audiences for a GA4 property after confirming its existence.
parentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_LIST_KEY_EVENTSTool to list Key Events. Use when you need to retrieve all key event definitions for a given property.3 paramsTool to list Key Events. Use when you need to retrieve all key event definitions for a given property.
parentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_LIST_PROPERTIESTool to list GA4 properties under a specific account. Use after obtaining an account ID; supports pagination and including soft-deleted properties.4 paramsTool to list GA4 properties under a specific account. Use after obtaining an account ID; supports pagination and including soft-deleted properties.
accountstringpageSizeintegerpageTokenstringshowDeletedbooleanGOOGLE_ANALYTICS_LIST_REPORTING_DATA_ANNOTATIONSTool to list all Reporting Data Annotations on a property. Use when you need to retrieve or inspect annotations for a GA4 property.4 paramsTool to list all Reporting Data Annotations on a property. Use when you need to retrieve or inspect annotations for a GA4 property.
filterstringparentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_LIST_ROLLUP_PROPERTIESTool to list roll-up GA4 properties accessible to the caller. Use when you need to identify roll-up properties across all accessible accounts.1 paramsTool to list roll-up GA4 properties accessible to the caller. Use when you need to identify roll-up properties across all accessible accounts.
pageSizeintegerGOOGLE_ANALYTICS_LIST_SEARCH_ADS360_LINKSTool to list all SearchAds360Links on a property. Use when you need to fetch all Search Ads 360 links for a given property after authenticating.3 paramsTool to list all SearchAds360Links on a property. Use when you need to fetch all Search Ads 360 links for a given property after authenticating.
parentstringpageSizeintegerpageTokenstringGOOGLE_ANALYTICS_QUERY_AUDIENCE_EXPORTTool to query a completed audience export. Use when you need to fetch user rows with pagination.3 paramsTool to query a completed audience export. Use when you need to fetch user rows with pagination.
namestringlimitintegeroffsetintegerGOOGLE_ANALYTICS_QUERY_AUDIENCE_LISTTool to query an audience list. Use when you need to retrieve user rows from a GA4 audience list with pagination.3 paramsTool to query an audience list. Use when you need to retrieve user rows from a GA4 audience list with pagination.
namestringlimitintegeroffsetintegerGOOGLE_ANALYTICS_RUN_FUNNEL_REPORTTool to run a GA4 funnel report. Use when you need a customized funnel analysis report for a given property.10 paramsTool to run a GA4 funnel report. Use when you need a customized funnel analysis report for a given property.
limitintegerfunnelobjectpropertystringsegmentsarraydateRangesarraydimensionFilterobjectfunnelBreakdownobjectfunnelNextActionobjectreturnPropertyQuotabooleanfunnelVisualizationTypestringSTANDARD_FUNNEL · TRENDED_FUNNELGOOGLE_ANALYTICS_RUN_REPORTTool to run a customized GA4 data report. Use when you need event data after specifying dimensions, metrics, and date ranges.15 paramsTool to run a customized GA4 data report. Use when you need event data after specifying dimensions, metrics, and date ranges.
limitintegeroffsetintegermetricsarrayorderBysarraypropertystringcohortSpecobjectdateRangesarraydimensionsarraycomparisonsarraycurrencyCodestringmetricFilterobjectkeepEmptyRowsbooleandimensionFilterobjectmetricAggregationsarrayreturnPropertyQuotaboolean
mcp-name: io.github.surendranb/google-analytics-mcp
Connect Google Analytics 4 data directly to AI agents, analyst copilots, and MCP runtimes across Claude, ChatGPT, Gemini, Cursor, VS Code, and OpenClaw. Gives models analysis-ready GA4 access with live schema discovery, metric auto-aliasing, server-side aggregation, and autonomous self-healing defenses.
🌐 Website & Documentation: https://ga4mcp.com
🔗 Sister Project: Google Search Console MCP
Powered by pypi.builditwithai.xyz
Auto-detects your system, configures Gemini CLI, Claude Desktop, Cursor, and VS Code automatically in 1 command:
curl -fsSL https://ga4.builditwithai.xyz | bash
brew tap surendranb/tap
brew install google-analytics-mcp
Add to your MCP configuration file (claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"ga4-analytics": {
"command": "npx",
"args": ["-y", "google-analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
Install directly into Google Gemini CLI with a single command:
gemini extensions install github.com/surendranb/google-analytics-mcp
uvx & Explicit python -m ga4_mcp{
"mcpServers": {
"ga4-analytics": {
"command": "uvx",
"args": ["--from", "google-analytics-mcp", "ga4-mcp-server"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
Or run directly via ga4-mcp-server / python -m ga4_mcp:
{
"mcpServers": {
"ga4-analytics": {
"command": "python",
"args": ["-m", "ga4_mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
get_troubleshooting_guide.'conversions' → 'keyEvents', preventing unnecessary query failures./Users/yourname/keys/ga4-key.json).client_email) with the Viewer role.123456789).| Tool Name | Purpose |
|---|---|
get_ga4_data | Execute GA4 queries with dimensions, metrics, date ranges, and optional filters. |
search_schema | Keyword search across 200+ GA4 dimension and metric API names. |
get_property_schema | Inspect all available dimensions and metrics for your specific property. |
list_metric_categories | Browse metric categories (User, Session, Revenue, Event). |
list_dimension_categories | Browse dimension categories (Geography, Traffic Source, Device). |
get_troubleshooting_guide | Self-healing guide for IAM permissions, setup, and filter syntax. |
GA4 MCP collects anonymous usage telemetry to improve the server — no personal data, no GA4 report data, ever. Opt out anytime with DISABLE_TELEMETRY=1 or DO_NOT_TRACK=1.
Developed by Surendran B under the Apache License 2.0.
Website: https://ga4mcp.com
YOUR_API_KEY*secretYour API key for the service
io.github.infoinlet-marketplace/mcp-observability
betterdb-inc/monitor
com.mcparmory/datadog
thotischner/observability-mcp
io.github.tantiope/datadog-mcp
io.github.us-all/datadog