Google Analytics MCP Plus
Allows managing Google Ads links in Google Analytics 4 properties via the Admin API, connecting GA properties to Google Ads accounts.
Provides tools for Google Analytics 4 reporting through the Data API and property configuration through the Admin API, including reports, pivots, realtime, funnels, key events, custom dimensions and metrics, data streams, audiences, annotations, and other Admin API resources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Analytics MCP Plus show me last week's sessions by country for property 123456789"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Analytics MCP Plus
An independent MCP server for Google Analytics 4 reporting and property configuration. It connects an MCP client to the official Analytics Admin and Data APIs through a local Python process.
The official Google Analytics MCP is read-only. This server adds controlled writes: key events, custom dimensions and metrics, Google Ads links, data streams, Measurement Protocol secrets, audiences, annotations, and the rest of the Admin API.
This project is not affiliated with Google.
Tools
Tool | Purpose |
| Accounts and properties, filtered by the property allowlist |
| Dimensions and metrics available to a property, including custom ones |
| Data API reports: |
| Admin API v1alpha methods grouped as read, write, and blocked |
| Protobuf fields for any Admin method or |
| Any |
| Any other Admin method, validate-only by default |
admin_read and admin_write take the method name and its request JSON, so the whole Admin API is reachable without a tool per resource:
{"method": "create_key_event",
"request": {"parent": "properties/123",
"key_event": {"event_name": "purchase", "counting_method": "ONCE_PER_EVENT"}}}Update masks accept snake_case ("display_name,description").
Related MCP server: Google Analytics MCP Server
Write safety
Writes are disabled by default. Execution requires
GOOGLE_ANALYTICS_ENABLE_WRITES=truein the server environment andvalidate_only=falsein the call.Validation is local. The Admin API has no server-side dry run. Validation parses the request against the API schema, applies the allowlist, and returns the parsed request. Permissions and business rules are checked only on execution.
Property allowlist. With
GOOGLE_ANALYTICS_ALLOWED_PROPERTY_IDSset, everyproperties/Nreference in a request must be allowed, and writes that reference no property (account-level changes) are refused.Blocked methods. Account and property deletion, account provisioning, roll-up properties, user deletion, user data collection acknowledgement, and access binding (user permission) changes are refused regardless of settings.
No automatic retries on writes. A timed-out write may have succeeded. Read the property before retrying.
Authentication
The server uses Application Default Credentials. The credential needs both Analytics scopes: the Admin API accepts analytics.edit for writes, but the Data API rejects it and requires analytics.readonly. One credential can serve this server and Google Ads MCP Plus:
gcloud auth application-default login \
--client-id-file=/absolute/path/to/oauth-client.json \
--scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/adwords,https://www.googleapis.com/auth/cloud-platformEnable the Google Analytics Admin API and Google Analytics Data API in the Cloud project that owns the OAuth client. Set GOOGLE_CLOUD_QUOTA_PROJECT if quota should be billed to a different project.
Variable | Default | Meaning |
| Standard ADC lookup | Absolute path to the credential file |
|
|
|
| Empty | Comma-separated property IDs. Empty permits every property the user can access |
|
| Timeout per API call, 1 to 300 |
Install and verify
uv sync --locked
export GOOGLE_APPLICATION_CREDENTIALS="/absolute/path/to/application_default_credentials.json"
uv run python scripts/smoke_test.py --property-id 123456789 # read-only
uv run python scripts/smoke_test.py --property-id 123456789 --write-test # creates and deletes one annotationConnect a client
{
"mcpServers": {
"google-analytics-mcp-plus": {
"command": "/absolute/path/to/uv",
"args": ["run", "--directory", "/absolute/path/to/google-analytics-mcp-plus", "--locked", "google-analytics-mcp-plus"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/application_default_credentials.json",
"GOOGLE_ANALYTICS_ALLOWED_PROPERTY_IDS": "123456789",
"GOOGLE_ANALYTICS_ENABLE_WRITES": "false"
}
}
}
}Limits
Local stdio only.
The Admin API surface is v1alpha, which includes every v1beta method. Alpha methods can change.
List methods return one page. Pass
page_tokenin the request to continue.Measurement Protocol event sending and Data API audience exports are not exposed.
License
MIT.
Available Tools
7 toolsadmin_readARead-only
Call a read-only Admin API method (get_, list_, search_, batch_get_, run_) with its request JSON, e.g. method=list_key_events, request={"parent":"properties/123"}. List methods return one page; pass page_token in request to continue.
Inputs: method (required), request (required).
admin_writeADestructive
Validate or execute one Admin API write (create_, update_, delete_, archive_, ...). e.g. method=create_key_event, request={"parent":"properties/123", "key_event":{"event_name":"purchase","counting_method":"ONCE_PER_EVENT"}}. Updates require update_mask. Default validates locally only; execution also requires GOOGLE_ANALYTICS_ENABLE_WRITES=true. Obtain user authorization before executing.
Inputs: method (required), request (required), validate_only.
get_metadataBRead-only
List dimensions and metrics, including custom ones, usable in reports.
Inputs: property_id (required).
get_request_schemaARead-only
Inspect protobuf request fields without credentials. Method is an Admin method (e.g. create_key_event) or data. (e.g. data.report). Pass a returned message_type to inspect nested fields. Field masks are comma-separated strings.
Inputs: method (required), message_type.
list_account_summariesBRead-only
List GA accounts and properties, filtered by the configured property allowlist.
Inputs: page_token.
list_admin_methodsARead-only
List Admin API (v1alpha) methods grouped as read, write, and blocked.
Inputs: no named parameters.
run_reportARead-only
Run a Data API report. Request is the request JSON without property. Kinds: report (RunReportRequest), pivot, batch, batch_pivot, realtime, compatibility, funnel (v1alpha RunFunnelReportRequest). Inspect get_request_schema("data."). Example: {"date_ranges":[{"start_date":"28daysAgo","end_date":"today"}], "dimensions":[{"name":"eventName"}],"metrics":[{"name":"eventCount"}],"limit":50}
Inputs: request (required), property_id (required), kind.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
The Data API path (run_report) and Admin API path (admin_read/admin_write) are clearly separated, and read vs write is explicit. The only mild overlap is between the discovery tools list_admin_methods and get_request_schema, plus get_metadata vs get_request_schema, but descriptions clarify that one lists dimensions/metrics and the other inspects protobuf fields.
Five tools follow a verb_noun pattern (list_account_summaries, get_metadata, run_report, list_admin_methods, get_request_schema), while admin_read/admin_write use a noun_verb grouping that still reads predictably as a pair. Minor deviation only, no chaotic mixing.
Seven tools is well-scoped: instead of one tool per GA method, the server uses generic dispatch (admin_read/admin_write) with schema discovery, keeping the surface small while covering a large API. Each tool earns its place.
Reporting (report, pivot, batch, realtime, funnel), metadata, account listing, and full Admin read/write with validation and schema inspection cover the domain end to end. The main gap is that write execution requires an env flag and there is no built-in pagination helper beyond manually passing page_token.
Maintenance
Related MCP Connectors
Read-only Google Analytics 4 MCP server for AI assistants.
Hosted MCP server for GA4, Google Ads and Search Console. Google OAuth, nothing to install.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Hosted, read-only Google Analytics 4 MCP: reports, period comparisons, realtime, custom fields.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides full Google Analytics 4 management and reporting capabilities via MCP, including property management, custom dimensions, audiences, events, data streams, and real-time reporting.MIT
- AlicenseAqualityNot gradedmaintenanceEnables LLM applications to query and analyze Google Analytics 4 data through standard MCP interfaces, supporting service account and OAuth2 authentication.510 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Google Analytics 4 data through MCP tools for running reports, listing properties, getting real-time metrics, and exploring metadata.57 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP clients to query Google Analytics 4 reporting and configuration data through 27 read-only tools, including pivots, funnels, realtime reports, Admin API inspection, and diagnostics, with identifiers redacted by default.27Apache 2.0