Phiên bản
Ngôn ngữ

Search Console MCP

Tích hợp search-console-mcp — MCP server cung cấp 30+ tools cho Google Search Console, Bing Webmaster Tools, và Google Analytics 4.

📌 Đây là extension optional (Tier 1+). Tất cả chức năng GSC cốt lõi đều có sẵn qua Python scripts. MCP bổ sung thêm SEO Intelligence, Bing, GA4, và Cross-Platform analysis.

Tổng Quan

Thuộc tínhGiá trị
Packagesearch-console-mcp
Cài đặtnpx search-console-mcp setup
AuthOAuth 2.0 Desktop Flow (tự động)
CredentialOS Keychain (macOS/Windows/Linux)
Tools30+
Yêu cầuNode.js 18+, Google Search Console property

Cài Đặt

Bước 1: Setup OAuth

npx search-console-mcp setup

Lệnh này sẽ:

  1. Khởi động server cục bộ
  2. Mở trình duyệt → trang xác thực Google
  3. Cấp quyền truy cập Search Console
  4. Tự động lưu token vào OS Keychain

🔒 Token được lưu trong trình quản lý credentials của hệ điều hành (macOS Keychain, Windows Credential Manager, Linux Secret Service). Fallback: mã hóa AES-256-GCM.

Bước 2: Cấu Hình Trong Antigravity

  1. Mở Agent panel (sidebar)
  2. Click Manage MCP Servers
  3. Click View raw config
  4. Thêm:
{
  "mcpServers": {
    "search-console": {
      "command": "npx",
      "args": ["-y", "search-console-mcp"]
    }
  }
}
  1. Save → Quay lại Manage MCP Servers → Click Refresh

Bước 3: Thêm Bing (Tùy chọn)

{
  "mcpServers": {
    "search-console": {
      "command": "npx",
      "args": ["-y", "search-console-mcp"],
      "env": {
        "BING_API_KEY": "YOUR_BING_API_KEY"
      }
    }
  }
}

Lấy API key tại: Bing Webmaster Tools Settings. Mỗi user có key riêng.

Bước 4: Thêm GA4 (Tùy chọn)

npx search-console-mcp setup --engine=ga4

Wizard sẽ:

  1. Yêu cầu đường dẫn Service Account JSON
  2. Liệt kê GA4 properties khả dụng
  3. Chọn property phù hợp

⚠️ GA4 yêu cầu Service Account (không dùng OAuth). Email SA phải được thêm làm Viewer trong GA4 Admin → Property Access Management.

Config đầy đủ (GSC + Bing + GA4):

{
  "mcpServers": {
    "search-console": {
      "command": "npx",
      "args": ["-y", "search-console-mcp"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "C:\\Users\\YOU\\.config\\seo-kit\\service_account.json",
        "BING_API_KEY": "YOUR_BING_API_KEY"
      }
    }
  }
}

Xác Nhận Cài Đặt

npx search-console-mcp accounts list

Kết quả mẫu:

✓ Google: seo@yourcompany.com (3 properties)
✓ Google: personal@gmail.com (2 properties)
✓ Bing: bing-user@outlook.com (1 site)
✓ GA4: seo-kit@project.iam.gserviceaccount.com (1 property)

Danh Sách 30+ MCP Tools

Google Search Console (7 tools)

ToolChức năngWorkflow
query_analyticsSearch analytics: clicks, impressions, CTR, position/seo-audit, /seo-monitor
compare_periodsSo sánh 2 khoảng thời gian/seo-monitor
analytics_time_seriesXu hướng hàng ngày, phát hiện ngày bắt đầu giảm/seo-monitor
analytics_drop_attributionTương quan drop với Core Update/seo-monitor
inspect_urlTrạng thái index URL/seo-audit
inspection_batchBatch inspection (tối đa 5/lần)/seo-audit
get_pagespeedPageSpeed + Core Web Vitals/seo-audit

SEO Intelligence (6 tools) — chỉ có qua MCP

ToolChức năngWorkflow
seo_opportunitiesImpressions cao, CTR thấp → fix title/meta/seo-strategy
detect_cannibalizationPhát hiện nhiều trang cạnh tranh cùng keyword/seo-audit
seo_quick_winsStriking distance keywords (vị trí 4-10)/seo-strategy
detect_anomaliesPhát hiện bất thường thống kê (Z-score)/seo-monitor
seo_lost_queriesKeywords đang mất thứ hạng/seo-monitor
seo_brand_vs_nonbrandPhân tách brand vs organic growth/seo-strategy

Bing Webmaster Tools (7 tools) — chỉ có qua MCP

ToolChức năngWorkflow
bing_analytics_queryBing search performance/seo-audit
bing_analytics_compare_periodsSo sánh xu hướng Bing/seo-monitor
bing_analytics_detect_anomaliesPhát hiện bất thường Bing/seo-monitor
bing_url_infoTrạng thái index URL trên Bing/seo-audit
bing_index_nowInstant indexing (IndexNow)/seo-execute
bing_sitemaps_listDanh sách sitemaps/seo-execute
bing_sitemaps_submitSubmit sitemap/seo-execute

Google Analytics 4 (6 tools)

ToolChức năngWorkflow
analytics_page_performanceSessions, engagement rate theo trang/seo-audit
analytics_traffic_sourcesPhân tích Channel/Source/Medium/seo-audit
analytics_organic_landing_pagesTrang đích organic traffic/seo-strategy
analytics_conversion_funnelTrang chuyển đổi cao nhất/seo-strategy
analytics_user_behaviorThiết bị, quốc gia, engagement/seo-audit
analytics_realtimeActive users thời gian thực/seo-monitor

Cross-Platform Intelligence (5 tools) — chỉ có qua MCP

ToolChức năngWorkflow
opportunity_matrixGSC + GA4 combined opportunities/seo-strategy
traffic_health_checkHealth check đa nguồn tự động/seo-monitor
page_analysisDeep page analysis (GSC + GA4)/seo-audit
compare_enginesSo sánh Google vs Bing/seo-monitor
sites_health_checkDashboard tất cả properties/seo-monitor

Script vs MCP — Khi Nào Dùng Cái Nào?

Nhu cầuDùngLý do
GSC analytics (>1000 rows)Script gsc_query.pyBatch processing, quick-win detect
Trend analysis + drop attributionMCP analytics_time_seriesKhông có trong scripts
Phát hiện cannibalizationMCP detect_cannibalizationThuật toán riêng
Quick wins (striking distance)MCP seo_quick_winsKhông có trong scripts
Bing analytics/indexingMCP bing_*Không có Bing scripts
GA4 đầy đủMCP analytics_*Nhiều tools hơn ga4_report.py
GA4 cơ bảnScript ga4_report.pyKhông cần setup MCP
URL inspection (batch lớn)Script gsc_inspect.pyKhông giới hạn 5 URL
URL inspection (nhanh)MCP inspect_urlNhanh hơn, ít setup
CrUX History (25 tuần)Script crux_history.pyMCP không có
Indexing API (Google)Script indexing_notify.pyMCP chỉ có Bing IndexNow
YouTube, NLP, Knowledge GraphScripts onlyMCP không hỗ trợ

Quy tắc tag dữ liệu: MCP data → [VERIFIED:GSC-MCP], Script data → [VERIFIED:GSC-Script]. Cả hai đều là nguồn xác thực.

Multi-Account

Thêm Tài Khoản

# Chạy setup cho mỗi tài khoản Google
npx search-console-mcp setup

Mỗi lần chạy sẽ mở trình duyệt cho tài khoản Google mới. Server tự động chọn tài khoản đúng dựa trên siteUrl bạn truy vấn.

Quản Lý Tài Khoản

# Liệt kê tài khoản
npx search-console-mcp accounts list

# Đăng xuất tài khoản mặc định
npx search-console-mcp logout

# Đăng xuất tài khoản cụ thể
npx search-console-mcp logout user@gmail.com

Agency Workflow

Sau khi login + config Bing:

Account: seo@agency.com
  Google: sc-domain:client-a.com, sc-domain:client-b.com
  Bing: client-a.com, client-b.com
  GA4: properties/123456789 (client-a.com)

Truy vấn trực tiếp bất kỳ property nào — auto-routing tự chọn tài khoản đúng.

Thêm Domain Mới

  1. Verify domain trong Google Search Console
  2. (Tùy chọn) Thêm vào Bing Webmaster Tools
  3. MCP tự phát hiện — không cần thay đổi config

Biến Môi Trường

BiếnBắt buộcMô tả
BING_API_KEYAPI key Bing Webmaster Tools
GOOGLE_APPLICATION_CREDENTIALSĐường dẫn Service Account JSON (cho GA4)

Không cần GSC_OAUTH_* — OAuth được quản lý tự động bởi npx search-console-mcp setup và lưu trong OS Keychain.

Xử Lý Sự Cố

Vấn đềGiải pháp
npx không tìm thấyCài Node.js 18+ từ nodejs.org
OAuth popup không mởKiểm tra firewall. Chạy npx search-console-mcp setup trong terminal
403 ForbiddenTài khoản Google chưa có quyền. Kiểm tra GSC Settings → Users
Bing tools không hoạt độngKiểm tra BING_API_KEY trong mcp_config.json env
GA4 tools không hoạt độngChạy npx search-console-mcp setup --engine=ga4. Thêm SA email làm Viewer trong GA4
MCP server không hiển thịRestart IDE sau khi sửa mcp_config.json. Kiểm tra Agent panel
Token hết hạnChạy npx search-console-mcp setup lại. Hoặc logout → re-setup

Rate Limits

APIPer-MinutePer-DayAuth
GSC Search Analytics1,200 QPM/site30M QPDOAuth (MCP)
GSC URL Inspection600 QPM2,000 QPD/siteOAuth (MCP)
Bing AnalyticsTheo Bing quotaAPI Key
GA4 Data API10 concurrent~25K tokens/dayService Account

Kỹ Năng Liên Quan

Kỹ năngVai trò
seo-googleSkill chính sử dụng MCP tools
seo-dataforseoSERP data bổ sung
seo-technicalCWV thresholds