Google Analytics Mcp Server avatar

Google Analytics Mcp Server

Under maintenance

Pricing

Pay per usage

Go to Apify Store
Google Analytics Mcp Server

Google Analytics Mcp Server

Under maintenance

MCP server for Google Analytics 4. AI agents can run custom reports, check real-time data, analyze traffic sources, demographics, devices, conversions, and compare date ranges. 12 tools with GA4 Data API.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

CQ

CQ

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

4 days ago

Last modified

Share

MCP server enabling AI assistants to query Google Analytics 4 (GA4) data. 12 tools covering custom reports, real-time data, traffic sources, demographics, device breakdown, conversions, date comparisons, and funnel analysis.

Features

  • Custom reports — any combination of dimensions, metrics, date ranges, and filters
  • Real-time data — active users and events right now
  • Preset reports — top pages, traffic sources, demographics, devices, conversions
  • Date comparison — compare any two time periods with % change calculation
  • Funnel analysis — track user flow through specific page paths
  • Property discovery — list all accessible GA4 properties
  • Metadata — discover available dimensions and metrics

Input

{
"credentialsJson": "{ ... service account JSON ... }",
"propertyId": "123456789",
"toolCall": {
"name": "ga_top_pages",
"arguments": {
"start_date": "30daysAgo",
"end_date": "today",
"limit": 10
}
}
}

Tools (12)

ToolDescription
ga_run_reportCustom report with dimensions, metrics, date range, filters
ga_realtimeReal-time active users and events
ga_top_pagesTop pages by pageviews or sessions
ga_traffic_sourcesTraffic source breakdown (organic, direct, referral)
ga_user_demographicsUser demographics by country, city, or language
ga_device_breakdownDevice category split (desktop, mobile, tablet)
ga_conversionsConversion and event data
ga_date_comparisonCompare metrics between two date ranges
ga_funnelPage path funnel analysis
ga_propertiesList accessible GA4 properties
ga_metadataAvailable dimensions and metrics for the property
ga_infoServer info and connection stats

Setup

  1. Create a Google Cloud project
  2. Enable the Google Analytics Data API
  3. Create a service account and download the JSON key
  4. In GA4 Admin, add the service account email as a Viewer
  5. Pass the JSON key as credentialsJson and your property ID as propertyId

Common Queries

Top 10 pages this month:

{"name": "ga_top_pages", "arguments": {"limit": 10, "start_date": "30daysAgo"}}

Traffic sources last week:

{"name": "ga_traffic_sources", "arguments": {"start_date": "7daysAgo"}}

Month-over-month comparison:

{"name": "ga_date_comparison", "arguments": {
"metrics": ["totalUsers", "sessions", "screenPageViews"],
"period1_start": "30daysAgo", "period1_end": "today",
"period2_start": "60daysAgo", "period2_end": "31daysAgo"
}}