Get the FREE Ultimate OpenClaw Setup Guide →

bing-search

MCP Server for Bing Search API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio leehanchung-bing-search-mcp uvx /path/to/your/bing-search-mcp \
  --env BING_API_KEY="your-bing-api-key" \
  --env BING_API_URL="https://api.bing.microsoft.com/"

How to use

This MCP server provides access to Microsoft Bing Search APIs through three specialized tools: bing_web_search for general web results, bing_news_search for current news, and bing_image_search for image results. It uses the Bing Search API key you provide via environment variables to perform authenticated requests and returns structured results suitable for integration with MCP clients. You can enable rate limiting and error handling to ensure stable operation when deployed behind other services or clients.

To use the server, start it via the MCP runtime (for Python-based servers this is typically done with uvx bing-search-mcp as shown in the README). In client configurations (e.g., Claude Desktop), point your MCP configuration to this server by providing the path to the server and the required environment variable BING_API_KEY. The available tools can then be invoked by your agent with the appropriate function names and parameters, for example bing_web_search with a query string to fetch web results, or bing_image_search to retrieve image results. Each tool supports standard parameters such as query, count, and market, enabling you to tailor the scope and locale of results.

  • bing_web_search(query, count=10, offset=0, market="en-US")
  • bing_news_search(query, count=10, market="en-US", freshness="Day")
  • bing_image_search(query, count=10, market="en-US")

How to install

Prerequisites:

  • Python 3.10 or higher
  • A Bing Search API key from Azure
  • Git (optional, for cloning)

Install and run locally:

  1. Clone the repository: git clone https://github.com/your-organization/bing-search-mcp.git cd bing-search-mcp
  2. Create and activate a virtual environment (example for Unix-like systems): python3 -m venv .venv source .venv/bin/activate

    On Windows: .venv\Scripts\activate

  3. Install the package in editable mode (from the repo root): uv pip install -e .
  4. Ensure dependencies are installed and the server can be discovered via MCP tooling.
  5. Set required environment variables (example): export BING_API_KEY="your-bing-api-key" export BING_API_URL="https://api.bing.microsoft.com/" # Optional

    On Windows:

    rem set BING_API_KEY=your-bing-api-key rem set BING_API_URL=https://api.bing.microsoft.com/
  6. Run the server (as per the MCP tooling): uvx bing-search-mcp

Additional notes

Notes and tips:

  • Ensure your BING_API_KEY is kept secret and not committed to version control.
  • If you change BING_API_URL, verify it points to the Bing Search endpoint you created in Azure.
  • The server includes rate limiting to prevent API abuse; adjust limits if you are hitting quotas or latency limits.
  • When configuring Claude Desktop or other MCP clients, set the environment variables in the client configuration as shown in the example to securely pass the API key.
  • On Windows, use the corresponding activate scripts and set commands; paths may differ for your environment.
  • If you encounter authentication errors, double-check the API key and endpoint URL in your environment, and ensure the key has the Bing Search resource permissions.

Related MCP Servers

Sponsor this space

Reach thousands of developers