Bing Search MCP server

Search the web using Bing services.
Back to servers
Provider
Microsoft
Release date
Feb 24, 2025
Language
Python
Stats
277 stars

The Bing Search MCP Server enables web searching capabilities and link reading through the Model Context Protocol. It provides tools for searching the web using the Bing Search API and reading content from the search results, delivering the content in a format suitable for large language models.

Installation and Setup

Prerequisites

Before installing, ensure you have the following:

  • Python environment with make utility
  • Bing Search API key
  • Azure OpenAI endpoint (optional, for post-processing web content)

Basic Installation

Run the following command to create a virtual environment and install dependencies:

make

Environment Configuration

Create a .env file based on the provided .env.sample and add the following variables:

BING_SEARCH_API_KEY=your_bing_api_key_here
ASSISTANT__AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint_here

The Azure OpenAI endpoint is only required if you want to post-process web content.

Running the Server

Using Default Transport (stdio)

To run the server with the default stdio transport:

uv run mcp-server-bing-search

Using SSE Transport

To run the server with SSE (Server-Sent Events) transport:

uv run mcp-server-bing-search --transport sse --port 6030

This will make the server available at:

http://127.0.0.1:6030/sse

Client Configuration

Stdio Configuration

To use the MCP server with stdio transport:

{
  "mcpServers": {
    "mcp-server-bing-search": {
      "command": "uv",
      "args": ["run", "-m", "mcp_server_bing_search.start"]
    }
  }
}

SSE Configuration

To use the MCP server with SSE transport:

{
  "mcpServers": {
    "mcp-server-bing-search": {
      "command": "http://127.0.0.1:6030/sse",
      "args": []
    }
  }
}

Available Tools

Web Search

The server provides a search tool that queries the web:

search(query: str) -> str

This tool:

  • Performs a Bing search with the provided query
  • Processes each URL from search results
  • Converts page content to Markdown
  • Parses and caches links
  • Optionally samples important links and filters content
  • Returns processed content in an LLM-friendly format

Link Reading

The server also provides a click tool to explore links from search results:

click(hashes: list[str]) -> str

This tool:

  • Takes a list of hashes from search results
  • Retrieves corresponding URLs from cache
  • Processes the URLs similarly to the search tool
  • Returns content in an LLM-friendly format

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later