ga4-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | Yes | The absolute path to your Google 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 |
|---|---|
| list_account_summariesA | List every GA4 account and its properties the service account can see. Returns account name/id plus each property's display name and numeric id. Call this first to discover property ids for the other tools. |
| get_property_detailsA | Get configuration details for one GA4 property (name, time zone, currency, industry, create time). |
| list_data_streamsA | List the data streams (web/app) on a GA4 property. The stream id (last path segment of 'name') is needed by the Measurement Protocol secret tools. |
| run_reportC | Run a GA4 report. metrics/dimensions are GA4 API names (e.g. metrics ['activeUsers','conversions'], dimensions ['date','sessionDefaultChannelGroup']). Dates accept YYYY-MM-DD or relative forms like '28daysAgo' / 'today'. |
| run_realtime_reportA | Run a GA4 realtime report (last ~30 minutes). Example: metrics ['activeUsers'], dimensions ['country','unifiedScreenName']. |
| list_custom_dimensionsA | List custom dimensions defined on a GA4 property. |
| create_custom_dimensionB | Create a custom dimension. parameter_name is the event parameter / user property key; scope is 'EVENT', 'USER' or 'ITEM'. display_name may contain only letters, numbers, underscores and spaces. |
| archive_custom_dimensionB | Archive (delete) a custom dimension. custom_dimension_id may be the numeric id or the full 'properties/NNN/customDimensions/MMM' name. |
| list_custom_metricsB | List custom metrics defined on a GA4 property. |
| create_custom_metricC | Create a custom metric. measurement_unit is one of STANDARD, CURRENCY, FEET, METERS, KILOMETERS, MILES, MILLISECONDS, SECONDS, MINUTES, HOURS. |
| list_key_eventsB | List key events (conversions) on a GA4 property. |
| create_key_eventA | Mark an event as a key event (conversion). counting_method is 'ONCE_PER_EVENT' or 'ONCE_PER_SESSION'. |
| list_audiencesB | List audiences defined on a GA4 property. |
| create_event_audienceA | Create a GA4 audience of users who triggered a given event (e.g. 'purchase', 'generate_lead') — useful for remarketing lists that can be shared to Google Ads. membership_duration_days is how long a user stays in the audience (max 540). |
| archive_audienceA | Archive a GA4 audience. audience_id may be the numeric id or the full 'properties/NNN/audiences/MMM' name. |
| list_measurement_protocol_secretsA | List Measurement Protocol API secrets for a data stream. stream_id is the numeric id from list_data_streams. |
| create_measurement_protocol_secretA | Create a Measurement Protocol API secret on a data stream. Returns the secret_value (api_secret) needed by send_ga4_event. Treat it as sensitive. |
| delete_measurement_protocol_secretB | Delete a Measurement Protocol API secret. secret_id may be the numeric id or the full resource name. |
| send_ga4_eventA | Send an event into a GA4 property via the Measurement Protocol. measurement_id is the stream's 'G-XXXXXXX'; api_secret comes from a Measurement Protocol secret; client_id identifies the user/device. Set validate=True to hit GA4's debug/validation endpoint (checks the payload WITHOUT ingesting it) — recommended before real sends. |
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 19 tools
Each tool targets a distinct resource and action—accounts, properties, streams, reports, custom dimensions/metrics, key events, audiences, secrets, and event sending. No two tools overlap in purpose; even similar operations (archive vs. delete) are clearly differentiated by resource type.
All tool names follow a consistent verb_noun snake_case pattern (list_*, create_*, get_*, run_*, archive_*, delete_*, send_*). The use of 'archive' for some resources and 'delete' for others reflects GA4 API conventions rather than inconsistency.
At 19 tools, the set is on the heavier side but still well-scoped for GA4 management, covering configuration, reporting, audience creation, and Measurement Protocol. Each tool serves a distinct purpose, though some trimming could be possible.
The surface covers core workflows but has notable gaps: no update/archive for custom metrics, no update for audiences, no delete for key events, and no tools for user properties or property management. These omissions could force workarounds but don't break the primary use cases.