SEO Tools: Google Analytics 4 MCP Server
by antohinsio.github.antohins/seo-tools-mcp-ga4v1.8.0
Google Analytics 4: reports, traffic sources, landing pages, events, realtime (read-only).
context tax
queued
security
queued
cold start
queued
freshness
Maintained39d ago
Install SEO Tools: Google Analytics 4 MCP server
Install in Claude Code
claude mcp add seo-tools-mcp-ga4 -e GOOGLE_CLIENT_SECRET='<google-client-secret>' -e GA4_REFRESH_TOKEN='<ga4-refresh-token>' -- npx -y seo-tools-mcp-ga4Install in Cursor
{
"mcpServers": {
"seo-tools-mcp-ga4": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4"
],
"env": {
"GOOGLE_CLIENT_SECRET": "<google-client-secret>",
"GA4_REFRESH_TOKEN": "<ga4-refresh-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"seo-tools-mcp-ga4": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4"
],
"env": {
"GOOGLE_CLIENT_SECRET": "<google-client-secret>",
"GA4_REFRESH_TOKEN": "<ga4-refresh-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"seo-tools-mcp-ga4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4"
],
"env": {
"GOOGLE_CLIENT_SECRET": "<google-client-secret>",
"GA4_REFRESH_TOKEN": "<ga4-refresh-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"seo-tools-mcp-ga4": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4"
],
"env": {
"GOOGLE_CLIENT_SECRET": "<google-client-secret>",
"GA4_REFRESH_TOKEN": "<ga4-refresh-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GOOGLE_CLIENT_ID | — | — | Google OAuth client ID (Desktop app), shared with the gsc server. |
| GOOGLE_CLIENT_SECRET | — | yes | Google OAuth client secret. |
| GA4_REFRESH_TOKEN | — | yes | OAuth refresh token (obtained via ga4_oauth_start / ga4_oauth_finish). |
| GA4_SA_JSON | — | — | Path to a service-account JSON key (alternative to OAuth). |
| GA4_PROPERTY_ID | — | — | Default GA4 property id (numeric, e.g. 123456789). |
| GA4_OAUTH_PORT | — | — | Loopback port for the OAuth flow (default 8586). |
Freshness
Maintained — last maintenance signal 39d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-01 · 39d ago · GitHub
Latest release
2026-08-25 · 46d ago · GitHub · v1.8.0
Package published
no data · npm/PyPI
Registry entry updated
2026-08-25 · 46d ago · official registry · v1.8.0
FAQ
›How do I install the SEO Tools: Google Analytics 4 MCP server in Claude Code?
Run: claude mcp add seo-tools-mcp-ga4 -e GOOGLE_CLIENT_SECRET='<google-client-secret>' -e GA4_REFRESH_TOKEN='<ga4-refresh-token>' -- npx -y seo-tools-mcp-ga4. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does SEO Tools: Google Analytics 4 require an API key?
Yes. It expects GOOGLE_CLIENT_SECRET, GA4_REFRESH_TOKEN, of which 2 are secrets.
›Can I use SEO Tools: Google Analytics 4 as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is SEO Tools: Google Analytics 4 in the official MCP registry?
Yes, as io.github.antohins/seo-tools-mcp-ga4.
Alternatives to SEO Tools: Google Analytics 4
Other data & analytics MCP servers.