Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add google-analytics-4 --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' -- npx -y @mindstone/mcp-server-google-analytics~/.codex/config.toml
[mcp_servers.google-analytics-4]
command = "npx"
args = ["-y", "@mindstone/mcp-server-google-analytics"]
env = { GOOGLE_APPLICATION_CREDENTIALS = "<GOOGLE_APPLICATION_CREDENTIALS>" }
# codex mcp add google-analytics-4 --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' -- npx -y @mindstone/mcp-server-google-analytics~/.cursor/mcp.json
{
"mcpServers": {
"google-analytics-4": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"google-analytics-4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"google-analytics-4": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"google-analytics-4": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"google-analytics-4": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}Environment variables
GOOGLE_APPLICATION_CREDENTIALS
Replace the placeholders with your own credentials and keep them out of version control.