Skip to content
Agentmart
Submit a tool

Google Analytics MCP

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

Connector by surendranb · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)★ 243
Write a review

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/surendranb-google-analytics-mcp

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

Use cases: data-analysis

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.

Tools
11 read · 0 write · 0 delete · 1 not yet classified
Secrets
1 (API keys, tokens or passwords)
Install scripts
None found
Runs as
Python package

Tools by what they do 12

Read from the source code; the running server may list different tools.

Read 11 · Look things up without changing anything.

  • check_for_updates
  • get_dimensions_by_category
  • get_ga4_data
  • get_metrics_by_category
  • get_property_schema
  • get_troubleshooting_guide
  • list_dimension_categories
  • list_metric_categories
  • list_properties
  • search_schema
  • search_skills

Not yet classified 1 · We could not tell from the name and description.

  • setup_ga4_access

Secrets and settings it asks for

Secrets: values you paste in that let it act as you.

  • GOOGLE_APPLICATION_CREDENTIALS

Other settings (environment variables or headers).

  • GA4_PROPERTY_ID

Tools (12)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • check_for_updates

    Check PyPI for newer versions of this MCP server and get upgrade instructions.

  • get_dimensions_by_category

    Return all dimensions in a specific category with their API names and descriptions. Returns: {"dimension_api_name": "description", ...} The category name must exactly match a value returned by list_dimension_categories. Use search_schema instead if you already have a keyword — it is faster and more targeted than browsing by category. Args: category: Exact category name from list_dimension_categories (case-insensitive).

  • get_ga4_data

    Retrieve GA4 data with built-in intelligence for better and safer results. Returns on success: {"data": [...], "metadata": {...}, "_skills_tip": "..."}. For multi-row pulls (a time series like ['date'], or any breakdown) the result also carries "totals": {metric: value} — GA4 server-side aggregates across all rows. Read the period figure from "totals"; do NOT sum the rows yourself. (Additive metrics sum; rate metrics are period-computed by GA4.) Returns on volume warning: {"warning": "...", "estimated_rows": N, "suggestions": [...]} Returns on error: {"error": "..."} CRITICAL WORKFLO…

  • get_metrics_by_category

    Return all metrics in a specific category with their API names and descriptions. Returns: {"metric_api_name": "description", ...} The category name must exactly match a value returned by list_metric_categories. Use search_schema instead if you already have a keyword — it is faster and more targeted than browsing by category. Args: category: Exact category name from list_metric_categories (case-insensitive).

  • get_property_schema

    Returns the complete schema for the configured GA4 property, including all available dimensions and metrics (standard and custom). Warning: This can be a very large object (10k+ tokens). Use search_schema for most discovery tasks.

  • get_troubleshooting_guide

    Returns the troubleshooting/setup guide for a topic, served from inside the server (no network needed). Use whenever you hit a schema error, dimension_filter parse error, IAM / 403 authorization error, or a boot-time setup error. Args: topic: One of "setup", "iam", or "schema".

  • list_dimension_categories

    List all dimension categories for this GA4 property, with a count of dimensions in each category. Returns: {"dimension_categories": {"Category Name": count, ...}} Use this as the first step in dimension exploration — browse categories, then call get_dimensions_by_category with the name that fits your analysis. Use search_schema instead if you already have a keyword to search for.

  • list_metric_categories

    List all metric categories for this GA4 property, with a count of metrics in each category. Returns: {"metric_categories": {"Category Name": count, ...}} Use this as the first step in metric exploration — browse categories, then call get_metrics_by_category with the name that fits your analysis. Use search_schema instead if you already have a keyword to search for.

  • list_properties

    List all GA4 properties associated with an account.

  • search_schema

    Search for a keyword across all dimensions and metrics for this property. Returns a ranked list of up to 10 matching fields scored by relevance. Returns: {"top_results": {"DIMENSION: api_name": score, "METRIC: api_name": score, ...}} Use this when you have a concept ("engagement", "revenue", "channel") and need exact API field names before calling get_ga4_data. Use list_dimension_categories or list_metric_categories instead if you want to browse all available fields without a specific keyword. Args: keyword: One or more keywords to search for (e.g., "user", "campaign revenue").

  • search_skills

    Fetch analytical recipes and how-to guides from the GA4 skills library. Skills are domain-specific playbooks for common GA4 analysis patterns — exact dimensions, metrics, filters, and interpretation logic for each use case. Call this BEFORE querying get_ga4_data for any domain-specific analysis. Available skills: gcp-setup, traffic-diagnosis, attribution-scope, channel-acquisition, content-performance, geo-device-segmentation, ecommerce-analysis, ai-referral-analysis, bot-traffic-detection, common-metric-names, filter-structures, custom-dimensions, compatible-combinations, ua-to-ga4, date-ra…

  • setup_ga4_access

    Interactively fix a broken GA4 MCP setup (missing property ID, missing or expired credentials, or missing GA4 access) by asking the user for the needed input through the client, then re-initializing without a restart. Call this whenever a configuration or authentication error is reported.

Compare and alternatives

Featured in

Signals

Stars
243
Forks
49
Open issues
2
Contributors
3
Weekly downloads
1,217
Last commit
Oct 14, 2026 (15 days ago)
Last release
Aug 18, 2026 (2 months ago)
Last package publish
Oct 14, 2026 (15 days ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.surendranb/google-analytics-mcp
Version
2.8.2
Auth
API key
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from surendranb

Cite this page

Google Analytics MCP. Agent Mart. https://agentmart.dev/connectors/surendranb-google-analytics-mcp (last updated 2026-10-24)