Metadata-Version: 2.4
Name: bing-ai-visibility-mcp
Version: 0.1.2
Summary: Read-only MCP server for Bing Webmaster Tools plus Copilot / Bing AI citations: ask Claude which pages Microsoft's AI cites, for which grounding queries, and how that compares with your Bing search clicks
Author: ArvtekEarn
License: MIT
Project-URL: Homepage, https://github.com/ArvtekEarn/bing-ai-visibility-mcp
Project-URL: Issues, https://github.com/ArvtekEarn/bing-ai-visibility-mcp/issues
Keywords: mcp,bing,bing-webmaster-tools,copilot,ai-citations,geo,aeo,seo,claude,model-context-protocol,ai-performance
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Natural Language :: English
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.2
Requires-Dist: httpx>=0.27
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# bing-ai-visibility-mcp

<!-- mcp-name: io.github.ArvtekEarn/bing-ai-visibility-mcp -->

**Ask Claude which of your pages Microsoft Copilot cites, and compare that with your Bing search clicks.**

A free, local, read-only [MCP](https://modelcontextprotocol.io) server for **Bing Webmaster Tools**,
including the **AI Performance** report (Copilot / Bing AI citations, grounding queries, intents,
topics, citation share).

Why it exists: Bing's AI Performance data (Feb 2026) is the only first-party AI-citation data any search
engine gives site owners, but **the Bing Webmaster API has no method for it**: it is only in the web UI
and its CSV/Excel exports. Other Bing MCP servers only cover the API, so they can't see it. This one reads
your exports and joins them with the API's search data.

## What you can ask

- "Which pages does Copilot cite most, and which of them get almost no clicks from Bing search?"
- "Which grounding queries cite us that we don't even rank for in Bing?" (AI trusts you, search doesn't show you)
- "Which pages get Bing clicks but are never cited by AI?" (what to restructure for AI answers)
- "What changed in AI citations since last month's export: new, lost, rising, falling pages?"
- "Group our grounding queries by intent / topic."
- Plus the usual: top queries and pages with weighted positions, this period vs the last, crawl issues
  grouped by type, sitemaps, URL info, keyword volume.

## Tools (16, all read-only)

| AI Performance (from your exports) | Bing Webmaster API |
|---|---|
| `ai_exports`: files found and what they are | `list_sites` |
| `ai_overview`: citations over time | `search_overview`: clicks/impressions vs previous period, weekly |
| `ai_cited_pages`: most-cited pages | `top_queries`, `top_pages` (summed over N days) |
| `ai_grounding_queries`: filter or group by intent/topic | `query_pages`, `page_queries` |
| `ai_vs_search`: citations joined with search clicks | `crawl_health`: crawl stats + issues by type |
| `ai_compare`: two exports, what changed | `url_info`, `sitemaps`, `keyword_volume` |

Nothing can submit URLs, change sitemaps, block pages or edit settings: the client refuses any non-`Get`
API method. Your key and your files stay on your machine.

## Setup

1. **API key:** Bing Webmaster Tools → ⚙ Settings → API access → API key.
2. **Exports (for the AI tools):** Bing Webmaster Tools → AI Performance → choose a date range → Export
   (CSV or Excel) on the chart, the Pages tab and the Grounding queries tab. Put the files in one folder.
   Add a new set each month to compare periods. File names don't matter; files are recognised by their
   columns, and unknown columns are kept.
3. Add to Claude Desktop / Claude Code (`claude_desktop_config.json` or `.mcp.json`):

```json
{
  "mcpServers": {
    "bing": {
      "command": "uvx",
      "args": ["bing-ai-visibility-mcp"],
      "env": {
        "BING_WEBMASTER_API_KEY": "your-key",
        "BING_SITE_URL": "https://www.example.com/",
        "BING_AI_EXPORTS_DIR": "/path/to/bing-ai-exports"
      }
    }
  }
}
```

Claude Code one-liner:
`claude mcp add bing -e BING_WEBMASTER_API_KEY=your-key -e BING_AI_EXPORTS_DIR=~/bing-ai-exports -- uvx bing-ai-visibility-mcp`

Test without an AI: `BING_WEBMASTER_API_KEY=... BING_AI_EXPORTS_DIR=... uvx bing-ai-visibility-mcp --check`

## Reading the numbers honestly

- A **citation** means a Microsoft AI answer (Copilot, Bing AI summaries, some partners) named your page
  as a source. It is not a click or a visit. Bing says the data is **sampled**.
- A **grounding query** is a phrase Bing grouped with the answer, not the user's exact prompt.
- Each export is one period. The tools never add exports together; `ai_compare` only makes sense for
  periods of equal length.
- Query matching between AI and search is exact after lower-casing and removing punctuation, so the real
  overlap is larger than shown.
- Search positions are passed through as Bing reports them (weighted by impressions when summed).

## Development

```
pip install -e .[test] && pytest -q
```
Tests run the real server over stdio against a fake Bing API and real-shaped CSV/XLSX exports
(comma and semicolon CSV, decimal commas, BOM, Excel dates, title rows). Python ≥ 3.10, MCP SDK 1.x and 2.x.

Not affiliated with Microsoft. MIT licence.
