Run reports, query real-time data, list dimensions and metrics from Google Analytics 4 — AI-native web analytics access.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"google-analytics": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-google-analytics",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the _ping tool to verify google tasks credentials by calling a lightweight read endpoint. used internally by aerostack to validate credentials”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
Run reports, query real-time data, list dimensions and metrics from Google Analytics 4 — AI-native web analytics access.
Give your AI agents full access to Google Analytics 4. Run standard reports with dimensions, metrics, date ranges, and filters. Query real-time active users, discover available dimensions/metrics, analyze funnels, and create pivot tables — all through natural language.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-google-analytics
| Tool | Description |
|---|---|
_ping | Verify GA4 connectivity by fetching property metadata |
run_report | Run a standard report with dimensions, metrics, date ranges, filters, and ordering |
get_realtime_report | Get real-time data — active users, pages, countries from the last 30 minutes |
get_metadata | List all available dimensions and metrics for the property (with optional text filter) |
run_funnel_report | Analyze user drop-off across a sequence of funnel steps |
run_pivot_report | Create a cross-tabulation pivot table of dimensions and metrics |
| Variable | Required | Description | How to Get |
|---|---|---|---|
GOOGLE_SERVICE_ACCOUNT_JSON | Yes | Full JSON key file content for a GCP service account with Analytics access | console.cloud.google.com → IAM & Admin → Service Accounts → Create → Keys → Add Key → JSON |
GA4_PROPERTY_ID | Yes | GA4 property ID (numeric, e.g. "123456789") | analytics.google.com → Admin → Property Settings → Property ID |
Required roles: Add the service account email as a Viewer on the GA4 property: analytics.google.com → Admin → Property Access Management → Add User.
GOOGLE_SERVICE_ACCOUNT_JSON (paste the full JSON) and GA4_PROPERTY_ID under Project → Secrets"How many active users did my site get in the last 7 days?"
"Show me the top 10 pages by pageviews this month"
"What countries are my users coming from? Break down by device category"
"How many users are on my site right now? Show by page"
"What dimensions and metrics are available for my property?"
"Show me a funnel from page_view → add_to_cart → purchase for the last 30 days"
"Create a pivot report of sessions by country and device category"
"Compare organic vs paid traffic sources for the last 14 days"
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-google-analytics \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-GOOGLE-SERVICE-ACCOUNT-JSON: {"type":"service_account",...}' \
-H 'X-Mcp-Secret-GA4-PROPERTY-ID: 123456789' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"run_report","arguments":{"metrics":["activeUsers","sessions"],"dimensions":["date"],"start_date":"7daysAgo","end_date":"today"}}}'
analytics.readonly OAuth scope — this MCP cannot modify your GA4 configurationMIT
Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-google-analytics
Sub-50ms globally · Zero cold start
@aerostack
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
by @aerostack
Query product analytics, build audience cohorts, and surface funnel insights from Amplitude with AI-powered analysis.
by @aerostack
Manage incidents, on-call schedules, and escalation policies in PagerDuty — AI-driven incident response and alerting.
The GA4 MCP exposes task and list tools mapped to reporting workflows. For custom GA4 reports with arbitrary dimension/metric combinations, use the runReport endpoint via a direct Google Analytics Data API connector.
create_task_list sets up a named checklist; create_task adds line items with due dates and notes. Claude can build a structured GA4 audit checklist and update_task each item as findings are confirmed.
Yes. Wire complete_task into a conditional workflow: Claude reads a metric value, evaluates it against a threshold, and calls complete_task if the condition passes — closing the loop without manual updates.
The current tool set is task-management focused. Real-time GA4 data queries (runRealtimeReport) are not exposed as dedicated tools in this MCP. Use the GA4 Data API directly for live traffic monitoring.