GA4 MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GA4_PROPERTY_ID | No | Default GA4 property ID (optional, can also pass per-tool) | |
| GA4_CREDENTIALS_PATH | Yes | Path to service account JSON key file |
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": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ga4_list_propertiesA | List all GA4 properties accessible by the service account. Returns property IDs and display names. |
| ga4_get_reportA | Run a custom GA4 report with any combination of dimensions and metrics. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. dimensions: Comma-separated dimension names (e.g., "date", "sessionSource,sessionMedium", "pagePath", "country", "deviceCategory"). Default: "date". metrics: Comma-separated metric names (e.g., "sessions,totalUsers,screenPageViews", "bounceRate,averageSessionDuration,conversions"). Default: "sessions,totalUsers,screenPageViews". days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20, max: 100). |
| ga4_get_top_pagesA | Get top pages by sessions. Shows page path, sessions, users, pageviews, bounce rate, and average session duration. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20). |
| ga4_get_traffic_sourcesA | Get traffic sources breakdown by source/medium. Shows sessions, users, bounce rate, and conversions per traffic source. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20). |
| ga4_get_conversionsA | Get conversion events and their counts. Shows which events are firing and how often, broken down by event name. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20). |
| ga4_get_realtimeA | Get realtime active users and current events on the site. Shows what's happening RIGHT NOW — active users, top pages, traffic sources. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. |
| ga4_compare_periodsA | Compare current period vs previous period for key metrics. Shows absolute values and percentage change for each metric. Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. metrics: Comma-separated metrics to compare (default: sessions, users, pageviews, bounce rate, avg session duration, conversions). days: Period length in days (default: 28). Compares last N days vs the N days before that. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each special-purpose tool targets a distinct analytical view (top pages, traffic sources, conversions, realtime, period comparison), and ga4_get_report is explicitly generic. While ga4_get_report could theoretically replicate the specialized tools, its purpose is clearly different, so confusion is unlikely.
All tools follow the consistent ga4_<verb>_<noun> pattern with lowercase and underscores. Verbs are list, get, and compare, which is a predictable and uniform convention across the set.
With 7 tools, the server is well-scoped for a GA4 analytics wrapper. It covers property discovery and the most common report types without unnecessary bloat or excessive minimalism.
The tool set covers property listing, common report dimensions, custom queries, realtime data, and period-over-period comparison. Advanced GA4 features like funnel analysis or user exploration are absent, but these are beyond the typical expectation for an analytics MCP server.