🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mcp-bing-scraper

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-bing-scraper

Free Bing search MCP server for Claude Code - No API key required

pipPyPI
Version
0.2.0
Weekly downloads
119
Maintainers
1

Bing 搜索 MCP 服务器

免费的 Bing 搜索 MCP 服务器,通过抓取 Bing 搜索结果提供搜索功能。无需 API key,完全免费!

PyPI License: MIT Python 3.10+

✨ 特性

  • 🆓 完全免费 - 无需 Bing API key,无需付费订阅
  • 🌍 智能语言检测 - 自动识别中英文查询,选择最佳搜索引擎
  • 🚀 即开即用 - 一行命令安装,无需复杂配置
  • 🔧 灵活配置 - 支持自定义结果数量(1-50)、语言偏好
  • 💪 健壮可靠 - 完善的错误处理、超时机制和重试逻辑
  • 📦 标准 MCP 协议 - 兼容所有 MCP 客户端(Claude Desktop、Claude Code、Cursor 等)
  • 🎯 精准解析 - 返回标题、URL 和摘要,格式化输出

🆚 与竞品对比

特性mcp-bing-scraper (本项目)bing-search-mcp其他搜索 MCP
💰 费用完全免费需要 Bing API Key (付费)大多需要 API Key
🔑 API Key不需要需要需要
🌐 语言支持中英文自动检测英文为主视具体实现
⚡ 安装难度一行命令需要配置环境变量需要配置
🎯 使用场景个人开发、学习、原型商业应用商业应用

📦 安装

方式 1: 使用 uvx (推荐)

uvx mcp-bing-scraper

方式 2: 使用 pip

pip install mcp-bing-scraper

方式 3: 从源码安装

git clone https://github.com/iridite/bing-search-mcp.git
cd bing-search-mcp
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e .

⚙️ 配置

Claude Code

编辑 ~/.claude/mcp.json

{
  "mcpServers": {
    "bing-search": {
      "command": "uvx",
      "args": ["mcp-bing-scraper"]
    }
  }
}

Claude Desktop

编辑配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "bing-search": {
      "command": "uvx",
      "args": ["mcp-bing-scraper"]
    }
  }
}

Cursor

在 Cursor 设置中添加 MCP 服务器配置(参考 Claude Desktop 配置)。

🎮 使用示例

基础搜索

搜索 "Python 教程"

指定结果数量

搜索 "机器学习" 返回 20 条结果

指定语言

用英文搜索 "artificial intelligence"

实际对话示例

用户: 现在地球上发生的战争有哪些?

AI 使用 bing_search 工具:

{
  "query": "current wars 2026",
  "count": 10,
  "language": "en-US"
}

返回结果:

🔍 找到 10 条搜索结果:

**1. Ukraine-Russia War: Latest Updates 2026**
🔗 https://www.bbc.com/news/world-europe-...
📝 The ongoing conflict between Ukraine and Russia continues...

**2. Middle East Conflicts 2026**
🔗 https://www.aljazeera.com/news/...
📝 Analysis of current military conflicts in the Middle East region...

...

🛠️ 工具参数

搜索网络内容。

参数:

  • query (string, 必需): 搜索查询关键词
  • count (integer, 可选): 返回结果数量,默认 10,范围 1-50
  • language (string, 可选): 语言偏好
    • auto (默认): 自动检测查询语言
    • zh-CN: 强制使用中文搜索
    • en-US: 强制使用英文搜索

返回格式:

[
  {
    "title": "搜索结果标题",
    "url": "https://example.com",
    "snippet": "搜索结果摘要..."
  }
]

🔧 高级配置

自定义超时时间

如果需要修改超时时间,可以 fork 项目并修改 server.py 中的 timeout 参数:

self.client = httpx.AsyncClient(
    timeout=60.0,  # 修改为 60 秒
    ...
)

自定义 User-Agent

修改 headers 中的 User-Agent 以适应特定需求。

🐛 故障排除

问题: 搜索返回空结果

可能原因:

  • 网络连接问题
  • Bing 搜索页面结构变化
  • 查询关键词过于特殊

解决方案:

  • 检查网络连接
  • 尝试更通用的关键词
  • 更新到最新版本: uvx --reinstall mcp-bing-scraper

问题: 超时错误

解决方案:

  • 检查网络速度
  • 减少 count 参数值
  • 稍后重试

问题: 解析错误

可能原因: Bing 页面结构更新

解决方案:

🤝 贡献

欢迎贡献!请查看 CONTRIBUTING.md 了解详情。

开发设置

git clone https://github.com/iridite/bing-search-mcp.git
cd bing-search-mcp
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

运行测试

pytest

📄 许可证

MIT License - 详见 LICENSE 文件

🔗 相关链接

⭐ Star History

如果这个项目对你有帮助,请给个 Star ⭐️

📮 反馈

有问题或建议?欢迎:

注意: 本项目仅供学习和个人使用。请遵守 Bing 的服务条款和 robots.txt 规则。商业使用建议使用官方 Bing Search API。

Keywords

ai

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts