What is the io.github.mharnett/ga4 MCP server?
Google Analytics 4 MCP: reports, realtime data, custom dimensions, data streams.
How to install io.github.mharnett/ga4
Copy-paste configuration for popular MCP clients.
transport: stdio
Config generated by PluginBench — verify against the source before use.Environment / auth
GA4_PROPERTY_IDrequiredGA4 property ID (numeric)
GOOGLE_APPLICATION_CREDENTIALSrequiredPath to service account JSON credentials file
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}Windsurf
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"ga4": {
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}VS Code
.vscode/mcp.json
{
"servers": {
"ga4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-ga4"
],
"env": {
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}Claude Code
claude mcp add ga4 --env GA4_PROPERTY_ID=<YOUR_GA4_PROPERTY_ID> --env GOOGLE_APPLICATION_CREDENTIALS=<YOUR_GOOGLE_APPLICATION_CREDENTIALS> -- npx -y mcp-ga4Related MCP servers
MCP server for Microsoft Advertising (Bing Ads) — campaigns, keywords, and reports
View repository →Google Ads MCP with MCC support: 35 tools for campaigns, keywords, reporting, GAQL.
View repository →Google Search Console MCP: search analytics, URL inspection, site management.
View repository →GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.
View repository →MCP server for LinkedIn Campaign Manager — campaigns, creatives, and analytics
View repository →Reddit Ads MCP: campaigns, ad groups, ads, reporting, and audience targeting.
View repository →