com.safe-mcp/google-analytics-unofficial
Official5 toolsGoogle Analytics (unofficial)
Connect Google Analytics to ChatGPT. Query GA4 data in plain English and get instant insights.
Query Google Analytics 4 data in plain English and extract insights.
Captured live from the server via tools/list.
marketing_get_sources
Lists connected and missing GA4, Google Analytics properties, property IDs, web streams, app streams, measurement IDs, Firebase app IDs, Google Search Console sites, Bing Webmaster sites, and current analysis surface mappings. Use this before reporting when property/site selectors are unknown.
Parameters (2)
- sourcesarray
- surfaceIdstring
marketing_get_catalog
Use this when the user wants to discover the canonical marketing reporting graph, available sources, supported metrics, supported dimensions, or which connectors are live today. Each source also reports a `passthrough` field describing whether native fields beyond the curated list are accepted (GA4 accepts any native dimension/metric; Search Console accepts any native dimension; Bing is limited to the curated fields). Do not use this for GA4 account discovery or data retrieval.
Parameters (1)
- sourcestring
marketing_get_report
Primary reporting tool for a given GA4 property or site. Use for totals, trends, and breakdowns by dimension across GA4 website traffic and app analytics, Google Search Console site traffic, and Bing Webmaster — including last-30-days summaries, revenue, leads, sessions, users, engagement/time-on-page (average_session_duration, user_engagement_duration), and period-over-period comparisons. Drill deep: GA4 supports up to 9 grouped dimensions (date/hour, geo, device/browser/OS, source/medium/channel, landing_page/page_path, etc.). Defaults to all mapped connected sources merged into one standardized view, aligned on the shared grain (typically landing_page) so a page row blends GA4 sessions+engagement with Search Console/Bing clicks/impressions/CTR/position; per-source detail (e.g. full query lists) stays in sourceSections. Note GA4 has no `query` dimension and Search Console/Bing have no sessions/engagement, so those cannot share one row — query is a Search Console/Bing breakdown. Narrow with sources or sourceMode='single'. Any GA4 dimension/metric name not in the catalog is passed through to the GA4 API automatically; metricMode='source_native' forces a pure GA4-native report. Pass one date range for a single window or two date ranges for period-over-period comparison.
Parameters (27)
- propertyIdany
Numeric Google Analytics 4 property ID for website analytics or app analytics. Use this when the user references a GA4 property directly.
- appStreamIdstring
GA4 app or web data stream ID when the request targets a specific app stream or website stream.
- dateRangesarrayrequired
One or more GA4 date ranges. Use two date ranges for period-over-period comparisons or significance checks.
- metricsarrayrequired
GA4 metric API names such as sessions, activeUsers, conversions, eventCount, totalRevenue, or engagedSessions. Include explicit numerator and denominator metrics when requesting significance context.
- dimensionsarray
Optional GA4 dimensions such as date, country, deviceCategory, landingPagePlusQueryString, or dateRange. Omit entirely for aggregate totals (renders as KPI widget). Only include when the user asks for a breakdown or trend.
- limitinteger
- offsetinteger
- orderBysarray
Optional sort order. Each entry requires fieldName (a GA4 API name like sessions or date) and optional desc (true for descending). Example: [{ fieldName: "sessions", desc: true }].
- dimensionFiltersarray
- dimensionFilterExpressionobject
- metricFiltersarray
- metricFilterExpressionany
- keepEmptyRowsboolean
- returnAllRowsboolean
- maxRowsinteger
- pageSizeinteger
- sourcestring
- sourcesarray
- sourceModestring
- metricModestring
- significanceobject
Optional significance context for GA4 rate comparisons. Use this only when the user asks whether a change is statistically significant or meaningful.
- surfaceIdstring
Optional analysis surface ID. When omitted, the default surface is used if no explicit selector is provided.
- propertyany
Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915.
- appobject
Optional app or web stream selector. Use this when the user identifies the GA4 source by stream ID, measurement ID, Firebase app ID, or stream name.
- siteUrlstring
- sitestring
- sourceOptionsobject
marketing_get_funnel
Use for ordered conversion-step analysis: GA4 ordered_steps step funnels (e.g. session_start → add_to_cart → purchase) and cross-source holistic_bundle landing-page funnels joining GA4, Google Search Console, and Bing Webmaster. Covers funnel drop-off between steps (e.g. from landing on the site to adding to cart to purchasing), conversion paths, and acquisition-to-conversion context. Pass one date range for a single window or two date ranges for period-over-period comparison.
Parameters (16)
- typestringrequired
- surfaceIdstring
- dateRangesarrayrequired
One or more GA4 date ranges. Use two date ranges for period-over-period comparisons or significance checks.
- limitinteger
- ga4PropertyIdany
Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915.
- searchConsoleSiteUrlstring
- bingSiteUrlstring
- propertyIdany
Numeric GA4 property ID for the funnel report.
- propertyany
Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915.
- appStreamIdstring
Optional data stream ID when the funnel should run against a specific app or website stream.
- appobject
Optional app or web stream selector. Use this when the user identifies the GA4 source by stream ID, measurement ID, Firebase app ID, or stream name.
- funnelobject
Multi-step funnel definition. Use this only for ordered step analysis, not for general website analytics reporting.
- funnelBreakdownobject
- funnelNextActionobject
- funnelVisualizationTypestring
- returnPropertyQuotaboolean
marketing_manage_surface
Gets or updates persisted selectors for a website/app analysis surface. Use action='get' to inspect mappings and action='update' to persist GA4, Search Console, or Bing Webmaster selectors.
Parameters (6)
- actionstringrequired
- surfaceIdstring
- namestring
- mainDomainany
- selectorsobject
- selectorSetsobject
README not available yet.
Install
claude_desktop_config.json
{
"mcpServers": {
"google-analytics-unofficial": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.safe-mcp.com/mcp"
]
}
}
}Desktop config is stdio-only; this bridges via mcp-remote. Native remote: Settings > Connectors.