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

Search Console MCP

A Model Context Protocol (MCP) server that transforms how you interact with Google Search Console, Bing Webmaster Tools, and Google Analytics 4. Stop exporting CSVs and start asking questions.

📚 View Documentation


License: MIT Tests

Why use this?

❌ The Old, Broken Way

  • Data Silos: Manually checking Google, then Bing, then GA4.
  • Manual Correlation: Exporting 3 different CSVs and using VLOOKUPs to see if your #1 ranking page actually converts.
  • Switching Fatigue: Logging in and out to manage multiple clients or properties.
  • AI Context Limits: Uploading giant spreadsheets that hit context limits and cause model hallucinations.

✅ The Search Console MCP Way

  • Platform Synergy: GSC + Bing + GA4 in a single context window. Stop exporting, start analyzing.
  • Deterministic Intelligence: The server performs the complex SEO math (cannibalization, Z-score anomalies, striking distance) so your AI agent gets curated insights, not raw data piles.
  • Cross-Platform ROI: Use the Opportunity Matrix to prioritize keywords that have high search visibility (GSC) but poor on-site engagement (GA4).
  • Zero-Config Multi-Account: Connect 20+ accounts. The server automatically resolves the correct credentials for every site URL.

One Server. Three Platforms. Infinite Accounts. Actionable Intelligence.


🎯 Magic Prompts

Copy and paste these into your MCP client (Claude Desktop, etc.) to see the intelligence engine in action:

🔍 The Traffic Detective

"My traffic dropped this week compared to last. Use the anomaly detection and time-series tools to find exactly when the drop started and which pages are responsible."

🎯 The "Striking Distance" Hunter

"Find keywords for https://example.com where I'm ranking in positions 8-15 but have at least 1,000 impressions. These are my best opportunities for a quick traffic boost."

⚔️ The Cannibalization Cleaner

"Check for keyword cannibalization. Are there any queries where two or more of my pages are competing and splitting the traffic? Suggest which one should be the primary authority."

📈 The SEO Opportunity Scoreboard

"Analyze my top 50 keywords for the last 90 days. Rank them by a custom 'Opportunity Score' (Impressions / Position). Give me the top 5 specific pages to focus on."

📊 The Executive Health Check

"Run a full SEO health check for my site. Segment the results by Brand vs. Non-Brand and give me 3 high-impact actions for the upcoming week."

⚡ The Speed vs. Ranking Correlator

"Fetch the top 5 pages by impressions. For these pages, run a PageSpeed audit. Is there any correlation between low performance scores and recently declining positions?"

🔀 Multi-Engine Comparison

"Compare my performance between Google and Bing for the last 30 days. Which keywords are ranking better on Bing but have lower traffic on Google?"

🎯 Bing Opportunity Finder

"Show me keywords where I'm in the top 5 on Google but not ranking on Bing. These are my easy Bing wins."

⚠️ Google Dependency Check

"Am I too dependent on Google? Check my click share across both engines and flag any keywords where over 85% of traffic comes from Google."

💰 The ROI Prioritizer (GSC + GA4)

"Run an opportunity_matrix for my top 20 pages. Which high-visibility pages have the lowest engagement or conversion rates? These are my conversion optimization priorities."


🔐 Authentication (Desktop Flow)

Search Console MCP uses a Secure Desktop Flow. This provides high-security, professional grade authentication for your Google account:

  • Multi-Account Support: Connect multiple Google and Bing accounts. The server automatically picks the right one for each site.
  • System Keychain Primary: Tokens are stored in your OS's native credential manager (macOS Keychain, Windows Credential Manager, or Linux Secret Service).
  • AES-256-GCM Hardware-Bound Encryption: Fallback storage is encrypted with AES-256-GCM using a key derived from your unique hardware machine ID. Tokens stolen from your machine cannot be decrypted on another computer.
  • Silent Background Refresh: Tokens auto-refresh silently when they expire.

🚀 Step 1 — Initiate Login

Run the following command to start the authorization process:

bash
npx search-console-mcp setup

The CLI will:

  1. Briefly start a secure local server to handle the redirect.
  2. Open your default web browser to the Google Authorization page.
  3. Automatically fetch your email after authorization to label your credentials securely.

🔑 Step 2 — Logout & Management

To wipe your credentials from both the keychain and the disk:

bash
# Logout of the default account
npx search-console-mcp logout

# Logout of a specific account
npx search-console-mcp logout user@gmail.com

🔑 Alternative: Service Account (Advanced)

For server-side environments or automated tasks where interactive login isn't possible, you can use a Google Cloud Service Account.

Setup:

  1. Create Service Account: Go to the Google Cloud Console and create a service account.
  2. Generate Key: Click "Keys" > "Add Key" > "Create new key" (JSON). Download this file.
  3. Share Access: In Google Search Console, add the service account's email address (e.g., account@project.iam.gserviceaccount.com) as a user with at least "Full" or "Restricted" permissions.
  4. Configure: Point the server to your key file:
    bash
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/key.json"
    

🔑 Bing Webmaster Tools (API Key)

To access Bing data, you simply need an API Key.

Setup:

  1. Get Your API Key: Go to Bing Webmaster Tools Settings.
  2. Configure: Set the API key in your environment:
    bash
    export BING_API_KEY="your-api-key-here"
    
  3. IndexNow: Bing tools also support IndexNow for instant URL submission.

📊 Google Analytics 4 (GA4)

Connect your GA4 properties to correlate ranking data with user behavior.

Setup:

  1. Run Setup: npx search-console-mcp setup --engine=ga4
  2. Auth Method: Choose Service Account (JSON Key). This is the recommended method for server-side integrations.
    • Service Account: You must add the service account email as a user in GA4 Admin > Property Settings > Property Access Management.
  3. Property Selection: The tool will automatically fetch all available GA4 properties for your account and let you select one from a list. You can also enter a Property ID manually if needed.

👥 Multi-Account Management

Manage multiple Google and Bing accounts from the CLI:

bash
# List all connected accounts
npx search-console-mcp accounts list

# Remove an account
npx search-console-mcp accounts remove --account=marketing@company.com

# Add a site boundary to an account
npx search-console-mcp accounts add-site --account=marketing@company.com --site=example.com

When your AI agent queries a site, the server automatically resolves which account to use. Learn more →


🛡️ Fort Knox Security

This MCP server implements a multi-layered security architecture:

  • Keychain Integration: Primarily uses the macOS Keychain, Windows Credential Manager, or libsecret (Linux) to store tokens.
  • Encrypted Config: Account configuration is stored in ~/.search-console-mcp-config.enc using AES-256-GCM encryption.
  • Machine Fingerprinting: The encryption key is derived from your unique hardware UUID and OS user. The encrypted file is useless if moved to another machine.
  • Minimalist Storage: Only the refresh_token and expiry_date are stored.
  • Legacy Support: Automatically detects credentials from older versions (tokens files, environment variables).
  • Strict Unix Permissions: Config files are created with mode 600 (read/write only by your user).

Tools Reference

Google Analytics

ToolDescription
analytics_queryMaster tool for raw data. Supports dimensions, filters, aggregationType (byPage/byProperty), dataState (final/all), and type (web/image/news/discover).
analytics_trendsDetect trends (rising/falling) for specific queries or pages.
analytics_anomaliesDetect statistical anomalies in daily traffic.
analytics_drop_attribution[NEW] Attribute traffic drops to mobile/desktop or correlate with known Google Algorithm Updates.
analytics_time_series[NEW] Advanced time series with rolling averages, seasonality detection, and forecasting.
analytics_compare_periodsCompare two date ranges (e.g., WoW, MoM).
seo_brand_vs_nonbrand[NEW] Analyze performance split between Brand vs Non-Brand traffic. (Supports Google & Bing).

SEO Opportunities (Opinionated)

ToolDescription
seo_low_hanging_fruitFind keywords ranking in pos 5-20 with high impressions.
seo_striking_distance[NEW] Find keywords ranking 8-15 (Quickest ROI wins).
seo_low_ctr_opportunities[NEW] Find top ranking queries (pos 1-10) with poor CTR.
seo_cannibalization[Enhanced] Detect pages competing for the same query with traffic conflict.
seo_lost_queries[NEW] Identify queries that lost all traffic in the last 28 days. (Supports Google & Bing).

SEO Primitives (Atoms for Agents)

These are low-level tools designed to be used by other AI agents to build complex logic.

ToolDescription
seo_primitive_ranking_bucketCategorize a position (e.g. "Top 3", "Page 1", "Unranked").
seo_primitive_traffic_deltaCalculate absolute and % change between two numbers.
seo_primitive_is_brandCheck if a query matches a brand regex.
seo_primitive_is_cannibalizedCheck if two pages are competing for the same query.

Sites & Sitemaps

ToolDescription
sites_listList all verified sites.
sites_add / sites_deleteManage properties.
sites_health_check[NEW] Run a health check on one or all sites. Checks WoW performance, sitemaps, and anomalies.
sitemaps_list / sitemaps_submitManage sitemaps.

Inspection & Validation

ToolDescription
inspection_inspectGoogle URL Inspection API (Index status, mobile usability).
pagespeed_analyzeLighthouse scores & Core Web Vitals.
schema_validateValidate Structured Data (JSON-LD).

Bing Webmaster Tools

ToolDescription
bing_sites_listList all verified sites in Bing.
bing_analytics_queryQuery search performance from Bing.
bing_opportunity_finderFind low-hanging fruit keywords on Bing.
bing_seo_recommendationsGet prioritized SEO insights for Bing.
bing_url_infoDetailed indexing and crawl info for a URL (Bing).
bing_index_now[NEW] Instantly notify search engines of changes.
bing_crawl_issuesList crawl issues detected by Bing.
bing_analytics_detect_anomaliesDetect daily spikes or drops in Bing traffic.
bing_analytics_time_seriesAdvanced time series analysis for Bing.
bing_seo_lost_queriesIdentify queries that lost significant traffic on Bing.
bing_brand_analysisAnalyze performance split between Brand vs Non-Brand traffic on Bing.
bing_sitemaps_list / bing_sitemaps_submitManage sitemaps in Bing.

Google Analytics 4 (GA4)

ToolDescription
analytics_page_performanceDetailed page metrics (sessions, engagement, views).
analytics_traffic_sourcesAnalyze sessions by Channel, Source, and Medium.
analytics_organic_landing_pagesFocused metrics for organic traffic landing pages.
analytics_content_performanceAnalyze content performance by Content Group in GA4.
analytics_conversion_funnelTop converting pages and events.
analytics_user_behaviorDevice, Country, and Engagement breakdown.
analytics_audience_segmentsNew vs Returning, Age, and OS analysis.
analytics_realtimeLive active user data by page and location.
analytics_ecommerceProduct and revenue performance.
analytics_pagespeed_correlationCorrelate GA4 metrics with PageSpeed scores.

Cross-Platform Intelligence

ToolDescription
opportunity_matrix[Flagship] Prioritize SEO tasks by combining signals from GSC, GA4, and Bing.
page_analysisJoint analysis of ranking (GSC) vs behavior (GA4) for pages.
traffic_health_checkDiagnose tracking gaps by comparing GSC clicks to GA4 organic sessions.
brand_analysisBrand vs Non-Brand split across GSC, Bing, and GA4.
compare_enginesCompare keyword performance between Google and Bing.

License

MIT Contributing

常见问题

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

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

相关 Skills

谷歌视频工具

by bwbernardweston18

热门

>

搜索与获取
未扫描4.5k
热门

股票投研9点分析框架,覆盖基本面/财务/竞品/估值/宏观/情绪等维度

搜索与获取
未扫描4.5k

SEO审计工具

by amdf01-debug

热门

搜索与获取
未扫描4.5k

相关 MCP Server

网页抓取

编辑精选

by Anthropic

热门

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

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

搜索与获取
86.6k

by Anthropic

热门

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

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

搜索与获取
86.6k

Brave 搜索

编辑精选

by Anthropic

热门

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

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

搜索与获取
86.6k

评论