bing-webmaster-tools-mcp
# bing-webmaster-tools-mcp
MCP server for Bing Webmaster Tools analytics, crawl diagnostics, URL/content submission, and IndexNow.
## Install
1. Install [Node.js](https://nodejs.org/) (v20 or newer) and generate an API key in **Bing Webmaster Tools -> Settings -> API Access**.
2. Add this server to your MCP client's configuration:
```json
{
"mcpServers": {
"bing-webmaster": {
"command": "npx",
"args": ["-y", "@washedguy/bing-webmaster-tools-mcp"],
"env": {
"BING_WEBMASTER_API_KEY": "YOUR_BING_WEBMASTER_API_KEY",
"BING_MCP_MODE": "readonly"
}
}
}
}
```
Run `npx -y @washedguy/bing-webmaster-tools-mcp --init` to print ready-to-paste snippets for Claude Desktop, Claude Code, Cursor, and T3 Code.
## Tools
| Tool | What it does |
| --- | --- |
| `get_user_sites`, `get_site_roles`, `get_site_moves`, `get_connected_pages` | List verified sites, roles, domain migrations, and connected pages. |
| `get_rank_and_traffic_stats`, `get_query_stats`, `get_page_stats`, `get_page_query_stats`, `get_query_page_stats`, `get_query_traffic_stats`, `get_query_page_detail_stats` | Search performance with local date-range filtering, aggregation, CTR, weighted position, sorting, and pagination. |
| `get_keyword`, `get_keyword_stats`, `get_related_keywords` | Bing keyword research and historical impression trends. |
| `get_crawl_stats`, `get_crawl_issues`, `get_crawl_settings`, `get_fetched_urls`, `get_fetched_url_details` | Crawl metrics, bitmask-decoded crawl issues, crawl rate settings, and Bingbot fetch history. |
| `get_url_info`, `get_url_traffic_info`, `get_children_url_info`, `get_children_url_traffic_info` | Index status, traffic, and directory drilldown for URLs. |
| `get_link_counts`, `get_url_links` | Inbound backlink counts and linking pages with anchor text. |
| `get_feeds`, `get_blocked_urls`, `get_deep_link_blocks`, `get_query_parameters`, `get_country_region_settings` | Inspect sitemaps/feeds, URL blocks, sitelink blocks, query parameter rules, and geo-targeting. |
| `get_url_submission_quota`, `get_content_submission_quota` | Check remaining daily and monthly Bing submission quotas. |
| `submit_url`, `submit_url_batch`, `submit_content`, `submit_feed`, `fetch_url`, `indexnow_submit_urls` | Submit URLs (auto-chunked in 500-URL batches with quota check), raw HTML/structured data, sitemaps, Bingbot fetches, or IndexNow pings (`submit` / `full` mode). |
| `add_site`, `verify_site`, `delete_site`, `add_site_roles`, `remove_site_role`, `submit_site_move`, `add_connected_page`, `remove_feed`, `save_crawl_settings`, `add_blocked_url`, `remove_blocked_url`, `add_deep_link_block`, `remove_deep_link_block`, `add_query_parameter`, `remove_query_parameter`, `enable_disable_query_parameter`, `add_country_region_settings`, `remove_country_region_settings` | Administrative and SEO configuration tools (`full` mode; destructive actions require `confirm: true` and support `dryRun: true`). |
| `seo_site_health_audit`, `seo_find_opportunities`, `seo_compare_periods`, `seo_inspect_url_full`, `analyze_ai_performance_csv` | Composite SEO audits, quick-win discovery, period comparisons, full URL inspection, and local AI Performance CSV parsing. |
| `get_server_status`, `get_setup_guide`, `generate_indexnow_key` | Inspect active mode/capabilities, read setup guides, or generate a local IndexNow key. |
Includes MCP resources (`bing://sites`, `bing://config`) and prompts (`bing_seo_audit`, `bing_traffic_drop_investigation`, `bing_indexing_check`, `bing_indexnow_setup`).
## IndexNow
IndexNow notifies Bing and participating search engines (Yandex, Seznam, Naver) immediately when URLs are added, updated, or removed — without Bing Webmaster Tools' daily URL submission quota.
1. Generate a 32-character key (call `generate_indexnow_key` or run `openssl rand -hex 16`).
2. Host a UTF-8 file at `https://<your-domain>/<KEY>.txt` containing only `<KEY>`.
3. Set `BING_MCP_MODE=submit` and `INDEXNOW_API_KEY=<KEY>` in your MCP config (set `INDEXNOW_KEY_LOCATION` only if the `.txt` file is not at the domain root).
## Safety modes
| Mode (`BING_MCP_MODE`) | Tools | Access |
| --- | --- | --- |
| `readonly` *(default)* | 40 | Read, analytics, diagnostics, audits, onboarding helpers. |
| `submit` | 46 | Adds non-destructive indexing (`submit_url`, `submit_url_batch`, `submit_content`, `submit_feed`, `fetch_url`, `indexnow_submit_urls`). |
| `full` | 64 | Adds admin and destructive tools (`confirm: true` required on destructive calls). |
## Configuration
| Variable | Default | Description |
| --- | --- | --- |
| `BING_WEBMASTER_API_KEY` | *(required)* | Bing Webmaster Tools API key. |
| `BING_MCP_MODE` | `readonly` | `readonly`, `submit`, or `full`. |
| `BING_TIMEOUT_MS` | `30000` | Request timeout in ms (1000–120000). |
| `BING_MAX_CONCURRENCY` | `2` | Max parallel Bing API requests (1–5). |
| `BING_DEDUPE_TTL_SECONDS` | `0` | Optional ephemeral in-memory GET deduplication (0 = off, max 300). |
| `INDEXNOW_API_KEY` | — | Enables `indexnow_submit_urls` in `submit` / `full` mode. |
| `INDEXNOW_KEY_LOCATION` | — | Custom URL if IndexNow key file is not at the domain root. |
| `MCP_HTTP_HOST` / `MCP_HTTP_PORT` | `127.0.0.1` / `3000` | Bind address and port for `--transport http`. |
| `MCP_HTTP_AUTH_TOKEN` | — | Bearer token required for `POST /mcp` in HTTP mode. |
| `MCP_HTTP_ALLOWED_ORIGINS` | loopback only | Comma-separated allowed `Origin` headers in HTTP mode. |
Streamable HTTP mode:
```bash
BING_WEBMASTER_API_KEY="YOUR_KEY" MCP_HTTP_AUTH_TOKEN="YOUR_TOKEN" \
node dist/index.js --transport http --host 127.0.0.1 --port 3000
```
## Notes
- Uses only the official Bing Webmaster JSON API (`https://ssl.bing.com/webmaster/api.svc/json/`) and `https://api.indexnow.org/indexnow` with strict host pinning.
- No scraping and no persistent disk caching, in line with Microsoft's Terms of Use.
- API keys and bearer tokens are automatically redacted from error messages and `stderr` logs.
- Microsoft does not yet expose a public API for the Bing AI Performance report; use `analyze_ai_performance_csv` on manually exported CSV files instead.
- This is an unofficial integration and Bing's interfaces may change.
## Development
```bash
git clone https://github.com/washedguy/bing-webmaster-tools-mcp.git
cd bing-webmaster-tools-mcp
npm install
npm run typecheck
npm test
npm run build
```
Live connectivity check:
```bash
BING_WEBMASTER_API_KEY="YOUR_KEY" node dist/index.js --doctor
```
## Author
**[washed.dev](https://washed.dev)** · Building websites and web apps for your business
## License
[MIT](LICENSE)
TDQS
Scored across 40 tools
Several tools form nearly indistinguishable clusters: get_page_query_stats vs get_query_page_stats are mirror names that demand careful parsing, while get_query_stats vs get_query_traffic_stats, get_url_info vs get_children_url_info, and get_keyword vs get_keyword_stats are easily confused. The rich descriptions help, but an agent selecting on name alone is likely to misselect.
The set is overwhelmingly snake_case and verb-led, with the get_* family dominating predictably. The seo_* prefix (seo_find_opportunities, seo_site_health_audit, seo_inspect_url_full, seo_compare_periods) and slight noun-form inconsistency in get_keyword vs get_keyword_stats are minor deviations, not a convention break.
At 40 tools the surface is heavy for interacting with Bing Webmaster Tools, and downhill it fragments into many near-duplicate report variants. A smaller curated set with richer params would serve agents better than 40 narrow read endpoints.
Read/analytics coverage is broad (traffic, crawl, sitemaps, keywords, backlinks, blocking, quotas, IndexNow), but the surface is almost entirely read-only despite quota-checking tools implying submission. Actual submit operations for URLs, content, and sitemaps, plus unblock/delete and IndexNow submission, appear missing, creating dead ends.