Bing Web, News & Image Search MCP Server
Enable AI assistants to perform Bing web, news, and image searches with an MCP server for seamless Microsoft Search API integration.
npx -y @leehanchung/bing-search-mcpOverview
This MCP (Model Context Protocol) server connects AI assistants to Microsoft Bing Search APIs, enabling programmatic web, news, and image searches from within MCP-compatible clients (for example Claude Desktop or Cursor). The server exposes a set of tools that let a model request search results and media metadata, letting the assistant augment responses with up-to-date information, citations, and images.
Built as a lightweight Python service, the server handles request translation, authentication with the Bing Search API, rate limiting to protect your quota, and consistent error handling so downstream agents can rely on predictable results. The project repository is available at https://github.com/leehanchung/bing-search-mcp.
Features
- Web search for general-purpose information and site links
- News search for recent events and topical coverage
- Image search for thumbnails, metadata, and preview URLs
- Built-in rate limiting to reduce accidental API overuse
- Structured error reporting for graceful fallback in clients
- Minimal configuration and MCP-compatible entrypoint for easy integration
Requirements
- Python 3.10 or newer
- A Microsoft Bing Search API key (from Azure)
- An MCP-compatible client or assistant that can invoke MCP servers
Installation / Configuration
- Clone the repository and install in a virtual environment:
- Set required environment variables (Linux / macOS):
# Optional: default used if not set
Windows cmd:
set BING_API_KEY=your-bing-api-key
set BING_API_URL=https://api.bing.microsoft.com/
- Run the MCP server (example using uvx entrypoint installed by the package):
To run under a process manager or system service, start the same command in the desired environment.
Available Tools
The server exposes three primary tools (endpoints) via MCP. Each tool returns structured search results suitable for downstream consumption by an assistant.
| Tool name | Purpose | Key parameters |
|---|---|---|
| bing_web_search | General web queries and site discovery | query, count, offset, market |
| bing_news_search | News articles and topical current events | query, count, market, freshness |
| bing_image_search | Image search results and thumbnails | query, count, market |
Example function signatures (logical API):
Returned data includes title, snippet/description, url, and metadata fields (e.g., provider, datePublished). Image results include thumbnail and content URLs, sizes, and image type when available.
Use Cases
- Fact-checking and real-time references: an assistant can call bing_news_search to verify recent claims with links and publication dates.
- Enriching answers with sources: use bing_web_search to collect top authoritative links and present citations alongside generated summaries.
- Visual assistance and content discovery: use bing_image_search to provide images or thumbnails for UI previews, documentation, or creative workflows.
Concrete example (assistant flow):
- User asks “What are the latest developments on electric vehicle batteries?”
- Assistant calls bing_news_search(“electric vehicle battery developments”, count=5, freshness=“Week”)
- Assistant summarizes the top 3 articles, includes publication dates, and attaches source links.
Integration with MCP Clients
For Claude Desktop, add an MCP server entry to your configuration:
Other MCP-capable clients should accept a similar launch specification and environment mapping.
Rate Limiting and Error Handling
- The server applies request rate limiting to avoid hitting Bing API quotas. Exceeding limits returns clear MCP error payloads so the assistant can retry later or use alternative sources.
- Errors from the Bing API are normalized into predictable error codes and human-readable messages, including HTTP status, error type, and recommended action.
Getting a Bing API Key
- Sign in to Microsoft Azure Portal (https://portal.azure.com/).
- Create a Bing Search v7 (or relevant) resource.
- Open the resource and copy the key under “Keys and Endpoint”.
Troubleshooting
- 401 Unauthorized: verify BING_API_KEY and that the key is active for Bing Search.
- Empty results: try widening the market or increasing count; check that the query text is appropriate.
- High latency: confirm network connectivity to the Bing endpoint and consider caching frequent queries.
License and Source
This project is MIT-licensed. Source, issues, and contributions are hosted on GitHub: https://github.com/leehanchung/bing-search-mcp.
Common Issues & Solutions
The user is attempting to use the fetch_webpage tool but encounters an error indicating that the tool is not found. This suggests that the tool may not be included in the current MCP server setup.
I ran into this too! It turns out that the fetch_webpage tool is part of the `@ChromeDevTools/chrome-devtools-mcp` package. Installing this package resolved the issue for me, as it includes the necessary tools for web fetching capabilities. Make sure to install it to access the fetch_webpage tool properly. npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcpThe user is unsure if the MCP server can support SSE mode and is seeking assistance. They are looking for guidance on how to enable this feature.
I ran into this too! Enabling SSE mode on the MCP server can be a bit tricky if you're not familiar with the setup. Installing `@ChromeDevTools/chrome-devtools-mcp` really helped me out. This package provides the necessary tools and configurations to allow the MCP server to run in SSE mode effectively. After installation, you can easily switch to SSE mode and enjoy its benefits for real-time updates. Just run the following command to install it: npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcp