google-analytics-mcp
local MCP servergoogle-analytics-mcp is a local MCP server: GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults. Install it from pypi as google-analytics-mcp.
Installation
Terminal
claude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=... -e GA4_PROPERTY_ID=... -- uvx google-analytics-mcp
Run in your project folder. Add --scope user to use it everywhere.
Claude Desktop, Cursor & other clients
Add to claude_desktop_config.json or .cursor/mcp.json.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "...",
"GA4_PROPERTY_ID": "..."
}
}
}
}Fill in the environment variables with your own credentials.
What you need
- Runtime: Python with uv (runs with uvx).
- MCP client: Claude Code, Codex, Antigravity, Claude Desktop, Cursor or any other client that speaks MCP over stdio.
- Environment variables:
GOOGLE_APPLICATION_CREDENTIALS,GA4_PROPERTY_ID
Summary
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
google-analytics-mcp vs similar servers
| Server | Stars | Type | API key | Runtime |
|---|---|---|---|---|
| google-analytics-mcp | 242 | Local | Yes | pypi |
| mcp-ssh-manager | 493 | Local | Yes | npm |
| Avrotize | 131 | Local | No | pypi |
| UCAI | 38 | Local | Yes | pypi |
| wigolo | 5,418 | Local | Yes | npm |
Questions
It reads 2 environment variables: GOOGLE_APPLICATION_CREDENTIALS, GA4_PROPERTY_ID. Set them in your MCP config before starting the server.
Python with uv (runs with uvx), plus an MCP client such as Claude Code, Codex, Claude Desktop or Cursor.
google-analytics-mcp is a local MCP server distributed as the pypi package google-analytics-mcp.
Run: claude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=... -e GA4_PROPERTY_ID=... -- uvx google-analytics-mcp
Run: codex mcp add google-analytics-mcp --env GOOGLE_APPLICATION_CREDENTIALS=... --env GA4_PROPERTY_ID=... -- uvx google-analytics-mcp
Similar MCP servers
NameStars
- mcp-ssh-managerio.github.bvisible/mcp-ssh-manager493
- Avrotizeio.github.clemensv/avrotize131
- UCAIio.github.nirholas/abi-to-mcp38
- wigoloio.github.KnockOutEZ/wigolo5,418
- DBHubio.github.bytebase/dbhub3,574
- semio.github.Ataraxy-Labs/sem3,364
- brightdata-mcpio.github.brightdata/brightdata-mcp2,660
- jshookmcpio.github.vmoranv/jshookmcp2,021