mcp-seo-audit

SEO audit and Google Search Console MCP server with 23 tools. Search analytics, URL inspection, Indexing API, Core Web Vitals (CrUX), striking distance keywords, keyword cannibalization detection, branded query analysis, and automated site audits.

mcp-seo-audit

A Model Context Protocol (MCP) server for SEO auditing with Google Search Console, Indexing API, Chrome UX Report, PageSpeed Insights, local Lighthouse, robots.txt checks, sitemap analysis, on-page SEO inspection, crawl audits, and live site analysis. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.

Forked from AminForou/mcp-gsc and expanded into a broader technical SEO and performance audit server with 30 tools and a full test suite.

mcp-seo-audit MCP server

What It Does

CategoryToolsDescription
Property Managementlist_properties, add_site, delete_siteList, add, and remove GSC properties
Search Analyticsget_search_analytics, get_advanced_search_analytics, get_performance_overview, get_search_by_page_query, compare_search_periodsQuery clicks, impressions, CTR, position with filtering, dimensions, and period comparison
URL Inspectioninspect_url, batch_inspect_urlsCheck indexing status, crawl info, canonical, robots for one or many URLs
Indexing APIrequest_indexing, request_removal, check_indexing_notification, batch_request_indexingSubmit/remove URLs from Google's index via the Indexing API
Sitemapsget_sitemaps, submit_sitemap, delete_sitemapList, submit, and delete sitemaps
Core Web Vitalsget_core_web_vitalsLCP, FID, CLS, INP, TTFB via the Chrome UX Report (CrUX) API
Performance Auditsget_pagespeed_insights, run_lighthouse_auditRun PageSpeed Insights and local Lighthouse audits with category scores and failing audit summaries
Technical SEOinspect_robots_txt, analyze_sitemap, analyze_page_seo, crawl_site_seo, audit_live_siteInspect robots.txt, validate sitemaps, extract on-page SEO signals, crawl internal pages, and run a live SEO audit without GSC access
SEO Analysisfind_striking_distance_keywords, detect_cannibalization, split_branded_queriesFind keywords at positions 5-20, detect pages competing for the same query, split branded vs non-branded traffic
Site Auditsite_auditAll-in-one report: sitemap health, indexing status, canonical mismatches, performance summary
AuthreauthenticateSwitch Google accounts by clearing cached OAuth tokens

30 tools total.


Setup

1. Google API Credentials

OAuth (recommended)

  1. Go to Google Cloud Console
  2. Enable the Search Console API and Web Search Indexing API
  3. Create an OAuth 2.0 Client ID (Desktop app)
  4. Download client_secrets.json

Service Account

  1. Create a service account in Google Cloud Console
  2. Download the JSON key file
  3. Add the service account email to your GSC properties

2. Install

git clone https://github.com/GiorgiKemo/mcp-seo-audit.git
cd mcp-seo-audit
python -m venv .venv

# Activate:
# macOS/Linux: source .venv/bin/activate
# Windows:     .venv\Scripts\activate

pip install -r requirements.txt

3. Configure Your MCP Client

Claude Code (~/.claude/settings.json)

{
  "mcpServers": {
    "seo-audit": {
      "command": "/path/to/mcp-seo-audit/.venv/bin/python",
      "args": ["/path/to/mcp-seo-audit/gsc_server.py"],
      "env": {
        "GSC_OAUTH_CLIENT_SECRETS_FILE": "/path/to/client_secrets.json",
        "PAGESPEED_API_KEY": "your-google-api-key",
        "CRUX_API_KEY": "your-google-api-key"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

Same JSON structure — see Claude Desktop MCP docs for config file location.

4. Optional: Performance API Keys

For field and lab performance data, set CRUX_API_KEY and PAGESPEED_API_KEY in the env block:

"env": {
  "GSC_OAUTH_CLIENT_SECRETS_FILE": "/path/to/client_secrets.json",
  "CRUX_API_KEY": "your-google-api-key",
  "PAGESPEED_API_KEY": "your-google-api-key"
}

You can also set GOOGLE_API_KEY; the server uses it as the PageSpeed Insights fallback key.


Environment Variables

VariableRequiredDefaultDescription
GSC_OAUTH_CLIENT_SECRETS_FILEOAuthclient_secrets.jsonPath to OAuth client secrets
GSC_CREDENTIALS_PATHService accountservice_account_credentials.jsonPath to service account key
GSC_SKIP_OAUTHNofalseSet to true to skip OAuth and use service account only
GSC_DATA_STATENoallall = fresh data matching GSC dashboard, final = confirmed data (2-3 day lag)
CRUX_API_KEYNononeGoogle API key for Core Web Vitals (CrUX)
PAGESPEED_API_KEYNononeGoogle API key for PageSpeed Insights / Lighthouse API calls
GOOGLE_API_KEYNononeFallback source for PAGESPEED_API_KEY
LIGHTHOUSE_CHROME_PATHNoauto-detectOptional explicit path to Chrome/Chromium for local Lighthouse CLI

Example Prompts

"List my GSC properties"
"Show search analytics for cdljobscenter.com last 28 days"
"Find striking distance keywords for my site"
"Detect keyword cannibalization"
"Run a full site audit"
"Check Core Web Vitals for cdljobscenter.com"
"Run PageSpeed Insights for https://example.com"
"Run a local Lighthouse audit for https://example.com"
"Inspect robots.txt for https://example.com"
"Analyze https://example.com/sitemap.xml"
"Analyze on-page SEO for https://example.com/jobs"
"Crawl https://example.com and report duplicate titles"
"Run a live SEO audit for https://example.com"
"Inspect indexing status of these URLs: /jobs, /companies, /pricing"
"Request indexing for https://mysite.com/new-page"
"Compare search performance this month vs last month"

Tests

81 tests covering all 30 tools with mocked Google/API/web-audit calls:

# Activate venv first
python -m pytest test_gsc_server.py -v

What Changed From the Original

  • 30 tools — added PSI, local Lighthouse, robots.txt inspection, sitemap validation, page SEO analysis, crawl audits, and live site audits
  • 7 bug fixes — sort direction mapping, origin/URL detection, empty rows crash, API key leak, blocking sleep, service caching, stale cache on reauth
  • 81-test QA suite — coverage for GSC, CrUX, PSI, Lighthouse CLI, robots, sitemaps, crawl audits, and live-audit composition
  • Security — API keys redacted from error messages
  • Performance — Google API service objects cached, async sleep instead of blocking, plus lab-performance tooling on top of CrUX field data

License

MIT. See LICENSE.

Based on AminForou/mcp-gsc.

相關伺服器

NotebookLM 網頁匯入器

一鍵將網頁和 YouTube 影片匯入 NotebookLM。超過 200,000 位使用者信賴。

安裝 Chrome 擴充功能