Skip to content
MCP server
Registry

GA4 SEO MCP Server

SEO and site measurement: GA4, Search Console, PageSpeed, keywords. Read-only unless enabled.

GA4 SEO MCP scores 70 (Good), licensed MIT and written in Python. It installs as a local process. It declares 1 tool. Filed under Data and analytics. GitHub shows 1 stars. Package registries report about 147 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by germaniuMITPython1 stars
Trust score
70Good
Trust score 70 of 100, Good

Good trust

70 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 70 comes from

22 + 20 + 4 + 10 + 4 + 10 = 70. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity4 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 4 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "germaniu-ga4-seo-mcp": {      "command": "uvx",      "args": [        "ga4-seo-mcp"      ],      "env": {        "GOOGLE_APPLICATION_CREDENTIALS": "",        "GA4SEO_TOOLSETS": "admin,data,gsc,psi",        "GA4SEO_ENABLE_WRITES": "0",        "PAGESPEED_API_KEY": "YOUR_PAGESPEED_API_KEY",        "DATAFORSEO_LOGIN": "",        "DATAFORSEO_PASSWORD": "YOUR_DATAFORSEO_PASSWORD",        "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_GOOGLE_ADS_DEVELOPER_TOKEN",        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": ""      }    }  }}

Environment variables

NameRequiredNotes
GOOGLE_APPLICATION_CREDENTIALSOptionalPath to a service account key file. Leave unset to use Application Default Credentials from gcloud.
GA4SEO_TOOLSETSOptionalComma-separated toolsets: admin,data,gsc,psi,dataforseo,ads.
GA4SEO_ENABLE_WRITESOptionalSet to 1 to register tools that create, update, delete, submit or verify. Off by default.
PAGESPEED_API_KEYSecretOptionalPageSpeed Insights API key. Recommended: the anonymous quota is shared and often exhausted.
DATAFORSEO_LOGINOptionalDataForSEO login, for the dataforseo toolset.
DATAFORSEO_PASSWORDSecretOptionalDataForSEO password, for the dataforseo toolset.
GOOGLE_ADS_DEVELOPER_TOKENSecretOptionalGoogle Ads developer token, for the ads toolset.
GOOGLE_ADS_LOGIN_CUSTOMER_IDOptionalManager (MCC) customer ID, only when operating through a manager account.
GOOGLE_APPLICATION_CREDENTIALSRequiredPath of the mounted credentials file inside the container.
GA4SEO_TOOLSETSOptionalComma-separated toolsets: admin,data,gsc,psi,dataforseo,ads.
GA4SEO_ENABLE_WRITESOptionalSet to 1 to register tools that create, update, delete, submit or verify. Off by default.
PAGESPEED_API_KEYSecretOptionalPageSpeed Insights API key. Recommended: the anonymous quota is shared and often exhausted.
DATAFORSEO_LOGINOptionalDataForSEO login, for the dataforseo toolset.
DATAFORSEO_PASSWORDSecretOptionalDataForSEO password, for the dataforseo toolset.
GOOGLE_ADS_DEVELOPER_TOKENSecretOptionalGoogle Ads developer token, for the ads toolset.
GOOGLE_ADS_LOGIN_CUSTOMER_IDOptionalManager (MCC) customer ID, only when operating through a manager account.

Tools1Tool docs quality grade F

All capabilities

About

English Β· EspaΓ±ol

ga4-seo-mcp β€” SEO and site measurement for AI agents, end to end

SEO and measurement for AI agents: GA4 + Search Console + PageSpeed (Core Web Vitals) + keyword research, with optional, guarded writes. An open source Model Context Protocol server for SEO and Google Analytics 4: your agent can query Search Console (queries, pages, sitemaps), audit Core Web Vitals with PageSpeed Insights and run keyword research (DataForSEO, Google Ads Keyword Planner), next to your GA4 reports. Most MCP servers for Google read your data; this one can also set it up: property, web stream, key events, custom dimensions, Search Console DNS verification, sitemap and a PageSpeed baseline β€” read-only until you say otherwise.

License: MIT MCP Python CI PRs Welcome

GA4 SEO MCP server ga4-seo-mcp MCP server

Tags: mcp-server Β· ga4 Β· google-analytics Β· search-console Β· seo Β· pagespeed Β· core-web-vitals Β· keyword-research Β· technical-seo Β· seo-audit Β· sitemaps Β· claude-code Β· cursor


πŸ”Ž What you can ask (SEO & analytics)

Questions an agent can answer with this server, and the tool that does the work:

Ask your agentTool
"Which queries get many impressions but rank just off page one (around positions 8–20)?"sc_top_queries β€” clicks, impressions, CTR and average position per query; the agent filters the range
"Which pages bring the most organic clicks?"sc_page_performance
"Which queries bring traffic to this page, and what should I strengthen in its content?"sc_query_breakdown_by_page
"Does the home page pass Core Web Vitals on mobile?"psi_audit β€” lab Core Web Vitals plus real-user (CrUX) data when available; psi_field_data_only for the field data alone
"Is my sitemap submitted, and does it have errors?"sc_list_sitemaps
"What keyword ideas and monthly volumes are there around these topics?"kw_ideas / kw_volume (DataForSEO) or kw_ideas_gads / kw_volume_gads (Google Ads Keyword Planner) β€” optional toolsets, off by default
"Run a full SEO and performance audit of this site."the seo_360_audit prompt: Search Console + GA4 + PageSpeed in one pass

All of these are read-only. See the full tool list.


πŸ’‘ Why this one?

Launching a site means the same chores every time: create the GA4 property and its web stream, mark the key events, register custom dimensions, add the domain to Search Console, publish a DNS TXT record, verify it, submit the sitemap, and record a PageSpeed baseline. ga4-seo-mcp turns that into one plan your agent shows you, and one confirmation.

ga4-seo-mcpGoogle's official GA4 MCPsearch-console-mcpgoogle-seo-mcp
GA4 reports (Data API)βœ…βœ…βœ…βœ…
Search Consoleβœ…β€”βœ… (+ Bing)βœ…
PageSpeed Insights / CrUXβœ…β€”βœ…βœ…
Create GA4 property + web streamβœ…β€”β€”β€”
Create key events / custom dimensionsβœ…β€”β€”βœ…
Search Console DNS verificationβœ…β€”β€”β€”
One-call site plan β†’ apply (idempotent)βœ… bootstrap_site_measurementβ€”β€”β€”
Read-only by defaultβœ… write tools are not even registeredread-only onlysee its docsβœ… read-only mode
Toolsetsβœ…β€”β€”βœ…
LanguagePythonPythonTypeScriptTypeScript

Based on each project's README on 2026-10-19; "β€”" means we did not find it documented. Corrections welcome. Those projects go wider than this one (Bing, AdSense, WordPress, GEO audits…); this one goes deeper on setting up measurement.

🀝 Need this done for you?

This server is built and maintained by Germani Uicab. If you'd rather not run it yourself, ServerStack Solutions can get your GA4 + Search Console measurement ready: a written plan, property and key events configured, the DNS verification and sitemap in place, and a PageSpeed baseline β€” with a QA pass before handover.


Extras: optional keyword research with DataForSEO (exact long-tail volumes) and Google Ads Keyword Planner (free, bucketed volumes), with es-MX defaults that you can override.


⚑ Quick start

1. Install uv 0.13.4 or newer β€” the client launches the server with uvx; nothing else to install.

2. Log in with the minimum scopes. The CLI prints the exact gcloud command for the toolsets you enable:

uvx ga4-seo-mcp auth-command --client-id-file=oauth-client.json
# gcloud auth application-default login --client-id-file=oauth-client.json --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/webmasters.readonly

Run the printed command. Google blocks Analytics and Search Console scopes on gcloud's built-in OAuth client, so you need your own (a one-time, few-minute setup) or a service account β€” both are explained in docs/AUTH.md.

3. Check everything before connecting a client (read-only, changes nothing):

uvx ga4-seo-mcp doctor
# [ok] credentials found: Credentials via Application Default Credentials
# [ok] access token refreshed
# [ok] token has the 2 scope(s) these toolsets need
# [ok] admin: <n> account(s) visible on the first page
# [ok] data: responded (<n> metrics in the schema)
# [ok] gsc: <n> site(s) visible
# [ok] psi: no Google login needed; PAGESPEED_API_KEY set
# all checks passed

4. Add it to your client (Claude Code shown; others below):

claude mcp add ga4-seo -- uvx ga4-seo-mcp

Ask: "List my GA4 properties and show last week's sessions for the first one."


🧰 Toolsets, scopes and tools

Enable only what you need with --toolsets (or GA4SEO_TOOLSETS). Default: admin,data,gsc,psi. Only the tools of active toolsets are registered, and the OAuth scopes follow.

ToolsetWhatScopes (read-only)Extra scopes with --enable-writesTools (read + write)
adminGA4 Admin API: accounts, properties, streams, key events, custom dimensions, Ads links, bootstrap_site_measurementanalytics.readonlyanalytics.edit9 + 10
dataGA4 Data API: reports, realtime, top pages, events, traffic sources, portfolioanalytics.readonlyβ€”8 + 0
gscSearch Console: queries, pages, sitemaps, domain add + DNS verificationwebmasters.readonlywebmasters, siteverification5 + 3
psiPageSpeed Insights: Lighthouse lab + CrUX field datanone (PAGESPEED_API_KEY recommended)β€”2 + 0
dataforseoDataForSEO keyword ideas and exact volumes (paid)none (DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD)β€”2 + 0
adsGoogle Ads Keyword Planner (needs pip install 'ga4-seo-mcp[ads]')adwordsβ€”2 + 0

Tool counts from the real registry: 24 with the defaults, 37 with --enable-writes, 8 with --toolsets data, 41 with every toolset and writes. The full list with descriptions is in docs/TOOLS.md (generated from the registry and checked in CI).

Prompts: audit_ga4_setup, seo_360_audit, portfolio_performance_digest and launch_site_measurement (the guided flow: plan β†’ your confirmation β†’ apply β†’ DNS verification β†’ sitemap β†’ PageSpeed baseline).

bootstrap_site_measurement

bootstrap_site_measurement(site_url="https://example.com", account_id="123456789",
                           property_display_name="Example", time_zone="America/Mexico_City",
                           currency_code="USD", key_events=["generate_lead"],
                           custom_dimensions=[{"parameter_name": "plan_type", "display_name": "Plan type"}])
  • apply=False (default): a plan. Read-only and always registered. It finds the existing property and web stream by the site's domain, the key events and custom dimensions already declared, and the Search Console domain property, and lists what would be created.
  • apply=True: executes the plan. Only works when the server runs with --enable-writes; otherwise it fails before touching anything. Idempotent: it skips what exists, so you can re-run it. Returns a step-by-step report with the measurement ID (G-…) and the DNS TXT token.
  • DNS verification (sc_verify_site_dns) and the sitemap (sc_submit_sitemap) stay explicit follow-up steps: you have to publish the TXT record first.

πŸ”’ Security model

Defaults are safe for a single user on a laptop. Details and threat model: SECURITY.md.

  • Read-only by default. Without --enable-writes (or GA4SEO_ENABLE_WRITES=1), tools that create, update, delete, submit or verify are not registered at all β€” the model cannot call what does not exist.
  • MCP annotations on every tool: readOnlyHint on reads, destructiveHint on deletes and updates, idempotentHint where repeating is harmless, openWorldHint everywhere. Clients that honor them can auto-approve reads and ask before writes.
  • Minimum scopes: each Google client requests only the scope of the call it makes; auth-command asks only for the scopes of your toolsets.
  • HTTP transport (--transport streamable-http): binds to 127.0.0.1, DNS-rebinding protection on, CORS off unless MCP_CORS_ORIGINS, and an optional bearer token MCP_AUTH_TOKEN (401 without it). Listening on 0.0.0.0 without a token prints a warning, and LAN clients need MCP_ALLOWED_HOSTS or the rebinding protection answers 421.
  • Secrets (DataForSEO, Ads developer token, PageSpeed key) come only from environment variables or a chmod 600 file, and are never logged or returned in errors.

βš™οΈ Configuration

VariableDefaultDescription
GOOGLE_APPLICATION_CREDENTIALSβ€”Service account key file. Unset = Application Default Credentials from gcloud.
GA4SEO_TOOLSETSadmin,data,gsc,psiSame as --toolsets.
GA4SEO_ENABLE_WRITES01 = same as --enable-writes.
PAGESPEED_API_KEYβ€”Recommended: the anonymous PageSpeed quota is shared and often exhausted (429).
DATAFORSEO_LOGIN, DATAFORSEO_PASSWORDβ€”dataforseo toolset.
GOOGLE_ADS_DEVELOPER_TOKENβ€”ads toolset, or ~/.config/ga4-seo-mcp/dev-token with chmod 600.
GOOGLE_ADS_LOGIN_CUSTOMER_IDβ€”Only when operating through a manager (MCC) account.
MCP_TRANSPORTstdiostdio, streamable-http or sse.
MCP_HOST / MCP_PORT127.0.0.1 / 8000HTTP bind address and port. A specific non-loopback address is added to the allowed Host headers; 0.0.0.0 is not, so set MCP_ALLOWED_HOSTS for LAN clients.
MCP_AUTH_TOKENβ€”Require Authorization: Bearer <token> on every HTTP request.
MCP_CORS_ORIGINSβ€”Comma-separated exact origins for a browser client. Never *.
MCP_ALLOWED_HOSTSβ€”Comma-separated host/IP values clients use (e.g. 192.168.1.10). Required when binding 0.0.0.0 and connecting over the LAN; DNS-rebinding protection rejects everything else with 421.

Copy .env.example as a starting point.


πŸ”Œ Connect your client

Every client launches the server over stdio. Add --enable-writes to args only for the session where you actually want to set up a site.

Claude Code

claude mcp add ga4-seo -- uvx ga4-seo-mcp
# with options:
claude mcp add ga4-seo -e PAGESPEED_API_KEY=your-key -- uvx ga4-seo-mcp --toolsets admin,data,gsc,psi

Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "ga4-seo": {
      "command": "uvx",
      "args": ["ga4-seo-mcp"],
      "env": { "PAGESPEED_API_KEY": "your-key" }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "ga4-seo": {
      "type": "stdio",
      "command": "uvx",
      "args": ["ga4-seo-mcp"]
    }
  }
}

Docker (stdio). Mount your credentials file read-only β€” the ADC file from gcloud or a service account key β€” and run as your own user so the container can read a 0600 file:

docker run -i --rm --user "$(id -u):$(id -g)" \
  -v ~/.config/gcloud/application_default_credentials.json:/creds/credentials.json:ro \
  -e GOOGLE_APPLICATION_CREDENTIALS=/creds/credentials.json \
  ghcr.io/germaniu/ga4-seo-mcp

HTTP (several clients sharing one server):

MCP_AUTH_TOKEN=$(openssl rand -hex 32) uvx ga4-seo-mcp --transport streamable-http
# endpoint: http://127.0.0.1:8000/mcp  (send Authorization: Bearer <token>)

🩹 Troubleshooting

SymptomCause and fix
This app is blocked / access_denied during gcloud ... logingcloud's built-in client cannot request Analytics or Search Console scopes. Use your own OAuth client (--client-id-file) and add yourself as a Test User of its consent screen β€” docs/AUTH.md.
cloud-platform scope is required but not requestedUse the command printed by ga4-seo-mcp auth-command: gcloud needs cloud-platform in the list. The server itself never requests it.
403 ... API has not been used in projectEnable the Google Analytics Admin API, Google Analytics Data API and Search Console API in your quota project, then gcloud auth application-default set-quota-project my-gcp-project.
403 ... does not have sufficient permissions for this propertyAdd your user (or the service account email) to the GA4 property or Search Console site.
ga4-seo-mcp doctor says the token is missing scopesYou logged in before enabling a toolset or writes. Re-run the auth-command output.
Write tools do not show upStart the server with --enable-writes. It is off by default on purpose.
PageSpeed Insights error 429The anonymous quota is shared by everyone. Create an API key and set PAGESPEED_API_KEY.
Keyword Planner volumes look rounded (10, 30, 170, 210…)Google Ads reports bucketed volume for accounts without active spend. Use the dataforseo toolset for exact numbers.
A deleted GA4 property still appearsdelete_property is a soft delete: Google keeps it in the trash for 35 days (list_properties(include_deleted=True)).
HTTP answers 421 Invalid Host headerDNS-rebinding protection. Connect with the host you bound (127.0.0.1/localhost, or the MCP_HOST address).
HTTP answers 401Send Authorization: Bearer $MCP_AUTH_TOKEN.

πŸ“š Documentation

πŸ§ͺ Development

uv sync --all-extras
uv run ruff check . && uv run ruff format --check . && uv run pytest
uv run python scripts/smoke_stdio.py --expect 24   # real stdio initialize + tools/list

πŸ“„ License

MIT. Not affiliated with or endorsed by Google. Google Analytics, Search Console and PageSpeed Insights are trademarks of Google LLC.

Frequently asked questions

What is GA4 SEO MCP Server?

SEO and site measurement: GA4, Search Console, PageSpeed, keywords. Read-only unless enabled.

How do I install GA4 SEO MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. GA4 SEO MCP Server runs locally from the PyPI package ga4-seo-mcp with the command uvx ga4-seo-mcp.

Is GA4 SEO MCP Server free and open source?

Yes. GA4 SEO MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does GA4 SEO MCP Server support remote (HTTP) connections?

No remote endpoint is listed for GA4 SEO MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does GA4 SEO MCP Server provide?

GA4 SEO MCP Server provides 1 tool: bootstrap_site_measurement. See the full tool list for descriptions and parameters.

How is GA4 SEO MCP Server's trust score calculated?

GA4 SEO MCP Server scores 70 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

β€”Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server