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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/luminarylane/ga4-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server