gsc-mcp
The gsc-mcp server is a comprehensive SEO and web analytics toolkit integrating Google Search Console, GA4, CrUX, schema validation, and more — enabling AI assistants like Claude to access, analyze, and act on private site data.
Search Console Property Management
List all GSC properties and get permission details for specific properties.
Search Performance Analytics
Query clicks, impressions, CTR, and position data with dimensions (query, page, device, country)
Compare periods (week-over-week, month-over-month), detect anomalies via z-score analysis
Analyze performance in Google Discover, News, and AI Overviews across all search types
SEO Diagnostics & Opportunity Identification
Identify quick-win pages (positions 4–15 with below-benchmark CTR)
Diagnose traffic drops with root-cause classification (ranking loss, CTR collapse, demand decline)
Find striking-distance queries (positions 8–15), detect keyword cannibalization (HHI scoring), surface lost queries (80%+ click drop), and scan for parasite SEO and concentration risks
URL Inspection & Indexing
Inspect single or batch URLs (up to 10) for indexing status, canonical issues, fetch errors, and robots.txt blocking
Submit single or batch URLs to the Google Indexing API (true HTTP batching with quota tracking) and to IndexNow (Bing, Yandex, etc.)
Sitemap Management
List, submit, delete, and audit sitemaps; cross-reference sitemap URLs against 90 days of GSC indexed data
Google Analytics 4 (GA4)
Analyze organic landing pages, traffic sources, page-level metrics, real-time active users, audience breakdowns, converting pages, and multi-step conversion funnels
Cross-Platform Analysis (GSC + GA4)
Traffic health checks comparing GSC clicks vs. GA4 organic sessions (detects tracking gaps)
Per-page opportunity scoring joining GSC and GA4 data
Composite 0–100 page health score combining GSC, GA4, CrUX, and schema data
Content briefs with top queries, question queries, and GA4 engagement metrics
Core Web Vitals (CrUX)
Fetch LCP, INP, CLS, FCP, and TTFB for any public URL, including 40 weeks of historical trends and LCP subpart decomposition
Schema & Structured Data
Validate JSON-LD structured data on public URLs and generate Schema.org JSON-LD blocks for common types
Additional Technical SEO Tools
AI crawler visibility audit (robots.txt and llms.txt)
PageSpeed Insights audits
SEO drift monitoring (baseline snapshots with 17-rule diffs)
Content quality scoring against E-E-A-T heuristics
Hreflang validation, meta/viewport/security header audits, and preload/bfcache audits
Google Business Profile deprecation linting
Provides tools for querying Google Analytics 4 data such as organic landing pages, traffic sources, page performance, real-time users, and conversion funnels.
Provides tools for querying search analytics, inspecting URLs, managing sitemaps, submitting URLs for indexing, and running SEO analysis.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gsc-mcpwhich pages are crawled but not indexed?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gsc-mcp
Google Search Console MCP server with 57 tools covering search analytics, URL inspection, the Google Indexing API, IndexNow, Google Analytics 4, Core Web Vitals (CrUX), sitemap auditing, JSON-LD schema validation and generation, SEO drift monitoring, composite health scoring, on-page content/technical audits, AI crawler visibility, GBP deprecation detection, and PageSpeed Insights integration. Built on Python 3.11+ and FastMCP.
TL;DR: Install with uvx gsc-mcp-tools, point at your GSC service account, and ask Claude things like "which pages on my site are crawled but not indexed? Submit them." The server handles the Google API calls, batching, retries, and quota tracking. All outputs are structured JSON so Claude can reason across results without parsing ambiguity.
No SEO expertise required. You can ask "run a full site audit", "why did my traffic drop last week?", or "which queries are close to page one?" and Claude guides the analysis, explains every metric, and tells you what to fix. See examples/ for ready-to-use prompts covering quick audits, full audits, traffic drops, keyword opportunities, and more.
Latest: v1.0.0 (57 tools, Wave C: ai_visibility_audit, gbp_deprecation_lint, pagespeed_audit + schema_validate deprecated-rich-results detection). See the full changelog.
What you can do with it
The 57 tools span thirteen families: Properties (list and inspect GSC sites), Analytics (impressions, clicks, CTR, position, anomalies, Discover and News performance), SEO (quick wins, traffic drops, cannibalization, striking-distance queries, parasite SEO risk), Inspection (URL indexing status, batch inspection, issue categorization), Indexing API (single URL submit or true HTTP batch), IndexNow (Bing/Yandex/Seznam/Naver notification), and Sitemaps (list, submit, audit coverage against GSC data). The remaining six families cover GA4 (sessions, engagement, conversions, realtime, multi-step funnels), Cross (GSC+GA4 joined health check and page analysis), CrUX (real-user Core Web Vitals + LCP subpart breakdown), Technical (JSON-LD schema validation with deprecated-rich-results detection, schema generation, AI crawler visibility audit, GBP deprecation lint, PageSpeed Insights), Drift (SEO drift monitoring with baseline snapshots and 17-rule diffs), and Content (on-page quality scoring, hreflang validation, technical meta + robots.txt audit, preload/bfcache audit).
Related MCP server: mcp-seo-audit
Tools (57)
Category | Tool | Description |
Meta |
| List all available tools |
Properties |
| List all GSC properties |
Properties |
| Get details for a specific property |
Analytics |
| Query search performance data |
Analytics |
| Aggregate totals + top queries |
Analytics |
| Compare two consecutive periods |
Analytics |
| Performance broken down by page and query |
Analytics |
| Flexible query with custom dimensions and filters |
Analytics |
| Z-score anomaly detection on daily clicks |
Analytics |
| Top pages by impressions in Google Discover |
Analytics |
| Top pages by impressions in Google News |
Analytics |
| Clicks and impressions split across web, Discover, News, image, video |
Analytics |
| Queries with searchAppearance data, graceful 400/403 fallback |
SEO |
| Pages in positions 4-15 with CTR below benchmark |
SEO |
| Queries with declining clicks, with diagnosis |
SEO |
| Traffic concentration risks and ranking opportunities |
SEO |
| Queries in positions 8-15, one push away from page 1 |
SEO |
| Queries split across multiple pages (HHI conflict score) |
SEO |
| Queries with a click drop >= 80% vs the previous period |
Inspection |
| URL indexing status via URL Inspection API |
Inspection |
| Inspect up to 10 URLs at once |
Inspection |
| Inspect URLs and categorize by issue type |
Indexing |
| Request indexing for a single URL |
Indexing |
| Request indexing for multiple URLs (true HTTP batch) |
Sitemaps |
| List submitted sitemaps |
Sitemaps |
| Submit a sitemap URL |
Sitemaps |
| Fetch details for a single sitemap |
Sitemaps |
| Delete a submitted sitemap (with safety check) |
Sitemaps |
| Fetch a sitemap, parse its URLs, cross-reference against 90 days of GSC coverage |
GA4 |
| Sessions and engagement for organic landing pages |
GA4 |
| Sessions and conversions by channel, source and medium |
GA4 |
| 7 metrics per page path, optional CONTAINS filter |
GA4 |
| Active users right now by screen, country and device |
GA4 |
| Device, country and user-type breakdowns in one batch call |
GA4 |
| Converting pages and event counts, optional event filter |
GA4 |
| Multi-step funnel report via GA4 v1alpha RunFunnelReport, conversion rate per step |
Cross |
| GSC clicks vs GA4 organic sessions ratio, flags tracking gaps and filter issues |
Cross |
| GSC+GA4 join per page with opportunity score, sorted by priority |
Cross |
| Composite 0-100 score (GSC 30 pts, GA4 25 pts, CrUX 25 pts, schema 20 pts), graceful degradation per component |
Cross |
| Per-page top queries, question queries, and GA4 session data for content planning |
CrUX |
| Real-user Core Web Vitals (LCP, INP, CLS, FCP, TTFB) for a URL from the Chrome UX Report API |
CrUX |
| Historical Core Web Vitals trend (weekly data points) for a URL |
Technical |
| Fetch any public URL and validate its JSON-LD schemas; suggests missing schemas by URL pattern |
Technical |
| Generate a Schema.org JSON-LD block for Reservation, OrderAction, DiscussionForumPosting, or ProfilePage |
Drift |
| Capture a baseline snapshot of a page (title, H1-H3, schema, canonical, CWV) stored locally in SQLite |
Drift |
| Diff a live fetch against the stored baseline and apply 17 rules (8 CRITICAL, 6 WARNING, 3 INFO) |
Drift |
| List previous comparison runs for a URL with triggered findings per run |
Content |
| Fetch a URL and score visible text against E-E-A-T heuristics: filler phrases, information density, repetition, thin content |
Content |
| Fetch a URL and validate its hreflang implementation: x-default, ISO 639-1 codes, region codes, self-ref, protocol consistency |
Content |
| Fetch a URL and audit meta tags (title, description, canonical, robots), viewport, HTML lang, security headers, robots.txt Googlebot access |
Content |
| Audit Speculation Rules, bfcache eligibility, and LCP preload signals: inline speculationrules blocks, Speculation-Rules header, link preload tags, deprecated prerender, cache-control blockers |
CrUX |
| Decompose LCP into four subparts (TTFB, resource load delay, duration, render delay) with dominant phase identification for targeted CWV remediation |
Indexing |
| Submit URLs to IndexNow (Bing, Yandex, Seznam, Naver) via one POST; SSRF-safe URL validation, skipped-invalid count, ok/partial/error verdict |
SEO |
| Scan URL paths for parasite SEO patterns matching Google's 2024-11-19 site-reputation policy: sponsored/affiliate sections, Forbes Advisor, CNN Underscored patterns, affiliate query params |
Technical |
| Check robots.txt AI crawler access (GPTBot, Anthropic-ai, PerplexityBot, Google-Extended, CCBot, 9 agents) and llms.txt presence for an origin |
Technical |
| Scan a page for deprecated Google Business Profile features: .business.site links, Reserve with Google, GBP appointment widgets |
Technical |
| Run a PageSpeed Insights API v5 audit: Lighthouse performance score, Core Web Vitals, top 3 improvement opportunities (requires GOOGLE_API_KEY) |
Requirements
Python 3.11+
A Google Cloud project with the Search Console API, Web Search Indexing API, and Google Analytics Data API enabled
A Service Account JSON key (recommended) or OAuth Desktop credentials
Installation
uvx gsc-mcp-toolsOr with pip:
pip install gsc-mcp-toolsTo run from source:
git clone https://github.com/FlorianBruniaux/google-search-console-mcp
cd google-search-console-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e .Configuration
Full setup guide: docs/google-setup.md covers creating a Google Cloud project, enabling APIs, creating a service account, adding it to GSC with the right permission level, and configuring GA4.
First audit prompts: docs/starter-prompt.md contains ready-to-use prompts for a full site audit, a 5-minute health check, single-page inspection, reindexing workflow, and GA4-only analysis.
Quick start (service account)
export GSC_SERVICE_ACCOUNT_PATH=/absolute/path/to/service-account.json
export GSC_SKIP_OAUTH=true
export GA4_PROPERTY_ID=123456789 # only needed for GA4 tools
export CRUX_API_KEY=AIza... # only needed for crux_page_vitals, crux_history
gsc-mcpCRUX_API_KEY is a Google API key (not a service account) with the Chrome UX Report API enabled in your GCP Console. It is separate from GSC auth and only required for CrUX tools.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"gsc-mcp": {
"command": "uvx",
"args": ["gsc-mcp-tools"],
"env": {
"GSC_SERVICE_ACCOUNT_PATH": "/absolute/path/to/service-account.json",
"GSC_SKIP_OAUTH": "true",
"GA4_PROPERTY_ID": "123456789",
"CRUX_API_KEY": "AIza..."
}
}
}
}Remove GA4_PROPERTY_ID if you are not using GA4 tools. Restart Claude Desktop after saving.
Multi-property support
To query a different GA4 property without changing the config, pass property_id directly to any GA4 or cross tool:
ga4_traffic_sources(property_id="987654321")
traffic_health_check(site="sc-domain:example.com", property_id="987654321")CLI usage (gsc-cli)
After installation, gsc-cli is available as a standalone shell command. It wraps all 57 tools from the MCP server and uses the same authentication.
# List all 57 commands
gsc-cli list
# Run any tool (all parameters are flags, no positional args)
gsc-cli get-search-analytics --site https://example.com/ --days 28
gsc-cli get-performance-overview --site https://example.com/
# Multi-value flags for list parameters
gsc-cli batch-url-inspection \
--urls https://example.com/page-1/ \
--urls https://example.com/page-2/ \
--site https://example.com/
# GA4 funnel with a JSON steps array
gsc-cli ga4-funnel \
--steps '[{"name":"Visit","event":"page_view"},{"name":"Convert","event":"purchase"}]' \
--start-date 28daysAgo \
--end-date today
# Keep the _meta diagnostic block in output
gsc-cli list-properties --meta
# Pipe to jq
gsc-cli get-search-analytics --site https://example.com/ | jq '.rows[:5]'Set GSC_SERVICE_ACCOUNT_PATH for non-interactive use (same as the MCP server). To cache OAuth credentials interactively, run:
gsc-cli auth login --allow-browserExit codes: 0 success, 1 Google API error, 2 credential/config error or invalid arguments.
Quota note:
submit-batchandsubmit-urluse the Google Indexing API (200 req/day limit). Eachgsc-clicall starts a fresh process, so cross-invocation quota tracking is not implemented. The@with_retrydecorator still catches 429s, but the in-process counter resets every call.
Claude agents and skills
The .claude/ directory ships 9 pre-built Claude Code agents and 9 skills. Each agent is wired to a single skill that defines exactly what it does: which tools to call, in what order, and how to format the output.
Agents
Agent | Skill | When to use |
|
| Weekly traffic recap, period-over-period summary |
|
| Sudden or sustained drop in clicks or impressions |
|
| Pages close to page 1 (positions 4-20) worth a push |
|
| Multiple pages competing for the same query |
|
| Crawl errors, pages not indexed, coverage gaps |
|
| Sitemap health and declared-vs-indexed coverage |
|
| JSON-LD errors blocking rich results |
|
| Full diagnostic for a single URL |
|
| AI Overview cannibalization on CTR |
To use an agent from Claude Code, ask naturally ("why did traffic drop?") or invoke it by name. Each agent loads its skill at runtime and returns a structured answer, not a narration of what it did.
Skills
Skills live in .claude/skills/ and are invokable directly via slash command. They define the exact steps, tool call sequence, and output format. Agents reference them; skills run standalone when you want to drive the workflow yourself without delegating to an agent.
Skill | Command | When to use |
|
| Weekly traffic recap, period-over-period summary |
|
| Sudden or sustained drop in clicks or impressions |
|
| Pages close to page 1 (positions 4-20) worth a push |
|
| Multiple pages competing for the same query |
|
| Crawl errors, pages not indexed, coverage gaps |
|
| Sitemap health and declared-vs-indexed coverage |
|
| JSON-LD errors blocking rich results |
|
| Full diagnostic for a single URL |
|
| AI Overview cannibalization on CTR |
|
| Review a module for clean code violations before PR |
|
| Step-by-step workflow to add a new MCP tool |
|
| Run the pytest suite with automatic failure diagnosis |
For AI assistants
The docs/machine-readable/ directory contains structured architecture docs designed to give any AI agent (Claude, Cursor, Copilot...) an accurate picture of the project without reading the full codebase:
llms.txt: quick reference covering all 54 tools, module map, security rules, test patterns, and a decision tree for common tasksadr-index.yaml: 15 Architecture Decision Records reconstructed from git historycode-map.yaml: full module/test/dependency mapconstraints.yaml: forbidden patterns (no stdlib XML on external input, no pickle for tokens, no unvalidated URLs in sitemap fetch...) and required patternstech-decisions.yaml: stack decisions by domain (auth, retry, output contract, packaging...)
Load llms.txt via your AI context or reference it in your CLAUDE.md with @docs/machine-readable/llms.txt.
Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v467 tests, all mocked (no real Google API calls needed).
Troubleshooting
uvx gsc-mcp-tools launches but no tools appear in Claude Desktop
Fully quit Claude Desktop (Cmd+Q) and reopen it. Saving the config file is not enough; the MCP process is only started on launch.
GSC_SERVICE_ACCOUNT_PATH is set but auth fails
Use an absolute path. Relative paths and ~/ tilde expansion are not resolved. Check with echo $GSC_SERVICE_ACCOUNT_PATH that the value is a full /Users/... path.
GA4 tools return "property_id required"
Either set GA4_PROPERTY_ID in your config env block, or pass property_id directly to the tool call. The env var is the default; the parameter overrides it per call.
crux_page_vitals or crux_history returns "CRUX_API_KEY not set"
CrUX tools require a separate Google API key (not the service account) with the Chrome UX Report API enabled. Create one in Google Cloud Console under Credentials, enable the API, then set CRUX_API_KEY=AIza... in your config.
Indexing API returns 403 on submit_url
The service account needs Owner-level access on the GSC property, not just Full access. Go to Search Console Settings > Users and permissions, find the service account email, and upgrade its role to Owner.
submit_batch quota warning at 180/200
The Indexing API default quota is 200 requests per day per GCP project. The tool warns at 180. To increase it, request a quota increase in Google Cloud Console under APIs & Services > Quotas.
Why an MCP server for GSC
GSC data is private. No web search agent can read it.
Given "which of my pages are wasting impressions with zero clicks?", an AI without API access has two honest options: admit it cannot answer, or guess from publicly visible signals. Neither is a diagnosis.
With this server, Claude pulls the actual numbers: /projects/ at position 10.1 with 87 impressions and 0 clicks, CTR benchmark 2.3% at that rank. That is the concrete gap between "you should optimize your meta titles" (available from any AI with internet access) and "your /projects/ page has 87 impressions and 0 clicks, rewrite the title" (requires your numbers).
Some tasks work without private data: checking indexation with site:, parsing sitemap structure, reading robots.txt. For those, any web-capable agent gets you there. But for anything that requires private GSC metrics (traffic drops, striking-distance queries, CTR anomalies, Indexing API submissions), there is no substitute for API access.
The server also handles the Google API mechanics: service account or OAuth authentication, exponential backoff on 429s and 5xx errors, true HTTP batch for indexing requests, quota tracking at 200 req/day, and structured JSON output across all 54 tools so Claude can reason across results without parsing ambiguity.
Why this exists
Two projects shaped the approach here. AminForou/mcp-gsc (Python, 1k+ stars) has strong search analytics and handles OAuth and Service Account auth cleanly, but does not include the Google Indexing API at all. Suganthan-Mohanadasan/Suganthans-GSC-MCP (Node.js) adds the Indexing API but implements submit_batch as a sequential loop with a 100ms delay between requests, not a real HTTP batch, and mixes plain-text and JSON outputs with no retry logic.
This project takes the auth and SEO patterns from the first, the Indexing API scope from the second, and closes the gaps in both. Python was the natural choice: google-api-python-client ships service.new_batch_http_request() natively, which makes true HTTP multipart batching possible without reimplementing the wire format by hand.
Feature | AminForou/mcp-gsc | Suganthan | gsc-mcp |
Google Indexing API | No | Yes (fake batch) | Yes (true HTTP batch) |
submit_batch | N/A | Sequential loop |
|
Token storage | pickle | pickle | JSON ( |
Retry on 429/5xx | No | No | Yes, exponential backoff |
Quota tracking | No | No | Yes, warns at 180/200 |
Output format | Mixed text+JSON | Mixed | 100% JSON + |
Credits
This project took inspiration from claude-seo (MIT, agricidaniel). Four components were adapted:
SSRF protection (
src/gsc_mcp/url_safety.py): the URL safety module with DNS-rebinding mitigation, IPv4 obfuscation normalization, and multi-cloud metadata endpoint blocklist, ported fromrequeststohttpx.JSON-LD generators (
schema_generatetool): the four high-leverage schema types (Reservation, OrderAction, DiscussionForumPosting, ProfilePage) adapted fromscripts/schema_generate.py.Schema templates (
src/gsc_mcp/data/schema_templates.json): 11 JSON-LD placeholder templates (VideoObject, ProductGroup, ItemList, Certification, etc.) fromschema/templates.json.SEO drift monitoring (
src/gsc_mcp/tools/drift.py): the 17-rule diff methodology fromscripts/drift_baseline.pyandscripts/drift_compare.py, credited to Dan Colta in the original CONTRIBUTORS.md.
Assets with incompatible licenses (CC BY-SA 4.0, CC BY 4.0) were excluded. See NOTICE for full attribution.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FlorianBruniaux/google-search-console-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server