Skip to main content
Glama
luminarylane

GA4 MCP Server

by luminarylane

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GA4_PROPERTY_IDNoDefault GA4 property ID (optional, can also pass per-tool)
GA4_CREDENTIALS_PATHYesPath to service account JSON key file

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
ga4_list_propertiesA

List all GA4 properties accessible by the service account. Returns property IDs and display names.

ga4_get_reportA

Run a custom GA4 report with any combination of dimensions and metrics.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. dimensions: Comma-separated dimension names (e.g., "date", "sessionSource,sessionMedium", "pagePath", "country", "deviceCategory"). Default: "date". metrics: Comma-separated metric names (e.g., "sessions,totalUsers,screenPageViews", "bounceRate,averageSessionDuration,conversions"). Default: "sessions,totalUsers,screenPageViews". days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20, max: 100).

ga4_get_top_pagesA

Get top pages by sessions. Shows page path, sessions, users, pageviews, bounce rate, and average session duration.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20).

ga4_get_traffic_sourcesA

Get traffic sources breakdown by source/medium. Shows sessions, users, bounce rate, and conversions per traffic source.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20).

ga4_get_conversionsA

Get conversion events and their counts. Shows which events are firing and how often, broken down by event name.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20).

ga4_get_realtimeA

Get realtime active users and current events on the site. Shows what's happening RIGHT NOW — active users, top pages, traffic sources.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var.

ga4_compare_periodsA

Compare current period vs previous period for key metrics. Shows absolute values and percentage change for each metric.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. metrics: Comma-separated metrics to compare (default: sessions, users, pageviews, bounce rate, avg session duration, conversions). days: Period length in days (default: 28). Compares last N days vs the N days before that.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation4/5

Each special-purpose tool targets a distinct analytical view (top pages, traffic sources, conversions, realtime, period comparison), and ga4_get_report is explicitly generic. While ga4_get_report could theoretically replicate the specialized tools, its purpose is clearly different, so confusion is unlikely.

Naming Consistency5/5

All tools follow the consistent ga4_<verb>_<noun> pattern with lowercase and underscores. Verbs are list, get, and compare, which is a predictable and uniform convention across the set.

Tool Count5/5

With 7 tools, the server is well-scoped for a GA4 analytics wrapper. It covers property discovery and the most common report types without unnecessary bloat or excessive minimalism.

Completeness4/5

The tool set covers property listing, common report dimensions, custom queries, realtime data, and period-over-period comparison. Advanced GA4 features like funnel analysis or user exploration are absent, but these are beyond the typical expectation for an analytics MCP server.

Maintenance

ActivitySlowing
ResponsivenessNo issues