这是一个用于微软 Bing 搜索 API 集成的 Model Context Protocol (MCP) 服务器,它能让 AI 助手执行网络、新闻和图像搜索,为信息获取提供便利。
本服务器允许 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 配置文件(~/Library/Application Support/Claude/claude_desktop_config.json 在 macOS 上或 %APPDATA%\Claude\claude_desktop_config.json 在 Windows 上)中添加以下内容:
{
"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")
MIT License