google-analytics-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Log level: debug, info, warn, error | info |
| GA4_CLIENT_ID | Yes | Required. OAuth client ID | |
| GA4_PROPERTY_ID | No | Optional default property ID, saves passing it on every call | none |
| GA4_CLIENT_SECRET | Yes | Required. OAuth client secret | |
| GA4_REFRESH_TOKEN | Yes | Required. Refresh token from the consent flow |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ga4_health_checkA | Read-only GA4 health check. Verifies configured credentials, accessible properties, and metadata/property access without exposing OAuth tokens. |
| ga4_list_propertiesA | List all GA4 properties accessible with the current credentials. Returns property ID, display name, timezone, and currency. |
| ga4_run_reportA | Run a GA4 analytics report with intelligent query planning. Supports 52 metrics, 63 dimensions, auto-pagination. Use ga4://metrics and ga4://dimensions resources for available fields. Max 9 dimensions + 10 metrics per request. |
| ga4_run_realtime_reportB | Run a read-only GA4 Data API realtime report. Realtime supports only a limited subset of dimensions and metrics. |
| ga4_get_metadataA | Get the complete list of dimensions and metrics available for a specific GA4 property. Useful for discovering custom dimensions/metrics. |
| ga4_get_custom_definitionsA | List custom dimensions and custom metrics exposed by GA4 Data API metadata. Read-only fallback for custom definition inventory. |
| ga4_get_key_eventsA | Inventory GA4 key events/conversions using metadata-aware Data API reports. Returns best-effort event names and counts. |
| ga4_get_ecommerce_diagnosticsA | Read-only ecommerce coverage diagnostics for core ecommerce events, revenue metrics, and item-level reporting over a date range. |
| ga4_get_event_parametersA | Best-effort event parameter inventory from GA4 metadata plus event reports. Documents Data API limitations for raw parameters. |
| ga4_run_funnel_recipeB | Run a read-only configurable funnel recipe using one GA4 report per eventName/pagePath step and return simple step counts. |
| ga4_get_audience_export_diagnosticsB | Read-only Audience Export diagnostics. Lists existing audience exports, state counts, and optionally samples rows from an existing export. |
| ga4_get_audience_diagnosticsB | Read-only audience diagnostics from Admin API audiences, Data API recurring audience lists, and observed audienceName report fallback. |
| ga4_get_bigquery_export_diagnosticsA | Detect GA4 BigQuery export links and diagnose export modes, stream coverage, excluded events, and dataset location. |
| ga4_get_server_side_tagging_diagnosticsA | Best-effort read-only server-side tagging diagnostics from data streams, Measurement Protocol secrets, event rules, and stream settings. |
| ga4_run_advanced_funnel_reportA | Run the GA4 Data API v1alpha runFunnelReport endpoint with optional breakdown/next-action, falling back to read-only step counts if unavailable. |
| ga4_get_channel_groupsB | List custom channel groups defined for a GA4 property. |
| ga4_validate_queryA | Validate a metric/dimension combination BEFORE executing. Checks max limits (9 dims, 10 metrics), ecommerce rules, and dimension compatibility. |
| ga4_run_pivot_reportA | Run a read-only GA4 Data API pivot report with native filters, ordering, quota state, multiple date ranges, and up to 250,000 pivot cells. Every pivot requires an explicit limit. |
| ga4_batch_run_reportsA | Run 1-5 independent read-only GA4 Core reports for the same property in one official Data API batch request. |
| ga4_batch_run_pivot_reportsA | Run 1-5 independent read-only GA4 pivot reports for the same property in one official Data API batch request. |
| ga4_check_compatibilityA | Ask the official GA4 Data API which dimensions and metrics are compatible with a proposed Core report selection. |
| ga4_get_property_quotas_snapshotA | Read the current GA4 Data API property quota snapshot from the official v1alpha endpoint. This does not run a report, but Google still charges one property-quota token to the category with the most remaining quota. |
| ga4_list_accountsA | List raw GA4 Analytics Admin accounts accessible to the authenticated user (read-only, auto-paginated). |
| ga4_list_admin_resourcesA | List an allowlisted GA4 Admin collection in read-only mode: streams, custom definitions, key events, audiences, product links, annotations, channel groups, expanded datasets, subproperty/rollup configuration, and access bindings. |
| ga4_get_property_configurationB | Read GA4 property details plus selected singleton Admin settings (attribution, retention, Google Signals, reporting identity, or user-provided-data settings). |
| ga4_list_audience_exportsA | List existing GA4 Audience Export snapshots and Recurring Audience Lists without creating new exports. |
| ga4_query_audience_exportA | Query rows from an existing GA4 Audience Export. User/device identifiers are redacted by default; include them only through explicit opt-in. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| ga4-metrics | |
| ga4-dimensions | |
| ga4-compatibility | |
| ga4-manifest | |
| ga4-recipes | |
| ga4-p2-diagnostics |
TDQS
Scored across 27 tools
Several tools overlap in purpose, especially ga4_validate_query vs ga4_check_compatibility, ga4_run_advanced_funnel_report vs ga4_run_funnel_recipe, and ga4_get_audience_diagnostics vs ga4_get_audience_export_diagnostics. Descriptions help clarify these boundaries, but an agent could still misselect among closely named tools.
All tools use the ga4_ prefix and snake_case in a predictable action_object pattern, such as run_report, list_properties, get_metadata, and validate_query. The convention is consistent throughout, with only minor compound verb variations like batch_run.
With 27 tools, the server is well above the typical 3-15 range and feels heavy. Many are specialized read-only diagnostics that could be consolidated or exposed as parameters, creating unnecessary surface area for an MCP toolset.
The surface covers a wide range of read-only GA4 operations: reporting, realtime, pivots, batches, funnels, metadata, admin resources, audiences, ecommerce, BigQuery, server-side tagging, and quotas. Gaps remain in write/admin lifecycle operations and some diagnostic depth, but for a read-only analytics server the core analysis surface is largely complete.