mcp-bing-search
mcp-bing-search
一个本地 MCP 服务器,用于网页搜索,可在中国境内使用,且无需任何 API 密钥。
主要引擎:Bing(
cn.bing.com)针对最新中文热门话题的自动回退:Qihoo 360 → Sogou
将搜索引擎的重定向链接解析为真实 URL
它是为了替代公共 searxng 实例(例如 baresearch.org)而构建的,这些实例在中国大陆无法访问,并且对中文长尾查询无法返回结果。
并非微软官方
mcp-server-bing-search(该服务需要 API 密钥)——这是一个无需密钥、面向中国的替代方案。
为什么会存在这个问题
问题 | 本项目的解决方案 |
公共 searxng 实例在中国大陆无法访问 | 直接请求 |
无 API 密钥 / 无付费 | 爬取搜索结果页面(HTML 解析),无需密钥 |
Bing 对中国校区/热门话题的索引不佳 |
|
Baidu 会通过验证码阻止自动请求 | 目标明确不使用 Baidu |
Related MCP server: Heventure Search MCP
功能
web_search(query, max_results, fallback)— 优先使用 Bing;如果结果不相关(常见于非常新的中文话题),会自动尝试 360 → Sogou 进行重试。cn_search(query, max_results)— 直接搜索中文引擎(360 → Sogou)。重定向链接解析 — 360/Sogou 的加密跳转链接(
so.com/link?m=...)会被解析为最终真实地址(支持 HTTP 重定向和 JS 重定向)。自包含的单文件;仅依赖
mcp、httpx、lxml。
安装
方法 A:pip(推荐)
pip install mcp-bing-search方法 B:从源码安装
git clone https://github.com/Quqing-future/mcp-bing-search.git
cd mcp-bing-search
pip install .
# or run directly without installing:
python mcp_bing_search.py使用 Reasonix 配置
添加到全局 config.toml(所有项目)或项目上的 reasonix.toml:
[[plugins]]
name = "bing-search"
command = "python" # or the absolute path to python.exe
args = ["-m", "mcp_bing_search"] # if installed via pip
# args = ["/path/to/mcp_bing_search.py"] # if running from source或者使用标准的 .mcp.json:
{
"mcpServers": {
"bing-search": {
"command": "python",
"args": ["-m", "mcp_bing_search"]
}
}
}更改会在下一个会话中生效。工具会显示为 mcp__bing-search__web_search 和 mcp__bing-search__cn_search。
与其他 MCP 客户端配置
任何 MCP 客户端都可以使用 — Claude Desktop、Cursor、VS Code 等。将其指向:
python -m mcp_bing_search
# or
python /path/to/mcp_bing_search.py工具
web_search(query: str, max_results: int = 8, fallback: bool = True) -> str
搜索网页。优先使用 Bing;如果启用了 fallback,并且 Bing 没有返回相关结果(没有包含查询词的标题/URL),则使用 360,然后使用 Sogou 重试。
cn_search(query: str, max_results: int = 8) -> str
直接搜索中文引擎(360 → Sogou)。用于最新的中文热门话题、校园/微博新闻,或者任何 Bing 都无法很好地索引的内容。
工作原理
MCP client (Reasonix / Claude Desktop / ...)
↕ stdio + JSON-RPC
mcp_bing_search.py (MCP server)
↕ HTTPS (plain HTTP GET, browser User-Agent)
cn.bing.com → www.so.com → www.sogou.com请求 —
httpx使用桌面浏览器 User-Agent 发送 GET 请求到https://cn.bing.com/search?q=...。解析 —
lxmlXPath 从li.b_algo节点中提取title / url / snippet。相关性检查 — 如果没有任何题/URL 包含查询词(例如 "kubectl", "部署教程"),则结果集会被视为不相关。
回退 — 当 Bing 结果为空或不相关时,尝试 360 → Sogou,并使用第一个有相关结果的引擎。
链接清理 — 将重定向链接(
so.com/link?m=...,/link?url=...)解析为它们的真实地址(支持 HTTP 重定向和 JS 重定向)。
已知限制
抓取内容依赖搜索引擎的 HTML 结构;重新设计可能会导致解析失效。
没有 key = 没有服务等级协议;频繁访问可能会被限流。
Bing 对最新中文社交媒体话题的覆盖较弱 — 在这些情况下使用
fallback或cn_search。有意不使用 Baidu:它对自动请求的验证码限制非常严格。
ToS 免责声明:本项目通过理解公共搜索结果页面的内容工作。它仅供个人/教育使用,并不不声称符合 Bing、Qihoo 360 或 Sogou 的服务条款。抓取内容可能违反这些条款;自动访问可能会被限流或阻止。请自行承担风险,并考虑在生产环境中使用官方搜索 API。
许可证
MIT © Quqing-future
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceWeb search using free multi-engine search (NO API KEYS REQUIRED) — Supports Bing, Baidu, DuckDuckGo, Brave, Exa, and CSDN.53,8011,731Apache 2.0
- AlicenseAqualityCmaintenanceEnables web search without API keys using DuckDuckGo and Bing search engines, and retrieves webpage content. Supports multiple search engines simultaneously with privacy protection and asynchronous processing.27MIT
- AlicenseAqualityDmaintenanceProvides Bing Chinese search and webpage crawling tools, enabling AI assistants to fetch real-time web information without API keys.233266MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform query-driven web searches and fetch page content via Bing and DuckDuckGo engines, with automatic fallback and no API keys needed.MIT
Related MCP Connectors
The best web search for your AI Agent
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
x402-gated web search gateway. Tools: search, search_enriched.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Quqing-future/mcp-bing-search'
If you have feedback or need assistance with the MCP directory API, please join our Discord server