SEO Tools: Google Analytics 4 MCP
A read-only stdio MCP server for Google Analytics 4 that allows agents to retrieve reports, traffic sources, landing pages, events, and realtime data. It supports multi-account configurations and uses OAuth with automatic refresh for authentication.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Retrieve GA4 traffic source reports
- Analyze landing page performance
- Check realtime user activity
- Query specific event data
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
seo-tools-mcp-ga4 1.8.0
{
"version": "1.8.0",
"transport": "stdio",
"identifier": "seo-tools-mcp-ga4",
"registryType": "npm",
"environmentVariables": [
{
"name": "GOOGLE_CLIENT_ID",
"format": "string",
"description": "Google OAuth client ID (Desktop app), shared with the gsc server."
},
{
"name": "GOOGLE_CLIENT_SECRET",
"format": "string",
"description": "Google OAuth client secret."
},
{
"name": "GA4_REFRESH_TOKEN",
"format": "string",
"description": "OAuth refresh token (obtained via ga4_oauth_start / ga4_oauth_finish)."
},
{
"name": "GA4_SA_JSON",
"format": "string",
"description": "Path to a service-account JSON key (alternative to OAuth)."
},
{
"name": "GA4_PROPERTY_ID",
"format": "string",
"description": "Default GA4 property id (numeric, e.g. 123456789)."
},
{
"name": "GA4_OAUTH_PORT",
"format": "string",
"description": "Loopback port for the OAuth flow (default 8586)."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"seo-tools-google-analytics-4-mcp": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4@1.8.0"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>",
"GA4_SA_JSON": "<YOUR_GA4_SA_JSON>",
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GA4_OAUTH_PORT": "<YOUR_GA4_OAUTH_PORT>"
}
}
}
}Cline
{
"mcpServers": {
"seo-tools-google-analytics-4-mcp": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4@1.8.0"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>",
"GA4_SA_JSON": "<YOUR_GA4_SA_JSON>",
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GA4_OAUTH_PORT": "<YOUR_GA4_OAUTH_PORT>"
}
}
}
}VS Code
{
"servers": {
"seo-tools-google-analytics-4-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4@1.8.0"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>",
"GA4_SA_JSON": "<YOUR_GA4_SA_JSON>",
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GA4_OAUTH_PORT": "<YOUR_GA4_OAUTH_PORT>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"seo-tools-google-analytics-4-mcp": {
"command": "npx",
"args": [
"-y",
"seo-tools-mcp-ga4@1.8.0"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>",
"GA4_SA_JSON": "<YOUR_GA4_SA_JSON>",
"GA4_PROPERTY_ID": "<YOUR_GA4_PROPERTY_ID>",
"GA4_OAUTH_PORT": "<YOUR_GA4_OAUTH_PORT>"
}
}
}
}Let your agent find its tools
Find servers like SEO Tools: Google Analytics 4 MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.