mcp-server-gsc
Google Search Console MCP サーバー — AI アシスタント向け検索アナリティクス、URL インデックス管理、サイトマップ管理(SEO / LLMO)
mcp-server-gsc は、Google Search Console 用の MCP(Model Context Protocol)サーバーで、検索パフォーマンスデータを Claude や任意の MCP クライアントに接続します。AI アシスタントが検索アナリティクス(クリック数、インプレッション数、CTR、掲載順位)の照会、URL のインデックス状況やクロール状態の確認、サイトマップの管理を、会話の中で直接行えるようにします。
ツール
ツール | 機能 | 必要な入力 |
| 全ツールの一覧と認証状態を表示 — 不明な場合は最初に呼び出し | なし |
| すべての GSC プロパティを表示 | なし |
| 特定サイトの詳細情報を表示 | サイト URL |
| クリック数、インプレッション数、CTR、掲載順位の上位クエリとページ | サイト URL、期間 |
| サイトパフォーマンスの概要(合計、日次トレンド、上位 5 件) | サイト URL、期間 |
| 2 つの期間のパフォーマンスを比較 | サイト URL、2 つの日付範囲 |
| 特定ページへのトラフィックを生み出す検索語を表示 | サイト URL、ページ URL |
| 国、デバイス、クエリ、ページによるフィルタリング対応のアナリティクス | サイト URL |
| URL のクロール / インデックス状態の詳細を表示 | サイト URL、ページ URL |
| 最大 10 個の URL を一度に検査 | サイト URL、URL リスト |
| 複数 URL(最大 20 個)のインデックス問題をチェック | サイト URL、URL リスト |
| サイトのすべてのサイトマップを一覧表示 | サイト URL |
| エラーや警告を含むサイトマップの詳細情報を表示 | サイト URL |
| サイトマップの送信、削除、ステータス確認 | サイト URL、操作 |
| OAuth ブラウザログインを再実行(アカウント切り替え用) | なし |
Related MCP server: search-console-mcp
セットアップ
1. ビルド
npm install
npm run build2. Google Cloud の認証情報
Search Console API を有効にした Google Cloud プロジェクトが必要です (console.cloud.google.com → APIs & Services → Library → 「Google Search Console API」→ Enable)。
次に、以下の 2 つの認証方法のうち いずれか を選択します。
オプション A — OAuth(推奨:自分の Google アカウントでログイン)
APIs & Services → Credentials → Create Credentials → OAuth client ID → アプリケーションタイプは Desktop app を選択。
プロンプトが表示されたら、OAuth 同意画面を先に設定します(External で問題ありません。自分の Google アカウントをテストユーザーとして追加してください)。
クライアント JSON をダウンロードするか、クライアント ID とシークレットをコピーします。
環境変数で設定するか:
GSC_OAUTH_CLIENT_ID=xxxx.apps.googleusercontent.com
GSC_OAUTH_CLIENT_SECRET=GOCSPX-...または、ダウンロードした JSON を指定します:
GSC_OAUTH_CREDENTIALS=/path/to/client_secret_xxxx.json最初のツール呼び出し時(または reauthenticate ツール経由)に、Google サインイン用のブラウザウィンドウが開きます。トークンは ~/.config/mcp-server-gsc/tokens.json に保存され、自動的に更新されます。
オプション B — サービスアカウント(ヘッドレス、ブラウザ不要)
APIs & Services → Credentials → Create Credentials → Service account を作成し、JSON キーを生成します。
Search Console → Settings → Users and permissions で、各プロパティに サービスアカウントのメールアドレス をユーザーとして追加します。
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.jsonGOOGLE_APPLICATION_CREDENTIALS が設定されている場合、それが優先され、ブラウザログインは使用されません。
3. MCP クライアントへの登録
Claude Code:
claude mcp add gsc \
-e GSC_OAUTH_CLIENT_ID=xxxx.apps.googleusercontent.com \
-e GSC_OAUTH_CLIENT_SECRET=GOCSPX-... \
-- node /path/to/mcp-server-gsc/dist/index.jsClaude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"gsc": {
"command": "node",
"args": ["/path/to/mcp-server-gsc/dist/index.js"],
"env": {
"GSC_OAUTH_CLIENT_ID": "xxxx.apps.googleusercontent.com",
"GSC_OAUTH_CLIENT_SECRET": "GOCSPX-..."
}
}
}
}推奨される SEO / LLMO 向け併用ツール
このサーバーは、SEO / LLMO の用途では以下のツールと組み合わせて使用するのが最適です:
KeywordGraph MCP サーバー — Search Console のデータをリアルタイムの検索意図データと比較し、トピッククラスター分析を実行して、クエリとコンテンツの知識グラフを構築できます。接続は
https://mcp.keywordgraph.com経由で行います。例:claude mcp add --transport http keywordgraph https://mcp.keywordgraph.comSEO スキル — 両サーバーの上で高度な SEO / LLMO 分析ワークフローを追加します。
これらを組み合わせることで完全なループが実現します:このサーバーから実際のパフォーマンスデータを取得し、ユーザーが今まさに検索している内容と比較して、トピックのギャップを見つけ、コンテンツを最適化する — 最良の結果を得るには 3 つすべてを併用してください。
使用上の注意
サイト URL の形式に注意:ドメインプロパティは
sc-domain:example.com、URL プレフィックスプロパティはhttps://example.com/の形式です(Search Console に表示されているものと正確に一致させてください)。自分のプロパティを確認するにはlist_propertiesを使用します。データの遅延:Search Console のアナリティクスデータには約 2 日の遅延があります。
daysショートカットを使用する場合、期間の終了日は自動的に 2 日前になります。期間指定:アナリティクスツールでは、明示的な
startDate/endDate(YYYY-MM-DD)または末尾のdays数(デフォルト 28)のどちらも受け付けます。アカウントの切り替え:
reauthenticateツールを呼び出してください — 保存済みトークンが破棄され、ブラウザログインが再度開きます。トークンの保存場所は
GSC_CONFIG_DIRで上書きできます。
開発
npm run watch # recompile on changeソース構成:
src/index.ts— MCP サーバーとツール定義src/auth.ts— OAuth ループバックフロー、トークン永続化、サービスアカウント対応src/gsc.ts— Search Console API ヘルパー(クエリ、合計、URL 検査の診断)
Available Tools
15 toolsbatch_url_inspectionB
Inspect up to 10 URLs at once, returning crawl/index status for each.
Inputs: urls (required), siteUrl (required).
check_indexing_issuesA
Check multiple URLs for indexing problems (not indexed, blocked by robots.txt, noindex, fetch errors, canonical mismatches) and return a summary plus per-URL diagnosis.
Inputs: urls (required), siteUrl (required).
compare_search_periodsB
Compare search performance between two time periods: overall totals with absolute and percentage changes, plus an optional per-dimension breakdown of the biggest movers.
Inputs: siteUrl (required), period1EndDate (required), period2EndDate (required), period1StartDate (required), +3 more.
get_advanced_search_analyticsC
Search analytics with full control: filter by country, device, query text, or page URL; choose search type (web, image, video, news, discover), aggregation, data state, and pagination.
Inputs: siteUrl (required), days, device, country, +12 more.
get_capabilitiesA
List every tool this Google Search Console server offers and report authentication status. Call this first if unsure what is available.
Inputs: no named parameters.
get_performance_overviewB
Summary of site search performance for a period: overall totals, daily trend, and top 5 queries and pages.
Inputs: siteUrl (required), days, endDate, startDate.
get_search_analyticsB
Get top search queries and pages with clicks, impressions, CTR and average position for a time period. Without explicit dimensions it returns both top queries and top pages.
Inputs: siteUrl (required), days, endDate, rowLimit, +2 more.
get_search_by_page_queryB
Get the search queries driving traffic to one specific page, with clicks, impressions, CTR and position.
Inputs: pageUrl (required), siteUrl (required), days, endDate, +2 more.
get_site_detailsA
Get details about a specific Search Console property (verification status and permission level).
Inputs: siteUrl (required).
get_sitemapsA
List all sitemaps submitted for a property (path, last submitted/downloaded, pending status, error and warning counts).
Inputs: siteUrl (required).
inspect_url_enhancedA
Detailed crawl and index status for one URL: verdict, coverage state, robots.txt state, canonicals, last crawl time, rich results and mobile usability.
Inputs: pageUrl (required), siteUrl (required), languageCode.
list_propertiesA
List all Google Search Console properties the authenticated account can access, with permission levels.
Inputs: no named parameters.
list_sitemaps_enhancedA
Detailed sitemap information including errors, warnings, type, and per-content-type submitted/indexed counts. Optionally list the children of a sitemap index.
Inputs: siteUrl (required), sitemapIndex.
manage_sitemapsA
Submit a sitemap, delete (unsubmit) a sitemap, or fetch the status of one specific sitemap.
Inputs: action (required), siteUrl (required), feedpath (required).
reauthenticateA
Discard stored Google credentials and re-run the OAuth browser login. Use this to switch Google accounts or fix authentication errors. Opens a browser window and waits up to 5 minutes.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools are distinct (e.g., get_search_analytics vs. get_search_by_page_query vs. get_advanced_search_analytics), but some overlap exists: get_performance_overview and get_search_analytics both return top queries/pages, and get_sitemaps vs. list_sitemaps_enhanced vs. manage_sitemaps have similar names and overlapping data. Descriptions help clarify but not perfectly.
The naming generally follows a verb_noun pattern (get_capabilities, list_properties, check_indexing_issues, compare_search_periods). However, there are minor deviations like get_search_by_page_query (which is not as clean as get_search_analytics), list_sitemaps_enhanced vs. get_sitemaps (list vs. get inconsistency), and manage_sitemaps (generic verb). Overall, it's mostly consistent.
15 tools for a Google Search Console server is well-scoped. It covers authentication, properties, search analytics, indexing, URL inspection, and sitemaps. Each tool serves a distinct functional area, and 15 is within the ideal range for a comprehensive domain.
The tool surface covers core GSC workflows: property management, search analytics, URL inspection, and sitemap management. However, there is no tool for managing user permissions or creating properties (though get_site_details implies existence). Also, no tool for accessing Search Console's structured data validation or security issues, but those are niche. The missing pieces are minor and agents can work around them.
Maintenance
Related MCP Connectors
Google Search Console for AI assistants: traffic, rankings, indexing and page checks. Read-only.
Connect Google Search Console to your AI client for search analytics, URL inspection and sitemaps.
Google Search Console in your AI: overview, opportunities, index gaps, page checks, long history.
Read-only Google Search Console and Google Analytics for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI assistants to Google Search Console data for SEO analysis, including search analytics, URL inspection, sitemaps, indexing, and opportunity detection.17MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access Google Search Console search performance and index health data, including clicks, impressions, rankings, URL inspection, and sitemap management.21 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to analyze Google Search Console SEO data through natural language, including search analytics, URL inspection, sitemap management, and property management.21MIT
- AlicenseAqualityBmaintenanceProvides AI assistants with live access to Google Search Console search analytics, URL inspection, and sitemap management through real API calls.10MIT