ga4-mcp-server

naihaoko/ga4-mcp-server

3.2

If you are the rightful owner of ga4-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This project sets up a Model Context Protocol (MCP) server that connects to Google Analytics 4 (GA4) using the `@modelcontextprotocol/sdk` and the `@google-analytics/data` library.

Tools

Functions exposed to the LLM to take actions

query_analytics

Queries Google Analytics 4 data based on provided property ID, dimensions, metrics, and date ranges.

get_realtime_data

Retrieves real-time active user data for your Google Analytics 4 property.

get_traffic_sources

Retrieves traffic source data (e.g., channel, source, medium) for your Google Analytics 4 property.

get_user_demographics

Retrieves user demographic data (e.g., country, city, device category) for your Google Analytics 4 property.

get_page_performance

Retrieves page performance data (e.g., page path, page title, views) for your Google Analytics 4 property.

get_conversion_data

Retrieves conversion data for your Google Analytics 4 property.

get_custom_report

Retrieves a custom report from Google Analytics 4 based on provided property ID, dimensions, metrics, and date ranges.

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

No resources