io.github.saurabhsharma2u/search-console-mcp

搜索与获取

by saurabhsharma2u

面向 Google Search Console 的 MCP server,支持站点、sitemaps、分析数据与 URL 检查。

什么是 io.github.saurabhsharma2u/search-console-mcp

面向 Google Search Console 的 MCP server,支持站点、sitemaps、分析数据与 URL 检查。

README

<div align="center">

🔍 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

<br/>

Download MCPB Bundle

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

</div>

⚡ 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.
<details> <summary><strong>What's New in v2.1.0</strong></summary>
  • 💰 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).
</details> <details> <summary><strong>What's New in v2.0.x</strong></summary>
  • 💰 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).
<details> <summary><strong>What's New in v2.0.x</strong></summary>
  • 📦 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 →
</details>

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?"

<details> <summary>More example prompts</summary>
  • "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"."
</details>

🔌 Connect your accounts

PlatformMethodSetup
Google Search ConsoleOAuth (recommended)npx search-console-mcp setup
Google Search ConsoleService AccountSet GOOGLE_APPLICATION_CREDENTIALSdetails
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=adsenseheadless servers

Manage everything from the CLI:

bash
npx search-console-mcp accounts list
npx search-console-mcp accounts add-site --account=you@company.com --site=example.com
npx search-console-mcp accounts remove --account=you@company.com

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

<details> <summary id="headless-servers">Headless servers (Docker, CI, VPS)</summary>

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.

</details>

🖥️ 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 tools
npx search-console-mcp run --help

# Show options for one tool
npx search-console-mcp run analytics_query --help

# Run an SEO audit with JSON output
npx search-console-mcp run seo_audit --siteUrl=https://example.com --type=quick_wins

# Print array results as CSV or a table
npx search-console-mcp run analytics_query --siteUrl=https://example.com --startDate=2026-06-01 --endDate=2026-06-30 --dimensions=date,query --format=csv
npx search-console-mcp run sites_list --engine=all --format=table
<details> <summary id="service-account-advanced">Service Account setup (for servers/automation)</summary>
  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"
</details>

🛠 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.

<details> <summary><strong>Backward Compatibility Notice (96+ Legacy Tools)</strong></summary>

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 →

</details>

🔒 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

<div align="center">

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

</div>

常见问题

io.github.saurabhsharma2u/search-console-mcp 是什么?

面向 Google Search Console 的 MCP server,支持站点、sitemaps、分析数据与 URL 检查。

相关 Skills

技能搜索

by daymade

Universal
热门

通过CCPM直接搜索、查看、安装、更新和卸载Claude Code Skill,适合查找PDF、代码审查等场景插件,也能列出已装Skill并自动执行命令返回结果。

想给Claude Code找对技能时,用它能一站式搜索、安装和管理CCPM注册表里的能力,省去到处翻找的时间。

搜索与获取
未扫描1.4k

深度研究

by daymade

Universal
热门

围绕既定模板拆题、多轮检索、整理证据表并交叉校验引用,产出格式严格、可追溯的研究报告,适合市场调研、竞品分析、政策追踪等高要求写作任务

把网页搜索、信息检索和研究分析串成一条链路,适合需要快速汇总线索、做深度判断的开发与研究工作。

搜索与获取
未扫描1.4k

标准研究员

by levnikolaevich

Universal

基于项目技术栈和 Epic/Story 需求,用 MCP Ref 检索相关 RFC、行业标准与架构模式,整理成可直接写入 Story Technical Notes 的研究结论与参考链接。

做技术方案时先让标准研究员帮你查标准与设计模式,基于 MCP Ref 产出可复用的技术注释研究,省下大量检索整理时间。

搜索与获取
未扫描559

相关 MCP Server

网页抓取

编辑精选

by Anthropic

热门

Fetch 是 MCP 官方参考服务器,让 AI 能抓取网页并转为 Markdown 格式。

这个服务器解决了 AI 直接处理网页内容时格式混乱的问题,适合需要让 Claude 分析在线文档或新闻的开发者。不过作为参考实现,它缺乏生产级的安全配置,你得自己处理反爬虫和隐私风险。

搜索与获取
89.8k

Brave 搜索

编辑精选

by Anthropic

热门

Brave Search 是让 Claude 直接调用 Brave 搜索 API 获取实时网络信息的 MCP 服务器。

如果你想让 AI 助手帮你搜索最新资讯或技术文档,这个工具能绕过传统搜索的限制,直接返回结构化数据。特别适合需要实时信息的开发者,比如查 API 更新或竞品动态。不过它依赖 Brave 的 API 配额,高频使用可能受限。

搜索与获取
89.7k

by Anthropic

热门

Puppeteer 是让 Claude 自动操作浏览器进行网页抓取和测试的 MCP 服务器。

这个服务器解决了手动编写 Puppeteer 脚本的繁琐问题,适合需要自动化网页交互的开发者,比如抓取动态内容或做端到端测试。不过,作为参考实现,它可能缺少生产级的安全防护,建议在可控环境中使用。

搜索与获取
89.2k

评论