一个用于集成微软Bing搜索API的模型上下文协议(MCP)服务器,允许AI助手执行网页、新闻和图像搜索。
uv venv source .venv/bin/activate # 在Windows上:.venv\Scripts\activate uv pip install -e .
设置所需的环境变量:
export BING_API_KEY="your-bing-api-key"
export BING_API_URL="https://api.bing.microsoft.com/" # 可选

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

uvx bing-search-mcp
将以下内容添加到您的Claude Desktop配置文件中(在macOS上为~/Library/Application Support/Claude/claude_desktop_config.json
,在Windows上为%APPDATA%\Claude\claude_desktop_config.json
):
{
"mcpServers": {
"bing-search": {
"command": "uvx",
"args": [
"/path/to/your/bing-search-mcp"
],
"env": {
"BING_API_KEY": "your-bing-api-key"
}
}
}
}

用于信息、网站和内容的一般网页搜索。
bing_web_search(query: str, count: int = 10, offset: int = 0, market: str = "en-US")

用于新闻文章和当前事件的搜索。
bing_news_search(query: str, count: int = 10, market: str = "en-US", freshness: str = "Day")

用于图像的搜索。
bing_image_search(query: str, count: int = 10, market: str = "en-US")
