MCP ExplorerExplorer

Bing Search API

@leehanchungon 8 months ago
48 MIT
FreeCommunity
Web Services
#Bing#Search#Web#News#Images
Server implementation for Microsoft Bing Web Search API.

Overview

What is Bing Search API

The Bing Search MCP Server is an integration layer that facilitates the use of the Microsoft Bing Search API for performing various types of searches, including web, news, and image searches. It allows AI assistants to interact with Bing’s search capabilities efficiently.

Use cases

This server can be utilized by AI assistants to fetch general information, current news, and visual content through image searches. It’s ideal for applications requiring up-to-date data and media content, particularly in scenarios where rapid access to search results is beneficial, such as news aggregation and research assistance.

How to use

To use the Bing Search MCP Server, clone the repository, set up the environment with the necessary Bing API key, and run the server. Additionally, configure compatible clients like Claude Desktop to enable access to the server’s search functionalities via the specified command and arguments.

Key features

Key features of the Bing Search MCP Server include web, news, and image search functionalities, robust rate limiting to prevent API abuse, and comprehensive error handling to manage API responses effectively. It supports customizable search parameters, allowing tailored queries to enhance search relevance.

Where to use

This server can be used in AI applications that require real-time information access, such as virtual assistants, chatbots, and research tools. It’s particularly useful in settings where integration with web search functionality can improve user experience and provide timely information.

Content

Bing Search MCP Server

A Model Context Protocol (MCP) server for Microsoft Bing Search API integration, allowing AI assistants to perform web, news, and image searches.

smithery badge

Bing Search MCP Server

Features

  • Web search for general information
  • News search for recent events and timely information
  • Image search for visual content
  • Rate limiting to prevent API abuse
  • Comprehensive error handling

Requirements

  • Python 3.10 or higher
  • Microsoft Bing Search API key
  • MCP-compatible client (e.g., Claude Desktop, Cursor)

Installation

  1. Clone this repository
  2. Install dependencies:
    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    uv pip install -e .
    

Configuration

Set the required environment variables:

export BING_API_KEY="your-bing-api-key"
export BING_API_URL="https://api.bing.microsoft.com/"  # Optional

For Windows:

set BING_API_KEY=your-bing-api-key
set BING_API_URL=https://api.bing.microsoft.com/

Usage

Running the server

uvx bing-search-mcp

Configuring with Claude for Desktop

Add the following to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "bing-search": {
      "command": "uvx",
      "args": [
        "/path/to/your/bing-search-mcp"
      ],
      "env": {
        "BING_API_KEY": "your-bing-api-key"
      }
    }
  }
}

Claude Code Bing Search MCP

Available Tools

1. bing_web_search

General web search for information, websites, and content.

bing_web_search(query: str, count: int = 10, offset: int = 0, market: str = "en-US")

2. bing_news_search

Search for news articles and current events.

bing_news_search(query: str, count: int = 10, market: str = "en-US", freshness: str = "Day")

3. bing_image_search

Search for images.

bing_image_search(query: str, count: int = 10, market: str = "en-US")

Getting a Bing API Key

  1. Visit Microsoft Azure Portal
  2. Create or sign in to your Azure account
  3. Create a new Bing Search resource
  4. Go to the resource and find your API key in the “Keys and Endpoint” section

License

MIT License

Tools

bing_web_search
Performs a web search using the Bing Search API for general information and websites. Args: query: Search query (required) count: Number of results (1-50, default 10) offset: Pagination offset (default 0) market: Market code like en-US, en-GB, etc.
bing_news_search
Searches for news articles using Bing News Search API for current events and timely information. Args: query: News search query (required) count: Number of results (1-50, default 10) market: Market code like en-US, en-GB, etc. freshness: Time period of news (Day, Week, Month)
bing_image_search
Searches for images using Bing Image Search API for visual content. Args: query: Image search query (required) count: Number of results (1-50, default 10) market: Market code like en-US, en-GB, etc.

Comments

Recommend MCP Servers

View All MCP Servers