Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<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
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<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
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"com-kkvlabs-ga4-gsc-mcp": {
"command": "npx",
"args": [
"-y",
"ga4-gsc-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<VALUE>",
"GA4_PROPERTY_ID": "<VALUE>",
"GSC_SITE_URL": "<VALUE>",
"BING_WEBMASTER_API_KEY": "<YOUR_VALUE>",
"PAGESPEED_API_KEY": "<YOUR_VALUE>",
"BRAND_TERMS": "<VALUE>",
"GA4_GSC_MCP_NO_HINTS": "<VALUE>",
"GA4_GSC_MCP_DEMO": "<VALUE>",
"GA4_GSC_MCP_CONFIG_DIR": "<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.
| Name | Required | Description |
|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to a service account key or other ADC JSON file. The server uses this first if set; otherwise it falls back to a login saved by `npx ga4-gsc-mcp auth` or gcloud Application Default Credentials. |
| GA4_PROPERTY_ID | No | Default GA4 property, so you can leave `ga4_property` out. |
| GSC_SITE_URL | No | Default Search Console site, e.g. `sc-domain:example.com`. |
| BING_WEBMASTER_API_KEY secret | No | Bing Webmaster Tools API key. Adds the nine `bing_` tools. |
| PAGESPEED_API_KEY secret | No | Google API key with the PageSpeed Insights API enabled, for a higher `page_speed` quota (works without one at low volume). |
| BRAND_TERMS | No | Comma-separated brand terms, e.g. `acme,acme widgets,acmee`. Used by `top_queries` and `quick_wins` when `brand` is specified. |
| GA4_GSC_MCP_NO_HINTS | No | Set to 1 to hide the one-line pointer to the hosted version in CLI output. |
| GA4_GSC_MCP_DEMO | No | Set to `1` to use built-in fake data for example.com; no network calls at all. |
| GA4_GSC_MCP_CONFIG_DIR | No | Where `auth` saves the refresh token (default `~/.config/ga4-gsc-mcp`). |