GA4 MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GA4_CLIENT_ID | No | OAuth client ID from the Google Cloud Console. | |
| GA4_ACCESS_TOKEN | No | OAuth access token for Google Analytics 4 API authentication. | |
| GA4_CLIENT_SECRET | No | OAuth client secret from the Google Cloud Console. | |
| GA4_REFRESH_TOKEN | No | OAuth refresh token for Google Analytics 4 API authentication. | |
| GA4_SERVICE_ACCOUNT_JSON | No | Google Analytics 4 Service Account credentials provided as a raw JSON string. | |
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to the Google Analytics 4 Service Account JSON credentials 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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ga4_account_summariesA | Retrieves information about the user's Google Analytics accounts and properties. Returns a list of all GA4 accounts and their associated properties that the authenticated user has access to. |
| ga4_property_detailsB | Returns details about a specific GA4 property including its name, display name, time zone, currency, industry category, and other settings. |
| ga4_google_ads_linksA | Returns a list of links to Google Ads accounts for a GA4 property. Shows which Google Ads accounts are connected to the property for data sharing. |
| ga4_property_annotationsB | Returns annotations for a GA4 property. Annotations are notes that mark specific dates or periods, typically used to record events like releases, campaigns, or traffic changes. |
| ga4_run_reportA | Runs a Google Analytics Data API report. Returns analytics data based on the specified dimensions, metrics, and date ranges. Hints for argumentsHints for dimensionsThe dimensions list must consist solely of either:
Hints for metricsThe metrics list must consist solely of either:
Hints for dateRangesExamples:
Hints for dimensionFilterExample: {"filter": {"fieldName": "eventName", "stringFilter": {"matchType": "BEGINS_WITH", "value": "page"}}} Hints for orderBysExample: [{"dimension": {"dimensionName": "eventName"}, "desc": false}] or [{"metric": {"metricName": "eventCount"}, "desc": true}] |
| ga4_run_realtime_reportA | Runs a Google Analytics Data API realtime report. Returns real-time analytics data for the last 30 minutes. Hints for argumentsHints for dimensionsUse realtime dimensions from https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions Or user-scoped custom dimensions (apiName starting with "customUser:") Hints for metricsUse realtime metrics from https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics Note: Realtime reports cannot use custom metrics. |
| ga4_custom_dimensions_metricsA | Retrieves the custom dimensions and metrics defined for a GA4 property. Use this to discover what custom definitions are available before running reports. |
| ga4_validate_gtm_paramsA | GTM에서 보내는 이벤트 파라미터가 GA4에 제대로 수집되는지 검증합니다. 사용 방법방법 1: GTM 이벤트 목록 직접 전달gtmEvents 배열로 이벤트별 파라미터를 전달합니다. 방법 2: GTM Container Export JSON 전달GTM에서 컨테이너를 Export한 JSON 파일 내용을 gtmExportJson으로 전달하면 자동으로 파싱합니다. 검증 항목
API 호출 효율성
|
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 8 tools
Each tool has a clearly distinct purpose targeting specific GA4 resources or operations. For example, ga4_account_summaries retrieves account-level metadata, ga4_run_report handles standard analytics queries, and ga4_validate_gtm_params focuses on data quality validation. There is no functional overlap between tools, making tool selection straightforward for an agent.
All tools follow a consistent 'ga4_' prefix with descriptive snake_case naming that clearly indicates their function (e.g., ga4_property_details, ga4_run_realtime_report). The naming pattern is uniform throughout the set, making it predictable and easy to understand.
With 8 tools, this server is well-scoped for GA4 operations. It covers essential areas like metadata retrieval (accounts, properties, custom definitions), reporting (standard and realtime), and data validation, without being overwhelming or sparse. Each tool serves a clear, necessary function in the analytics workflow.
The tool set provides strong coverage for core GA4 operations including metadata access, reporting, and data validation. However, there are minor gaps such as the absence of tools for creating or managing resources (e.g., creating custom dimensions or annotations) or handling administrative tasks like user permissions, which could limit full lifecycle management.