G

Ga4 SEO MCP

by GermaniU · io.github.GermaniU/ga4-seo-mcp

Enables AI agents to plan and, only when writes are explicitly enabled, apply a site's Google Analytics 4 and Search Console measurement setup — property and web stream creation, key events, custom dimensions, DNS verification, sitemap submission and a PageSpeed baseline — while remaining read-only by default.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-germaniu-ga4-seo-mcp": {
      "command": "uvx",
      "args": [
        "ga4-seo-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",
        "GA4SEO_ENABLE_WRITES": "0",
        "PAGESPEED_API_KEY": "<YOUR_VALUE>",
        "DATAFORSEO_LOGIN": "<VALUE>",
        "DATAFORSEO_PASSWORD": "<YOUR_VALUE>",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "<YOUR_VALUE>",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<VALUE>",
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "MCP_AUTH_TOKEN": "<VALUE>",
        "MCP_CORS_ORIGINS": "<VALUE>",
        "MCP_ALLOWED_HOSTS": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
GOOGLE_APPLICATION_CREDENTIALS No Service account key file. Unset means Application Default Credentials from gcloud.
GA4SEO_TOOLSETS No Comma-separated toolsets to enable. Same as --toolsets. Default: admin,data,gsc,psi
GA4SEO_ENABLE_WRITES No Set to 1 to enable write tools. Same as --enable-writes. Default: 0
PAGESPEED_API_KEY secret No Recommended PageSpeed Insights API key. The anonymous quota is shared and often exhausted.
DATAFORSEO_LOGIN No DataForSEO login for the dataforseo toolset.
DATAFORSEO_PASSWORD secret No DataForSEO password for the dataforseo toolset.
GOOGLE_ADS_DEVELOPER_TOKEN secret No Google Ads developer token for the ads toolset.
GOOGLE_ADS_LOGIN_CUSTOMER_ID No Google Ads login customer ID, only when operating through a manager (MCC) account.
MCP_HOST No HTTP bind address. Default: 127.0.0.1
MCP_PORT No HTTP bind port. Default: 8000
MCP_TRANSPORT No MCP transport: stdio, streamable-http or sse. Default: stdio
MCP_AUTH_TOKEN No Require Authorization: Bearer <token> on every HTTP request.
MCP_CORS_ORIGINS No Comma-separated exact origins for a browser client. Never *.
MCP_ALLOWED_HOSTS No Comma-separated host/IP values clients use. Required when binding 0.0.0.0 and connecting over the LAN.

Similar servers