
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@mindstone/mcp-server-google-analytics
Advanced tools
Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools
Google Analytics 4 MCP server for Model Context Protocol hosts. Discover account/property structure, explore the live schema, run reports (with row-volume safety), create large asynchronous exports, and inspect admin configuration through a standardised MCP interface.
GOOGLE_APPLICATION_CREDENTIALS)STATUS.jsonanalytics.readonly scope, or a service account JSON with access to the GA4 propertyAfter clicking the button, your host will prompt you to fill: GOOGLE_APPLICATION_CREDENTIALS.
{
"mcpServers": {
"Google Analytics 4": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": ""
}
}
}
}
cd <path-to-repo>/connectors/google-analytics
npm install
npm run build
npx -y @mindstone/mcp-server-google-analytics
node dist/index.js
This server uses Google Application Default Credentials (ADC). Mint ADC for a user account by installing the Google Cloud CLI and running:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \
--client-id-file=/absolute/path/to/oauth-client-secret.json
The --client-id-file is optional but strongly recommended — using your own OAuth client avoids the shared gcloud quota and gives you a stable verification footprint. You'll need a Google Cloud project with the Google Analytics Admin API and Google Analytics Data API enabled.
For service accounts, set GOOGLE_APPLICATION_CREDENTIALS to the absolute path of the service-account JSON. The service account must be granted access to the GA4 property in the GA4 Admin UI.
GOOGLE_APPLICATION_CREDENTIALS — required. Absolute path to ADC or service-account JSON. Node does not expand ~ or %APPDATA% — provide a fully-resolved path.GA4_PROPERTY_ID — optional. Default GA4 property ID (e.g. 123456789). Tools fall back to this when property_id is not passed in the call.{
"mcpServers": {
"GoogleAnalytics": {
"command": "npx",
"args": ["-y", "@mindstone/mcp-server-google-analytics"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/Users/you/.config/gcloud/application_default_credentials.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
{
"mcpServers": {
"GoogleAnalytics": {
"command": "node",
"args": ["<path-to-repo>/connectors/google-analytics/dist/index.js"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/credentials.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
ga_list_account_summaries — discover available accounts and propertiesga_list_properties — flat list of GA4 properties with optional filteringga_get_property_details — currency, time zone, industry category, service levelga_get_metadata — live property schemaga_get_property_schema — same data with summary countsga_search_schema — keyword search across dimensions and metricsga_list_dimension_categories, ga_list_metric_categoriesga_get_dimensions_by_category, ga_get_metrics_by_categoryga_check_compatibility — verify dimension/metric combinations before reportingga_run_report — core report with row-volume safety (estimate, opt-in to large datasets, automatic aggregation suggestions)ga_run_pivot_report — cross-tabulated reportsga_batch_run_reports — up to 5 reports in one callga_run_realtime_report — last 30 minutes of activityga_get_property_quotas_snapshot — remaining tokens / requestsga_create_report_task — start an asynchronous report task for large exports (no synchronous timeout, no row-volume gate)ga_get_report_task — poll task state until ACTIVEga_query_report_task — page task rows (up to 250,000 per page)ga_create_audience_export — snapshot the users in an audience (incl. predictive segments); charges audience-export quota tokensga_get_audience_export — poll export state until ACTIVEga_list_audience_exports — find and reuse existing exportsga_query_audience_export — page user-level rows from an ACTIVE exportga_list_audiences — audiences configured on the property, with filter clausesga_list_channel_groups — channel groups and their grouping rulesga_get_custom_dimensions_and_metricsga_list_google_ads_linksga_list_key_eventsga_list_data_streamsga_get_global_site_tag — gtag.js snippet for the first web streamga_list_bigquery_linksga_get_data_retention_settingsga_list_firebase_linksga_search_change_history_eventsga_create_report_task and ga_create_audience_export, which materialise server-side snapshots and charge quota (annotated readOnlyHint: false, destructiveHint: true, idempotentHint: false) without modifying property configuration. Hosts can gate the two creation tools behind explicit user approval.v1alpha surfaces today; the corresponding tools note this in their descriptions.<untrusted-content source="…"> envelopes so hosts treat it as data, not instructions. Metric values and resource identifiers stay raw so agents can compose follow-up calls. Resource IDs passed to tools are constrained to the ID charset before URL interpolation (INVALID_RESOURCE_ID on anything else).INVALID_API_RESPONSE error rather than propagating malformed data. Paginated lists follow nextPageToken in full and fail with PAGINATION_LIMIT_EXCEEDED if the API does not stop paging after a generous safety cap — never a silent truncation.FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on the second anniversary of release.
FAQs
Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools
We found that @mindstone/mcp-server-google-analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.