Manage GA4 properties, data streams, conversions, and run reports via Admin & Data APIs.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server for Google Analytics 4 β create properties, configure data streams, manage conversions, and run reports via the Admin & Data APIs.
Google Cloud Console β IAM & Admin β Service Accounts
Enable APIs in your GCP project:
GA4 Admin β Property Access Management β Add the service account email (from the JSON) as Editor
Configure credentials (pick one):
GA_CREDENTIALS env var in your MCP config~/.google-analytics-4-mcp/credentials.jsonDone. No browser flow, no consent screen, no tokens to refresh.
Add to claude_desktop_config.json:
check_auth_status to verify the service account is configuredlist_accounts to see your GA4 accountscreate_property β create_web_data_stream β get_tracking_snippetrun_report with dimensions and metrics| Tool | Description |
|---|---|
check_auth_status | Verify service account is configured and valid |
| Tool | Description |
|---|---|
list_accounts | List accessible GA4 accounts |
list_properties | List properties for an account |
create_property | Create a GA4 property |
get_property | Get property details |
delete_property | Soft-delete a property |
list_data_streams | List data streams |
create_web_data_stream | Create web stream β get Measurement ID |
delete_data_stream | Delete a data stream |
get_tracking_snippet | Generate gtag.js HTML snippet |
list_key_events | List conversion events |
create_key_event | Mark event as conversion |
delete_key_event | Remove conversion |
list_custom_dimensions | List custom dimensions |
create_custom_dimension | Create custom dimension |
list_custom_metrics | List custom metrics |
create_custom_metric | Create custom metric |
list_google_ads_links | List Google Ads links |
create_google_ads_link | Link Google Ads account |
get_measurement_protocol_secret | Get/create Measurement Protocol secret |
| Tool | Description |
|---|---|
run_report | Run report with dimensions, metrics, dates, filters |
run_realtime_report | Real-time active users and events |
get_metadata | List available dimensions and metrics |
| Variable | Default | Description |
|---|---|---|
GA_CREDENTIALS | β | Service Account JSON key content (copy-paste the entire JSON) |
GA_CREDENTIALS_PATH | ~/.google-analytics-4-mcp/credentials.json | Alternative: path to the JSON key file |
GA_CREDENTIALS takes priority over GA_CREDENTIALS_PATH.
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/google-analytics-4-2)<a href="https://allmcps.com/mcp/google-analytics-4-2"><img src="https://allmcps.com/api/badge/google-analytics-4-2?style=directory" alt="Google Analytics 4 on AllMCPs" /></a>