Labsco
MCP SERVER

Google Analytics

by ruchernchong

Ask a GA4 property for page views, active users, events or session behaviour over a date range — and build the reports the presets miss out of metrics, dimensions and a filter.

SEO, Web & Product AnalyticsVerified
Summary
The four questions people actually ask GA4 are already tools, so you stop composing requests to answer them.

getPageViews, getActiveUsers, getEvents and getUserBehavior each take a date range and nothing else, which covers the routine reads without a trip through the report builder; runReport is there for the ones that do not fit. Everything is read-only, and the property is fixed by GA_PROPERTY_ID rather than passed per call — no tool here takes a property identifier, so a second property means a second server.

What it is

Five read tools over a single GA4 property: four preset reports covering the routine questions, and runReport for anything you can express as metrics plus dimensions plus a dimension filter.

What you get
  • Page view metrics for a date range, optionally broken out by dimensions you name
  • Active users for a date range
  • Event metrics for a date range, narrowed to a single eventName when you pass one
  • Session duration and bounce rate for a date range
  • Any report expressible as metrics, dimensions and a dimensionFilter, through runReport
Requirements

A GA4 property and a Google service account authorised on it: GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY and GA_PROPERTY_ID.

Setup effort

One command plus a key — npm install -g mcp-server-google-analytics, then supply credentials