Google Analytics 4 MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GA_CREDENTIALS | No | Service Account JSON key content (copy-paste the entire JSON) | |
| GA_CREDENTIALS_PATH | No | Alternative: path to the JSON key file | ~/.google-analytics-4-mcp/credentials.json |
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 |
|---|---|
| check_auth_statusA | Check if the Google Analytics service account is configured and valid. |
| list_accountsA | List all Google Analytics accounts accessible by the authenticated user. |
| list_propertiesC | List all GA4 properties for an account. |
| create_propertyC | Create a new GA4 property. |
| get_propertyC | Get details of a GA4 property. |
| delete_propertyA | Soft-delete a GA4 property (can be restored within 35 days). |
| list_data_streamsB | List all data streams for a GA4 property. |
| create_web_data_streamC | Create a web data stream and get the Measurement ID (G-XXXXX). |
| delete_data_streamC | Delete a data stream. |
| get_tracking_snippetB | Generate the gtag.js HTML tracking snippet ready to paste into your website. |
| list_key_eventsC | List key events (conversions) configured for a property. |
| create_key_eventC | Mark an event as a key event (conversion). |
| delete_key_eventC | Remove an event from key events (conversions). |
| list_custom_dimensionsC | List custom dimensions for a property. |
| create_custom_dimensionC | Create a custom dimension. |
| list_custom_metricsC | List custom metrics for a property. |
| create_custom_metricC | Create a custom metric. |
| list_google_ads_linksC | List Google Ads links for a property. |
| create_google_ads_linkC | Link a Google Ads account to a GA4 property. |
| get_measurement_protocol_secretC | Get or create a Measurement Protocol API secret for server-side event tracking. |
| run_reportC | Run a GA4 report with dimensions, metrics, date range, and optional filters. |
| run_realtime_reportC | Run a real-time report showing active users and live events. |
| get_metadataA | List all available dimensions and metrics for a GA4 property. Useful to discover which dimension/metric names you can use in run_report. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/stucchi/mcp-google-analytics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server