Search Console MCP

io.github.saurabhsharma2u由 GitHub 帳號 saurabhsharma2u 發布v2.1.4更新於 Oct 29, 2026

Google Search Console + Bing + GA4 + AdSense — unified SEO intelligence for AI agents.

概覽

AI 產生的概覽

整合 Google Search Console、Bing 網站管理員工具、GA4 與 AdSense,讓助理在同一處查詢 SEO 流量、收錄狀況與廣告收益。

可以做什麼
  • 列出並管理 Google Search Console、Bing 與 GA4 中已驗證的網站和帳戶
  • 列出、提交與刪除 XML 網站地圖
  • 依查詢字詞、頁面、國家、裝置與搜尋呈現方式查詢搜尋成效,並進行期間比較、趨勢與流量下滑歸因、異常偵測,以及 GA4 電子商務與轉換漏斗指標
  • 檢查單一或批次網址的收錄、標準連結與檢索狀態,提交網址收錄並查看提交配額
  • 執行 SEO 稽核、關鍵字研究、結構化資料驗證、PageSpeed 與 Core Web Vitals 檢測、網站健康檢查,以及 Google 與 Bing 的比較
  • 產出 AdSense 收益、付款與帳戶警示報告,並以啟發式規則標記疑似生成式 AI 風格的查詢
適用情境
適合讓助理直接以即時搜尋與分析資料回答 SEO 與網站變現問題,而不必匯出 CSV,例如診斷流量下滑、找出快速見效的關鍵字、檢查收錄問題,或把廣告收益與流量變化關聯起來。
執行需求
以 stdio 在本機執行,通常透過 npx 啟動,需要 Node.js。存取 Google 需以 setup 指令完成 OAuth,或使用由 GOOGLE_APPLICATION_CREDENTIALS 指定的服務帳戶金鑰;Bing 需要 BING_API_KEY;可用 PAGESPEED_API_KEY 提高 PageSpeed 配額。AdSense 需另外授予唯讀 OAuth 權限。需要能連線至 Google 與 Bing 的 API。
安裝前請注意
會在本機保存 OAuth 更新權杖(系統鑰匙圈或加密檔案),並透過 GOOGLE_APPLICATION_CREDENTIALS 讀取 Google 服務帳戶金鑰。sitemaps_submit、sitemaps_delete、sites_manage、indexing_submit 等寫入類工具會變更搜尋引擎上的線上資料,寫入權限雖為選用,仍應審慎授予。AdSense 資料屬財務資訊。genai_query_insights 採用啟發式規則,並非官方引用資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Search Console MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🔍 Search Console MCP

Google Search Console + Bing Webmaster Tools + GA4 + AdSense — in one context window.

Stop exporting CSVs. Start asking your AI agent questions about your site's traffic, rankings, and revenue.

[License: MIT] [Tests] [Stars]


[Download MCPB Bundle]

📚 Docs · Quick Start · Tools · Backward Compatibility · Security


⚡ What's New in v2.1.4

  • 🎯 Correct-property resolution (#110): Accounts with multiple verified properties sharing one hostname (locale subfolders like /en-gb/ + /de-de/, the root property, and the sc-domain: property) could get analytics data silently returned for the wrong property — whichever colliding property the resolver happened to touch first. Resolution is now exact by property type and path; bare-domain queries rank deterministically (sc-domain: › root), and truly ambiguous requests fail with the list of matching properties instead of guessing. With thanks to Alcip for the outstanding root-cause analysis in #110.
  • 🔐 Explicit write authorization for GSC mutation tools (#113): sitemaps_submit, sitemaps_delete and site-management calls now require an explicit webmasters write scope, offered as an inline re-authorization flow in the CLI when a tool first needs it. The server stays read-only by default at setup; you opt into write capabilities explicitly. Credit to chase-weiser88 for surfacing the missing write scope in #84.
  • 🛡️ SSE transport secured & deprecated (#114): SSE mode now binds to 127.0.0.1 by default (--host=/MCP_HTTP_HOST to override), requires a bearer token (--token=/MCP_HTTP_TOKEN, auto-generated if unset), never sends wildcard CORS, and rejects forged non-loopback Host headers (DNS-rebinding guard). SSE mode is deprecated and will be removed in the next release — prefer the default stdio transport.
  • 🪲 find_quick_wins prompt typing (#112): min_impressions was declared as a number, but MCP clients must send prompt arguments as strings — so every use errored with expected number, received string. It is now string-typed and coerced internally (1000 default preserved).
What's New in v2.1.2
  • 🤖 GenAI Query Insights (genai_query_insights): Surfaces likely generative-AI / AI-Mode / conversational "fanout" queries across Google and Bing. This is custom heuristic logic — no official API is provided by Google or Bing for GenAI citation data, so it flags prompt verbs, follow-ups, acknowledgements, and conversational phrasing on the regular query data both engines already return. See docs →
  • 🪲 analytics_query fix: rowLimit is now honored instead of being silently ignored (previously always returned up to 1000 rows); limit remains as a backward-compatible alias.
What's New in v2.1.0
  • 💰 Google AdSense Integration: Earnings reports, payments and account alerts via setup --engine=adsense. Enabling AdSense requires you to approve a separate adsense.readonly OAuth scope; your existing GSC, Bing, and GA4 configuration remains unchanged until you opt in.
  • 🔐 OAuth-only AdSense auth: The AdSense Management API supports user OAuth only — setup now validates access live and rejects unsupported service-account configs with actionable guidance. Multi-account users get explicit publisher-account selection with full pagination (>100 accounts).
  • 📊 adsense_report upgrades: Custom startDate/endDate now override preset dateRanges, plus a new orderBy parameter (-ESTIMATED_EARNINGS) for sorted revenue reports.
  • 🧪 End-to-end MCP test suite: The built server binary is now tested over stdio and SSE exactly like an MCP host would drive it — handshake, tool schemas, error envelopes, and multi-account resource behavior (11 e2e tests wired into CI).
What's New in v2.0.x
  • 💰 Google AdSense Integration: Earnings reports, payments and account alerts via setup --engine=adsense. Enabling AdSense requires you to approve a separate adsense.readonly OAuth scope; your existing GSC, Bing, and GA4 configuration remains unchanged until you opt in.
  • 🔐 OAuth-only AdSense auth: The AdSense Management API supports user OAuth only — setup now validates access live and rejects unsupported service-account configs with actionable guidance. Multi-account users get explicit publisher-account selection with full pagination (>100 accounts).
  • 📊 adsense_report upgrades: Custom startDate/endDate now override preset dateRanges, plus a new orderBy parameter (-ESTIMATED_EARNINGS) for sorted revenue reports.
  • 🧪 End-to-end MCP test suite: The built server binary is now tested over stdio and SSE exactly like an MCP host would drive it — handshake, tool schemas, error envelopes, and multi-account resource behavior (11 e2e tests wired into CI).
What's New in v2.0.x
  • 📦 MCPB One-Click Bundle Support (.mcpb): Drag and drop bundle installation for Claude Desktop.
  • ⚡ Parallel Fetch Engine (engine: "all"): Multi-engine queries fetch Google, Bing, and GA4 concurrently with 50%+ lower latency.
  • 🔄 100% Backward Compatibility: All ~96 legacy tool names continue to work seamlessly via our fallback router. Read Backward Compatibility Guide →

Why this exists

Site data lives in four different silos. Answering one question — "did my ad revenue drop because of a traffic dip or a lower RPM?" — usually means logging into four dashboards, exporting four CSVs, and doing VLOOKUPs by hand.

Search Console MCP puts GSC, Bing, GA4, and AdSense behind one set of tools your AI agent can call directly, and does the analysis (cannibalization, anomaly detection, revenue attribution) before the data ever reaches your context window.

BeforeAfter
Data4 dashboards, manual exports1 unified context
AnalysisManual VLOOKUPs & pivot tablesDeterministic SEO + revenue math, server-side
AccountsConstant re-login20+ accounts, auto-resolved per site
InsightRaw rows, agent guessesCurated signals (opportunity scores, anomalies)

⚡ Quick Start

bash
npx search-console-mcp setup

This opens your browser, authorizes your Google account, and stores your credentials securely (see Security). Then add it to your MCP client config (Claude Desktop, Cursor, Antigravity, etc.):

json
{  "mcpServers": {    "search-console": {      "command": "npx",      "args": ["search-console-mcp"]    }  }}

Restart your client — and try one of the prompts below.


💬 Try it

Paste these straight into your agent:

"My traffic dropped this week vs. last. Find exactly when it started and which pages are responsible."

"Find keywords for example.com ranking positions 8–15 with 1,000+ impressions — my best quick wins."

"Check for keyword cannibalization — are two of my pages competing for the same query?"

"Run seo_audit on my top pages: which have high search visibility but poor CTR?"

More example prompts
  • "Run a full SEO health check (site_health_check), segmented by Brand vs Non-Brand."
  • "Fetch my top 5 pages by impressions and run pagespeed_analyze — any correlation with declining rankings?"
  • "Compare Google vs Bing performance for the last 30 days (compare_engines) — where is Bing winning?"
  • "Submit my latest URLs to Google and IndexNow using indexing_submit with method: "index_now"."

🔌 Connect your accounts

PlatformMethodSetup
Google Search ConsoleOAuth (recommended)npx search-console-mcp setup
Google Search ConsoleService AccountSet GOOGLE_APPLICATION_CREDENTIALS — details
Bing Webmaster ToolsAPI Keyexport BING_API_KEY="..." — get a key
Google Analytics 4Service Accountnpx search-console-mcp setup --engine=ga4
Google AdSenseOAuth (read-only)npx search-console-mcp setup --engine=adsense — headless servers

Manage everything from the CLI:

bash
npx search-console-mcp accounts listnpx search-console-mcp accounts add-site [email protected] --site=example.comnpx search-console-mcp accounts remove [email protected]

When your agent queries a site, the server auto-resolves which account owns it — no manual switching. Multi-account docs →

Headless servers (Docker, CI, VPS)

AdSense cannot use service accounts, and config files are machine-encrypted — so authorize once on any machine with a browser and transfer the grant:

bash
# 1. On your laptop (after setup --engine=adsense):npx search-console-mcp adsense-export
# 2. On the server (prints a ready-to-run command on step 1):npx search-console-mcp adsense-import --token='...' --publisher-id='accounts/pub-...'

The token is stored encrypted on the server and auto-refreshes — no browser needed again. Setup over SSH also works directly: when no browser is detected, setup prints the authorization URL plus ssh -L 3000:localhost:3000 port-forward instructions instead of failing.


🖥️ Run tools from the CLI

Search Console MCP also exposes registered MCP tools as direct CLI commands. Use the run subcommand to list tools, inspect tool-specific arguments, and print results as JSON, CSV, or an ASCII table:

bash
# List registered toolsnpx search-console-mcp run --help
# Show options for one toolnpx search-console-mcp run analytics_query --help
# Run an SEO audit with JSON outputnpx search-console-mcp run seo_audit --siteUrl=https://example.com --type=quick_wins
# Print array results as CSV or a tablenpx search-console-mcp run analytics_query --siteUrl=https://example.com --startDate=2026-06-01 --endDate=2026-06-30 --dimensions=date,query --format=csvnpx search-console-mcp run sites_list --engine=all --format=table
Service Account setup (for servers/automation)
  1. Create a service account in the Google Cloud Console
  2. Generate a JSON key
  3. Add the service account email as a user in Search Console with "Full" or "Restricted" access
  4. export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"

🛠 Tools (Fluent Domain Architecture)

Search Console MCP v2.0 features 7 Fluent Domain Tools that handle all SEO, Analytics, Inspection, and Indexing operations cleanly:

Fluent ToolParameters / ActionsDescription
sites_listengine: "all" | "google" | "bing"Lists verified sites across search engines in parallel
sites_manageaction: "add" | "delete", siteUrl, engineAdds or removes site properties
accounts_manageaction: "list" | "add_site" | "remove"Configures multi-account profiles
sitemaps_listsiteUrl, feedUrl, engineFetches sitemap status and indexing state
sitemaps_submitsiteUrl, feedUrl, engineSubmits sitemaps to GSC & Bing
sitemaps_deletesiteUrl, feedUrl, engineRemoves sitemaps
analytics_querysiteUrl, engine, dimensions, metricsMulti-engine search & GA4 analytics query
analytics_comparemode: "period_over_period" | "trends" | "drop_attribution"Analyzes period deltas, trend shifts, and drop causes
analytics_anomaliessiteUrl, thresholdStatistical detection of traffic spikes/drops
inspection_inspectsiteUrl, urls, engineGoogle URL inspection & Bing URL info
pagespeed_analyzeurl, strategy, cwvOnlyCore Web Vitals and PageSpeed Insights audits
indexing_submiturls, method: "standard" | "index_now" | "remove"Instantly indexes URLs via IndexNow or Google/Bing API
indexing_statussiteUrl, type: "quota" | "status"Checks remaining indexing quota & URL status
seo_audittype: "quick_wins" | "striking_distance" | "cannibalization" | "low_hanging_fruit" | "lost_queries" | "recommendations" | "brand_vs_nonbrand"Comprehensive automated SEO audits
seo_keywords_researchkeywords, type: "stats" | "related" | "traffic"Keyword volumes and related keyword stats
site_health_checksiteUrl, level: "summary" | "full" | "crawl_issues"One-shot site performance & technical audit
compare_enginessiteUrlSide-by-side Google vs Bing performance breakdown
genai_query_insightssiteUrl, days, engine: "google" | "bing" | "all", includePages, minImpressionsFlags likely generative-AI / conversational queries (custom heuristic, no official API)

Google AdSense Tools

ToolParametersDescription
adsense_accountsmode: "configured" | "discover", accountIdLists configured or discoverable AdSense publisher accounts
adsense_reportdateRange, startDate, endDate, dimensions, metrics, orderBy, rowLimit, accountIdEarnings, impressions, clicks, CTR & RPM with dimension breakdowns. Custom dates override dateRange.
adsense_payments_alertsaccountIdOutstanding payments and account alerts (policy issues, payment holds)

Note: accountId refers to the configured profile ID (e.g. adsense_2, as shown by accounts_manage), not a publisher resource name like accounts/pub-123.

Backward Compatibility Notice (96+ Legacy Tools)

All legacy tool names (bing_sites_list, seo_quick_wins, sitemaps_get, bing_index_now, indexing_submit_url, opportunity_matrix, etc.) continue to work transparently via our fallback router.

Read our complete Backward Compatibility & Migration Guide →


🔒 Security

  • OS keychain first — tokens stored in macOS Keychain, Windows Credential Manager, or Linux Secret Service
  • AES-256-GCM fallback — encrypted with a key derived from your machine's hardware ID; a stolen file is useless on another device
  • Minimal storage — only refresh_token and expiry_date are persisted, at mode 600
  • Silent refresh — tokens renew automatically in the background

License

MIT · Contributing guide · Backward Compatibility Guide

If this saves you a spreadsheet, consider ⭐ starring the repo.

來源:README.md,提交 7de2215

工具

25

get_started

Start here. Returns a complete map of this server's capabilities, active platforms, and recommended workflows. Call this once at the beginning of any session.

無需輸入參數。

sites_list

List verified web properties across Google Search Console, Bing Webmaster Tools, or GA4.

輸入參數engine

sites_manage

Add or delete a web property from Google Search Console or Bing Webmaster Tools.

輸入參數action必填enginesiteUrl必填

accounts_manage

Manage Google Search Console service accounts and site permissions.

輸入參數emailaction必填siteUrlaccountId

sitemaps_list

List submitted XML sitemaps and status for a site.

輸入參數enginefeedUrlsiteUrl必填

sitemaps_submit

Submit a new XML sitemap to Google Search Console and/or Bing Webmaster Tools.

輸入參數enginefeedUrl必填siteUrl必填

sitemaps_delete

Delete a sitemap from Google Search Console or Bing Webmaster Tools.

輸入參數enginefeedUrl必填siteUrl必填

analytics_query

Unified search performance query replacing single-dimension tools. Supports queries, pages, countries, devices, and search appearances.

輸入參數engineendDatefilterssiteUrl必填rowLimitstartDatedimensions

analytics_compare

Period-over-period search performance comparisons, trends, and traffic drop attributions.

輸入參數modeengineendDatesiteUrl必填startDatecompareEndDatecompareStartDate

analytics_anomalies

Detect search traffic anomalies across Google and Bing.

輸入參數engineendDatesiteUrl必填startDatethreshold

analytics_advanced

Google Analytics 4 (GA4) e-commerce, realtime metrics, user behavior, and conversion funnels.

輸入參數endDatestartDatemetricType必填propertyId必填

genai_query_insights

Detect likely generative-AI / AI-Mode / conversational fanout queries across Google and Bing. Because neither search engine exposes generative-AI citation data via its public API yet, this matches heuristic patterns (prompt verbs, follow-ups, conversational phrasing) on regular query-level performance data; it is an undercount, not an official report.

輸入參數daysenginesiteUrl必填includePagesminImpressions

adsense_accounts

List configured AdSense publisher accounts, or discover all publisher accounts the authorized user has access to.

輸入參數modeaccountId

adsense_report

Google AdSense earnings & performance report: estimated earnings, impressions, clicks, CTR and RPM with dimension breakdowns.

輸入參數endDatemetricsorderByrowLimitaccountIddateRangestartDatedimensions

adsense_payments_alerts

Outstanding AdSense payments and account alerts (policy issues, payment holds).

輸入參數accountId

inspection_inspect

Inspect indexing, canonical, and crawl status for single or batch URLs on Google or Bing.

輸入參數urls必填enginesiteUrl必填

pagespeed_analyze

Run PageSpeed Insights & Core Web Vitals performance analysis for a page.

輸入參數url必填cwvOnlycategorystrategy

indexing_submit

Submit URL(s) for indexing via Google Indexing API, Bing URL submission, or IndexNow protocol.

輸入參數keyhosturls必填enginemethodsiteUrlkeyLocation

indexing_status

Check notification status for Google Indexing API or remaining daily Bing submission quota.

輸入參數urltypeenginesiteUrl必填

seo_audit

Specialized SEO intelligence analysis (recommendations, quick wins, cannibalization, striking distance, lost queries, low CTR, brand vs nonbrand).

輸入參數type必填enginesiteUrl必填brandKeywordsminImpressions

seo_keywords_research

Keyword performance stats, related query expansion, and search volume estimates.

輸入參數typeenginecountrysiteUrlkeywords必填language

schema_validate

Validate structured data (JSON-LD, Microdata, RDFa) for a given webpage URL.

輸入參數url必填

site_health_check

Comprehensive health audit across Google Search Console and Bing Webmaster Tools.

輸入參數levelenginesiteUrl

compare_engines

Cross-engine performance matrix comparing Google Search Console vs Bing Webmaster Tools.

輸入參數limitendDatesiteUrl必填dimensionstartDate

diagnostics

Run connectivity diagnostics for all connected accounts. Use this to troubleshoot '0 results' or authentication issues.

無需輸入參數。

版本歷史

2
  1. v2.1.4最新Oct 21, 2026
  2. v2.1.3Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分