MCP 服务器概览
What is Mcp Server Bing Search?
Mcp Server Bing Search is an MCP (Model Context Protocol) server that performs web searches via the Bing Search API, fetches and converts web pages to Markdown, extracts and caches links, and returns LLM-friendly summarized content. It’s designed to help prototype intelligent assistants, agents, and multi-agent systems that need live web context.
How to use the project?
- Clone the repo and run
maketo create a virtual environment and install dependencies. - Create a
.envfrom.env.sampleand setBING_SEARCH_API_KEY(required) and optionallyASSISTANT__AZURE_OPENAI_ENDPOINTfor post-processing. - Run the server:
- stdio transport:
uv run mcp-server-bing-search - SSE transport:
uv run mcp-server-bing-search --transport sse --port 6030(SSE URL:http://127.0.0.1:6030/sse).
- stdio transport:
- Configure your MCP client to call the server via the provided stdio or SSE JSON examples.
- Use the exposed tools from your agent:
search(query: str) -> strto perform web searches and get processed content + link hashes.click(hashes: list[str]) -> strto fetch and process specific cached URLs by hash.
Key features
- Uses Bing Search API to find web results.
- Fetches page content and converts to Markdown (Markitdown).
- Extracts and caches links with unique hashes for later retrieval.
- Optional sampling to return the most important links and optional content filtering to highlight key parts (on by default).
- Returns outputs formatted for LLM consumption.
- Supports stdio and SSE transports for MCP integration.
- Client configuration examples included for easy integration.
Use cases
- Prototyping intelligent assistants that need up-to-date web context.
- Multi-agent systems that explore and share web findings via cached link hashes.
- Research assistants: summarizing search results and extracting key links.
- Augmenting LLM responses with live web content and relevant excerpts.
- Automated workflows that require web scraping, summarization, and link exploration.
FAQ
- Do I need API keys?
Yes —
BING_SEARCH_API_KEYis required. If you want post-processing via Azure OpenAI, setASSISTANT__AZURE_OPENAI_ENDPOINT.
- How do I follow links returned by search?
The
searchtool returns link hashes. Pass those hashes toclick(hashes)to fetch and process the corresponding cached URLs.
- Can I run the server remotely or change ports?
Yes — specify transport and port when launching (e.g.,
--transport sse --port 6030).
- Is the content caching persistent?
The project caches URL-to-hash mappings locally; persistence depends on the server runtime and storage implementation.
- Can I disable sampling or filtering?
Sampling and filtering are optional features (on by default); configuration controls are available in the project code/config.
- How do I integrate this with my MCP client?
Use the provided stdio or SSE client configuration JSON snippets in the repo to add
mcp-server-bing-searchto yourmcpServersconfig.