seo-audit-mcp
seo-audit-mcp
Claude(または任意のMCPクライアント)に、ライブサイトの技術的SEO監査(サイトマップのカバレッジ、ページごとの問題、リダイレクトチェーン)の能力を提供するMCPサーバーです。
平易な言葉で質問すると — "mortgagecalculatortools.comを監査して、Googleに伝えられていないページを教えて" — モデルがツールを呼び出し、サイトをクロールし、具体的な答えを返します。
解決する問題
サイトのsitemap.xmlは、どのページが存在するかをGoogleに伝える方法です。ページがそこにない場合、エラーも警告も発生しません — そのページは単にインプレッションが蓄積されることがありません。手動で確認するには、ファイルシステムの一覧をXMLファイルと差分比較する必要があるため、実際には誰も行いません。
ケーススタディ:正しいと判明した25ページのギャップ
このツールを最初に適用したサイトでは、ディスク上に125個のHTMLファイルがあり、サイトマップには100個のURLがありました。25ページのギャップ — バグとして報告され、誰かに割り当てられる類の発見です。
sitemap_coverageの1回の呼び出しでギャップが浮かび上がり、サンプルに対するaudit_urlsの1回の呼び出しで説明がつきました:25ページすべてが<meta name="robots" content="noindex, follow">を保持していました。それらは意図的にインデックスから除外された2つのコンテンツクラスターであり、サイトマップがそれらを除外するのはまったく正しいことでした。その後ファイルシステムと照合:ディスク上に25のnoindexページがあり、同じ25ページがサイトマップに存在せず、noindexページが誤って含まれることはゼロでした。完璧な整合性です。
それが有用な結果です。カバレッジの数値だけ("125 vs 100")は欠陥と読まれ、誰かの1日分の時間を費やします。カバレッジにページごとのnoindexステータスを組み合わせれば、質問は1分で解決します。このツールは、見つける実際のギャップと同じくらい、排除する誤報にも価値があります — そのためaudit_urlsはURLを数えるだけでなく、ページごとにnoindexを報告します。
Related MCP server: seo-crawler-mcp
ツール
Tool | 機能 |
|
|
| URLを並行してクロールし、ページごとの問題を報告します:壊れたステータス、リダイレクトチェーン、 |
| サイトマップを、存在すると分かっているURLのリストと差分比較 → サイトマップから欠落しているもの、宣言されているが無効なもの |
| リダイレクトチェーンを追跡し、マルチホップチェーンと4xx/5xxで終わるチェーンにフラグを立てます — URL構造の変更後に使用します |
すべてのツールは、ページごとのissuesリストと集計されたissue_summaryを持つ構造化JSONを返すため、モデルは生のHTMLを読み直す代わりに件数を基に推論できます。
インストール
pip install -e .Python 3.10+が必要です。依存関係:mcp>=2.0.0、httpx。
Claude Codeに接続する
プロジェクトの.mcp.jsonに追加します(またはグローバルに使用する場合は~/.claude.json):
{
"mcpServers": {
"seo-audit": {
"command": "python",
"args": ["-m", "seo_audit_mcp"]
}
}
}Claude Desktopでは、同じブロックをclaude_desktop_config.jsonに置きます。
あとは質問するだけです:
https://example.com/sitemap.xmlのサイトマップを取得し、最初の20 URLを監査し、問題を頻度別に要約してください。
直接実行する
python -m seo_audit_mcp # stdio transport設計ノート
デモと、クライアントの本番サイトに向けられるものとの違いを生む、特筆すべき3つの決定事項があります:
クロールは設計上レート制限されています。 fetch_manyは16の同時リクエストに制限されたasyncio.Semaphoreの背後で実行され、すべてのツールが入力を制限します。その上限がないと、500 URLのサイトマップは同時に500のソケットを開き、対象ホストへの攻撃とみなされるでしょう。クロールは対象サイトが負担するコストであるため、上限はツール面から引き上げることはできません。
取得失敗によって実行が中止されることはありません。 fetch_oneはhttpx.HTTPErrorを捕捉し、例外を発生させる代わりに返されたPageAuditに記録します。200 URLのクロールでの1つの死んだホストは、199の良い結果を失う代わりに1行を劣化させるだけです。
解析は意図的に寛容です。 実際のHTMLは不正な形式であることが多いため、厳格なパーサーがクロール中に例外を発生させるのは危険です。抽出器はNoneを返す寛容な正規表現で、例外は投げません — ただし罠は処理されます:<script>と<style>の本文は、単語数と見出し抽出の前に除去されるため、JS文字列リテラル内の<h1>は見出しとして数えられず、相対canonicalはページURLに対して解決されます。
normalize_urlは意図的に末尾のスラッシュを除去しません:/aと/a/は実際に異なるページになり得るため、それらをまとめると、このツールが表面化するために存在する重複コンテンツの問題が隠れてしまいます。
テスト
pip install -e ".[dev]"
pytestこのスイートはネットワーク不要です — HTTPはhttpx.MockTransportを通じて実行されるため、CIでも飛行機内でも動作します。本番で問題になる解析のエッジケースをカバーしています:スクリプトに埋め込まれた見出し、名前空間のないサイトマップ、相対canonical、200ステータスでスタイル付きHTML 404を返すサイトマップURL、非HTMLコンテンツタイプが「タイトルがない」ページとして誤って報告されるケース。
ライセンス
MIT
Available Tools
4 toolsaudit_urlsA
Crawl a list of URLs and report per-page technical SEO issues: broken status codes, redirect chains, missing or over-length titles and meta descriptions, missing or duplicate H1, missing canonical, noindex, and thin content. Returns a per-URL breakdown plus an issue summary.
Inputs: urls (required), concurrency, timeout_seconds. Returns: object
check_redirectsA
Trace the redirect chain for each URL and flag chains longer than one hop, redirect loops, and URLs that resolve to a 4xx/5xx. Use after a site migration or a URL-structure change.
Inputs: urls (required). Returns: object
fetch_sitemapA
Fetch and parse a sitemap.xml, following sitemap-index nesting, and return every page URL it declares. Call this first when auditing a site you do not have a URL list for.
Inputs: sitemap_url (required). Returns: object
sitemap_coverageA
Compare a sitemap against a list of URLs you know exist (e.g. from the filesystem or a crawl) and report which are missing from the sitemap and which the sitemap declares but are unreachable. Missing pages are pages Google is never told about.
Inputs: known_urls (required), sitemap_url (required), verify. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct phase of an SEO audit: sitemap fetching, page-level auditing, sitemap coverage comparison, and redirect tracing. The main overlap is that audit_urls already reports redirect chains and broken status codes, which overlaps with check_redirects.
Three tools follow a clear verb_noun pattern (fetch_sitemap, audit_urls, check_redirects), but sitemap_coverage is a noun_noun exception. The inconsistent name is still readable and does not create real confusion.
Four tools is a well-scoped size for a focused SEO audit server. Each tool has a clear job, and there is no redundant filler or overwhelming number of endpoints.
The server covers sitemap parsing, on-page/technical issue auditing, sitemap coverage, and redirects, but it lacks a site-crawling or internal-link-discovery tool, which is needed to find URLs not listed in a sitemap. This is a notable gap for a full audit, though the core workflow is usable with an existing URL list.
Related MCP Connectors
Crawl websites for technical SEO audits: indexability, redirects, canonicals, JavaScript rendering.
Audit a whole website for SEO issues and broken links: page scores, a fix list and a site summary.
Audit every page of a site (titles, meta, headings, schema) and find broken links and images.
Technical SEO audits: check a page or crawl a whole site, locally or hosted. Compares crawls.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables SEO auditing and site analysis by crawling websites, identifying issues, and generating reports like sitemaps and markdown exports.54MIT
- FlicenseAqualityDmaintenanceEnables comprehensive website SEO analysis including crawling, on-page audits, site structure visualization, and content topic classification with taxonomy mapping.71-
- AlicenseAqualityCmaintenanceEnables MCP clients to crawl and audit websites for SEO and technical health, checking on-page elements, links, robots.txt, sitemaps, and duplicate metadata, then returning scores and prioritized fixes.4MIT

com.drurls/drurlsofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to audit websites for SEO, performance, security, and accessibility, rank issues with exact fixes, check what blocks Google indexing, and launch new site audits.MIT