Better Search Console logoetter Search Console
ar flag
تسجيل الخروج

MCP Server Documentation

Connect Better Search Console to AI assistants like Claude using the Model Context Protocol (MCP).

What is MCP? The Model Context Protocol lets AI assistants (Claude, Cursor, etc.) interact with your Better Search Console data directly — listing websites, queuing URLs for indexation, managing sitemaps, and more — all through natural conversation.

1. Introduction

The Better Search Console MCP server exposes 27 tools that give AI assistants full access to your SEO data and operations:

  • List and manage your websites
  • Browse, filter, and delete URLs
  • Add, process, and delete sitemaps
  • Queue URLs for Google/Bing indexation
  • Check indexation status
  • Create AI prompt analyses
  • Configure website settings
  • Manage custom dashboards
  • Generate sitemaps and robots.txt files

MCP Endpoint

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

2. Setup on Claude.ai

Connect Better Search Console to Claude.ai in 4 steps:

1Generate an API token

Go to Settings in Better Search Console and click Generate API Token. Copy the 64-character token.

2Add the connector

On Claude.ai, go to Settings > Connectors > Add custom connector

  • Name: Better Search Console
  • URL: https://www.better-search-console.com/_mcp
  • Leave OAuth fields empty

3Connect

Click Connect. You'll see an authorization page — paste your API token and click Authorize.

4Start using

In any Claude conversation, the BSC tools are now available. Just ask Claude to manage your SEO:

"List all my websites and show me which URLs are not indexed"
"Submit my 5 newest blog posts to Google for indexation"
"Check the indexation status of all pages on example.com"

3. Setup on Claude Desktop

If you have the project running locally, you can use the STDIO transport for Claude Desktop.

Edit your Claude Desktop config

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add:

{
  "mcpServers": {
    "better-search-console": {
      "command": "php",
      "args": ["/path/to/BetterSearchConsole/bin/console", "app:mcp:serve"],
      "env": {
        "BSC_API_TOKEN": "YOUR_API_TOKEN_HERE"
      }
    }
  }
}

Replace /path/to/BetterSearchConsole with the actual path and YOUR_API_TOKEN_HERE with your token.

Alternative: pass token as option

php bin/console app:mcp:serve --token=YOUR_API_TOKEN_HERE

4. Setup on Cursor / Other Clients

Any MCP-compatible client can connect. Use the HTTP transport:

SettingValue
URLhttps://www.better-search-console.com/_mcp
TransportStreamable HTTP
AuthenticationBearer token (your API token)

The server accepts authentication via:

  • Authorization: Bearer YOUR_TOKEN header
  • X-API-TOKEN: YOUR_TOKEN header
  • ?token=YOUR_TOKEN query parameter

5. Authentication

The MCP server uses the same API token as the REST API. Generate it from Settings.

OAuth Flow (Claude.ai)

When connecting from Claude.ai, you'll be redirected to an authorization page where you paste your API token. This only happens once — Claude stores the token for future sessions.

Direct Token (Desktop/Cursor)

For desktop clients, pass the token via environment variable or header. The server validates it against your account on every request.

Security: Your token grants full access to your account. Never share it publicly. You can regenerate it at any time from Settings.

6. Tools Reference

The MCP server exposes 27 tools organized by category. Each tool has typed parameters that the AI assistant fills automatically based on your conversation.

6.1 Websites

list-websites
List all websites belonging to your account.

No parameters required.

get-website
Get detailed information about a specific website.
ParameterTypeDescription
website_idintegerThe website ID

6.2 URLs

list-urls
List URLs for a website with optional filters.
ParameterTypeRequiredDescription
website_idintegerYesThe website ID
coverage_statestringNoFilter by coverage state (e.g. "indexed")
url_containsstringNoFilter URLs containing this string
indexing_statestringNoFilter by indexing state
pageintegerNoPage number (default: 1)
limitintegerNoItems per page (default: 30)
delete-url
Delete a single URL by its ID.
ParameterTypeDescription
url_idintegerThe URL ID to delete
delete-urls-bulk
Bulk delete URLs by their string values.
ParameterTypeDescription
website_idintegerThe website ID
urlsarrayArray of URL strings to delete

6.3 Sitemaps

list-sitemaps
List all sitemaps for a website.
ParameterTypeDescription
website_idintegerThe website ID
add-sitemap
Add a new sitemap to a website. The URL must be accessible and belong to the website domain.
ParameterTypeDescription
website_idintegerThe website ID
sitemap_urlstringThe sitemap URL (must be accessible via HTTP)
process-sitemap
Process a sitemap to extract and save all its URLs to the database.
ParameterTypeDescription
sitemap_idintegerThe sitemap ID
process-all-sitemaps
Process all sitemaps for a website at once.
ParameterTypeDescription
website_idintegerThe website ID
delete-sitemap
Delete a sitemap by its ID.
ParameterTypeDescription
sitemap_idintegerThe sitemap ID

6.4 Indexation

Rate limited: Indexation tools are subject to daily limits based on your subscription plan. See Rate Limits.
queue-google
Queue a URL for Google indexation.
ParameterTypeDescription
urlstringThe full URL to queue
queue-bing
Queue a URL for Bing indexation.
ParameterTypeDescription
urlstringThe full URL to queue
queue-bulk
Bulk queue multiple URLs for Google and/or Bing.
ParameterTypeRequiredDescription
website_idintegerYesThe website ID
urlsarrayYesArray of URL strings
googlebooleanNoQueue for Google (default: true)
bingbooleanNoQueue for Bing (default: false)
check-indexation
Queue a URL for indexation status check.
ParameterTypeDescription
urlstringThe full URL to check
check-indexation-bulk
Bulk queue URLs for indexation status check.
ParameterTypeDescription
website_idintegerThe website ID
urlsarrayArray of URL strings to check
disable-indexation-bulk
Disable indexation for URLs and queue them for removal from Google.
ParameterTypeDescription
website_idintegerThe website ID
urlsarrayArray of URL strings to disable
reenable-indexation-bulk
Re-enable indexation for previously disabled URLs.
ParameterTypeDescription
website_idintegerThe website ID
urlsarrayArray of URL strings to re-enable
update-coverage-state
Manually update the coverage state of a URL.
ParameterTypeDescription
urlstringThe full URL
statestringNew coverage state (e.g. "Submitted and indexed")

6.5 Prompt Analysis

list-prompt-analyses
List all prompt analyses for a website.
ParameterTypeDescription
website_idintegerThe website ID
create-prompt-analysis
Create a new AI prompt analysis to check your website's visibility in LLM responses.
ParameterTypeRequiredDescription
website_idintegerYesThe website ID
promptstringYesThe prompt to test
modelsarrayYesAI models to use (e.g. ["gpt-4", "claude-3-opus"])
targeted_keywordsarrayNoKeywords to track in responses
update-keywords
Update targeted keywords on an existing prompt analysis.
ParameterTypeDescription
analysis_idintegerThe analysis ID
targeted_keywordsarrayNew list of keywords

6.6 Settings

update-website-settings
Update website automation settings. Only pass the fields you want to change.
ParameterTypeRequiredDescription
website_idintegerYesThe website ID
auto_indexingbooleanNoEnable auto-indexing (premium)
auto_sitemap_refreshbooleanNoEnable auto sitemap refresh (premium)
auto_update_statusbooleanNoEnable auto status update (premium)
recap_emailbooleanNoEnable recap emails
delete-service-account
Delete the Google service account key for a website.
ParameterTypeDescription
website_idintegerThe website ID
set-bing-key
Set or update the Bing Webmaster API key.
ParameterTypeDescription
website_idintegerThe website ID
bing_api_keystringThe Bing API key

6.7 Dashboards

create-dashboard
Create a custom dashboard (maximum 3 per website).
ParameterTypeDescription
website_idintegerThe website ID
namestringDashboard name
update-dashboard
Update a dashboard's name or set as default.
ParameterTypeRequiredDescription
dashboard_idintegerYesThe dashboard ID
namestringNoNew name
is_defaultbooleanNoSet as default dashboard
delete-dashboard
Delete a custom dashboard.
ParameterTypeDescription
dashboard_idintegerThe dashboard ID
save-dashboard-widgets
Replace all widgets on a dashboard.
ParameterTypeDescription
dashboard_idintegerThe dashboard ID
widgetsarrayArray of widget objects: {type, title, span, config}

6.8 SEO Tools

generate-sitemap
Crawl a website and generate a sitemap XML file.
ParameterTypeRequiredDescription
website_urlstringYesThe website URL to crawl
max_urlsintegerNoMaximum URLs to include (default: 500)
generate-robots
Generate a robots.txt file from a configuration.
ParameterTypeRequiredDescription
user_agentsarrayYesArray of {name, disallow[], allow[], crawl_delay}
sitemapsarrayNoArray of sitemap URLs to include

6.9 User Profile

get-profile
Get the authenticated user's profile (subscription type, nickname).

No parameters required.

7. Usage Examples

Here are example prompts you can use with Claude once connected:

Check SEO status

"Show me all my websites and their indexation stats for today"

Find non-indexed pages

"List all URLs on my website that are not indexed by Google"

Submit new content

"Submit these URLs to Google for indexation: https://example.com/blog/post-1, https://example.com/blog/post-2"

Bulk indexation

"Queue all pages containing '/blog/' for Google and Bing indexation"

Sitemap management

"Add the sitemap https://example.com/sitemap-news.xml to my website and process it"

Status check

"Check the indexation status of my 10 most recently added URLs"

Clean up

"Find all URLs returning 404 and remove them from indexation"

Generate SEO files

"Generate a robots.txt that blocks /admin and /private, allows everything else, and includes my sitemap"

Prompt analysis

"Create a prompt analysis for 'best project management tools' targeting keywords 'project management' and 'productivity' using GPT-4 and Claude"

8. Rate Limits

Indexation and verification tools share the same daily limits as the web interface and REST API:

PlanIndexation Requests/dayStatus Checks/day
Free1050
Starter100200
Pro200500
MasterUnlimitedUnlimited

When a limit is reached, the tool returns an error with "limit_reached": true. Limits reset daily at midnight UTC.

You can check current usage via the list-websites tool (see indexationRequestToday and checkStatusRequestToday fields).

9. Troubleshooting

"This connector has no tools available"

This usually means the authentication failed or the server couldn't load tools. Try:

  • Disconnect and reconnect the connector
  • Re-enter your API token when prompted
  • Verify your token is valid by testing the REST API: curl -H "X-API-TOKEN: YOUR_TOKEN" https://www.better-search-console.com/api/websites

"Connection to server failed"

  • Check that https://www.better-search-console.com/_mcp is accessible
  • Ensure you're not behind a firewall blocking the connection

"Daily limit reached"

You've used all your daily indexation or verification requests. Upgrade your plan or wait until midnight UTC for the reset.

"URL not found or access denied"

The URL you're trying to operate on either doesn't exist in your database or belongs to a website you don't own. Make sure the URL has been imported via a sitemap first.

Token issues

  • Tokens are 64 characters long (hexadecimal)
  • You can regenerate your token at any time from Settings
  • After regenerating, you'll need to reconnect any MCP clients