ga4
CommunityMCP server by mharnett · updated · ★ 0 · 107 downloads a week
Google Analytics 4 MCP: reports, realtime data, custom dimensions, data streams. ga4 is a community project by mharnett, not verified by a company domain.
Last commit 22 days ago
MIT: permissive, fine for commercial use
Clear description, published package or server URL, original repository
Not checked yet. What we check
What you need
| Setting | Needed | What it is |
|---|---|---|
GA4_PROPERTY_IDEnvironment variable | Required | GA4 property ID (numeric) |
GOOGLE_APPLICATION_CREDENTIALSEnvironment variable | Required | Path to service account JSON credentials file |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Install ga4
Built from the published package, never by AIclaude mcp add ga4 -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -- npx -y mcp-ga4Run in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID",
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS"
}
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID",
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS"
}
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID",
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS"
}
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add ga4 --env GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID --env GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -- npx -y mcp-ga4{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID",
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS"
}
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add ga4 npx -y mcp-ga4Gemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the ga4 block.
Alternatives to ga4
All alternatives →The Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.
Agent-Native Amplitude/Mixpanel - connect data sources, prompt for charts
Google Ads, Meta Ads, Google Analytics (GA4) & Search Console MCP server by Ryze AI
Create and edit Excel files with AI: charts, PivotTables, formulas. No Excel needed.
MCP gateway for AI models (OpenAI, Grok, DeepSeek, Claude and other function-calling LLMs) and for web pages and apps: one authenticated, observable endpoint in front of your MCP servers with routing, scopes, rate limits and metrics.
MCP server for AI-assisted Deepnote notebook creation and manipulation
ga4: common questions
How do I install ga4?
In Claude Code run claude mcp add ga4 -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -- npx -y mcp-ga4. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is ga4 the official server?
ga4 is a community project by mharnett, not verified by a company domain.
Is ga4 free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is ga4 safe to use?
It scores 30 of 100. Grades: maintenance A, licence A, quality C. The security check has not run for it yet. Review the code before you install. How grades work.
What are alternatives to ga4?
Similar MCP servers: Power BI Authoring MCP Server (Local), Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Excel MCP Server.
Does ga4 work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
