MCP 文档

The Model Context Protocol (MCP) allows AI assistants like Claude, GPT, and Cursor to interact directly with your Better Search Console data. Your assistant can list websites, check indexation status, analyze prompts, manage sitemaps, and much more — all through a standardized tool-calling interface.

端点

MCP 服务器地址:

https://api.better-search-console.com/_mcp

身份验证

支持以下三种方法(按优先级排列):

方法示例
X-API-TOKEN headerX-API-TOKEN: your_token_here
Authorization: Bearer headerAuthorization: Bearer your_token_here
?token= query parameter/_mcp?token=your_token_here

在设置中找到您的 API 令牌,它是一个 64 位十六进制字符串。

OAuth 流程

对于支持 OAuth 的客户端,MCP 端点也接受通过 Google OAuth 流程获取的标准 OAuth 2.0 Bearer 令牌。用户授权后返回的访问令牌存储在用户记录中,可用作 Bearer 令牌。

配置指南

Claude.ai (Web)

{
  "mcpServers": {
    "better-search-console": {
      "url": "https://api.better-search-console.com/_mcp?token=<YOUR_API_TOKEN>"
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "better-search-console": {
      "url": "https://api.better-search-console.com/_mcp",
      "headers": {
        "X-API-TOKEN": "<YOUR_API_TOKEN>"
      }
    }
  }
}

Cursor

{
  "mcpServers": {
    "better-search-console": {
      "url": "https://api.better-search-console.com/_mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_TOKEN>"
      }
    }
  }
}

速率限制

等级请求次数/分钟请求次数/天
Free1050
Starter100200
Pro200500
MasterUnlimitedUnlimited

Tool Reference (50 tools)

list-websites

List all websites owned by the authenticated user.

无需参数。

get-website

Get detailed information about a specific website.

参数:

  • website_id
update-website

Update website settings (name, description, category, auto flags).

参数:

  • website_id
  • name
  • description
  • category
  • auto_indexing
  • auto_sitemap_refresh
  • auto_update_status
list-urls

List URLs for a website with optional filters and pagination.

参数:

  • website_id
  • coverage_state
  • url_contains
  • indexing_state
  • page
  • limit
delete-url

Delete a single URL from a website.

参数:

  • url_id
delete-urls-bulk

Delete multiple URLs from a website in bulk.

参数:

  • website_id
  • urls
get-url-stats

Get URL statistics grouped by coverage state.

参数:

  • website_id
get-indexation-queue-status

Get the current indexation queue status for a website.

参数:

  • website_id
list-sitemaps

List all sitemaps for a website.

参数:

  • website_id
add-sitemap

Add a sitemap URL to a website (validates domain and reachability).

参数:

  • website_id
  • sitemap_url
process-sitemap

Fetch and parse a sitemap, importing discovered URLs into the database.

参数:

  • sitemap_id
process-all-sitemaps

Process all sitemaps for a website.

参数:

  • website_id
delete-sitemap

Delete a sitemap and optionally its associated URLs.

参数:

  • sitemap_id
queue-google

Queue a URL for Google indexation.

参数:

  • url
queue-bing

Queue a URL for Bing indexation.

参数:

  • url
queue-bulk

Queue multiple URLs for Google and/or Bing indexation.

参数:

  • website_id
  • urls
  • google
  • bing
refresh-bing-crawl-info

Ask Bing what its crawler knows about a website's URLs (discovery date, last crawl, document size) and store it. This is not the same as bing_status, which reports whether a URL appears in Bing search results. Paced at about one URL per second and skips readings taken in the last week.

参数:

  • website_id
  • limit
check-indexation

Queue a URL for indexation status check.

参数:

  • url
check-indexation-bulk

Queue multiple URLs for indexation status check.

参数:

  • website_id
  • urls
disable-indexation-bulk

Disable indexation for multiple URLs (sets mustBeIndexed to false).

参数:

  • website_id
  • urls
reenable-indexation-bulk

Re-enable indexation for multiple URLs (sets mustBeIndexed to true).

参数:

  • website_id
  • urls
update-coverage-state

Manually update the coverage state of a URL.

参数:

  • url
  • state
plan-indexation

Rank URLs by how much a Google indexation request would help, and report which ones cannot be helped and why. Read-only: it spends no quota and queues nothing. Use it to decide what to submit before calling queue-google or queue-bulk.

参数:

  • website_id
  • budget
get-search-analytics

Get Search Console analytics data with flexible dimensions.

参数:

  • website_id
  • start_date
  • end_date
  • dimensions
  • row_limit
get-top-queries

Get top search queries for a website.

参数:

  • website_id
  • start_date
  • end_date
  • limit
get-top-pages

Get top pages by search performance.

参数:

  • website_id
  • start_date
  • end_date
  • limit
get-device-breakdown

Get search performance breakdown by device type.

参数:

  • website_id
  • start_date
  • end_date
get-country-breakdown

Get search performance breakdown by country.

参数:

  • website_id
  • start_date
  • end_date
  • limit
compare-periods

Compare search analytics between two time periods with deltas.

参数:

  • website_id
  • period1_start
  • period1_end
  • period2_start
  • period2_end
  • dimensions
list-prompt-analyses

List all prompt analyses for a website.

参数:

  • website_id
create-prompt-analysis

Create a new prompt analysis entry.

参数:

  • website_id
  • prompt
  • models
  • targeted_keywords
update-keywords

Update targeted keywords for a prompt analysis.

参数:

  • analysis_id
  • targeted_keywords
get-prompt-analysis-results

Get detailed results and keyword statistics for a prompt analysis.

参数:

  • analysis_id
create-dashboard

Create a custom dashboard (max 3 per website).

参数:

  • website_id
  • name
  • is_default
update-dashboard

Update a custom dashboard name or default status.

参数:

  • dashboard_id
  • name
  • is_default
delete-dashboard

Delete a custom dashboard and its widgets.

参数:

  • dashboard_id
save-dashboard-widgets

Replace all widgets on a dashboard.

参数:

  • dashboard_id
  • widgets
list-saved-filters

List saved URL filters for a website.

参数:

  • website_id
create-saved-filter

Create a saved URL filter.

参数:

  • website_id
  • name
  • search
  • sitemap
  • indexation
delete-saved-filter

Delete a saved filter.

参数:

  • filter_id
generate-report

Generate a PDF report for a website (requires pro/master subscription).

参数:

  • website_id
  • start_date
  • end_date
get-report-branding

Get report branding settings for a website.

参数:

  • website_id
update-report-branding

Update report branding settings (company name, colors, footer).

参数:

  • website_id
  • company_name
  • primary_color
  • accent_color
  • footer_text
analyze-meta-tags

Fetch a URL and extract SEO meta tags (title, description, OG, robots, h1s).

参数:

  • url
analyze-keyword-density

Analyze keyword density in a text.

参数:

  • text
  • keywords
check-url-structure

Check URL structure for SEO issues and return a score.

参数:

  • url
analyze-readability

Analyze text readability using Flesch Reading Ease and Flesch-Kincaid grade.

参数:

  • text
generate-sitemap

Crawl a website and generate a sitemap XML file.

参数:

  • website_url
  • max_urls
generate-robots

Generate a robots.txt from a configuration of user agents and sitemaps.

参数:

  • user_agents
  • sitemaps
get-profile

Get the authenticated user profile and subscription info.

无需参数。

使用示例

列出您的网站:

Tool: list-websites
Arguments: {}

检查 URL 的索引状态:

Tool: check-url-indexation
Arguments: { "website_id": 1, "url": "https://example.com/page" }

提交 URL 进行索引:

Tool: submit-urls-for-indexing
Arguments: { "website_id": 1, "url_ids": [10, 11, 12] }

故障排除

问题解决方案
401 Unauthorized检查您的 API 令牌是否正确并包含在请求中。
429 Too Many Requests您已超出速率限制。请等待或升级您的计划。
未找到工具请确认工具名称与上方参考完全一致。
连接被拒绝确保主机 URL 正确且可从您的网络访问。
参数无效检查必填参数是否匹配架构。ID 必须为数字。