mcp-bing-search
Enables web search from mainland China without an API key, using Bing with automatic fallback to Qihoo 360 and Sogou, and resolves redirect links to real URLs.
README
mcp-bing-search
A local MCP server for web search that works from mainland China without any API key.
- Primary engine: Bing (
cn.bing.com) - Automatic fallback for fresh Chinese trending topics: Qihoo 360 → Sogou
- Resolves search-engine redirect links to real URLs
It was built to replace public searxng instances (e.g. baresearch.org), which are
unreachable from mainland China and return nothing for Chinese long-tail queries.
Not affiliated with Microsoft's official
mcp-server-bing-search(which requires an API key) — this is a no-key, China-friendly alternative.
Why this exists
| Problem | This project's answer |
|---|---|
| Public searxng instances unreachable from mainland China | Direct request to cn.bing.com, which is reachable without a proxy |
| No API key / no billing | Scrapes the search result page (HTML parsing), no key needed |
| Bing indexes Chinese campus/trending topics poorly | fallback automatically retries with 360 / Sogou |
| Baidu blocks automated requests with captchas | Baidu is intentionally not used |
Features
web_search(query, max_results, fallback)— Bing first; when results are irrelevant (common for very fresh Chinese topics), automatically retries 360 → Sogou.cn_search(query, max_results)— search Chinese engines directly (360 → Sogou).- Redirect-link resolution — 360/Sogou's encrypted jump links (
so.com/link?m=...) are resolved to the final real URL (HTTP redirects and JS redirects supported). - Self-contained single file; only depends on
mcp,httpx,lxml.
Install
Option A: pip (recommended)
pip install mcp-bing-search
Option B: from source
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
Configure with Reasonix
Add to your global config.toml (all projects) or project 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
Or use the standard .mcp.json:
{
"mcpServers": {
"bing-search": {
"command": "python",
"args": ["-m", "mcp_bing_search"]
}
}
}
Changes take effect on the next session. Tools appear as
mcp__bing-search__web_search and mcp__bing-search__cn_search.
Configure with other MCP clients
Any MCP client works — Claude Desktop, Cursor, VS Code, etc. Point it at:
python -m mcp_bing_search
# or
python /path/to/mcp_bing_search.py
Tools
web_search(query: str, max_results: int = 8, fallback: bool = True) -> str
Search the web. Bing first; if fallback is enabled and Bing returns no relevant
results (no title/url contains a query token), retries with Qihoo 360, then Sogou.
cn_search(query: str, max_results: int = 8) -> str
Search Chinese engines directly (360 → Sogou). Use for fresh Chinese trending topics, campus/weibo news, or anything Bing indexes poorly.
How it works
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
- Request —
httpxGETshttps://cn.bing.com/search?q=...with a desktop browser User-Agent. - Parse —
lxmlXPath extractstitle / url / snippetfromli.b_algonodes. - Relevance check — if no result title/url contains any query token (e.g. "本地大模型", "部署教程"), the result set is considered irrelevant.
- Fallback — on empty/irrelevant Bing results, tries 360 → Sogou and uses the first engine with relevant results.
- Link cleanup — redirect links (
so.com/link?m=...,/link?url=...) are resolved once more to their real destination (Location header orwindow.location.replace(...)).
Known limitations
- Scraping depends on the engines' HTML structure; a redesign may break parsing.
- No key = no SLA; very frequent calls may be rate-limited.
- Bing's coverage of fresh Chinese social-media topics is weak — use
fallbackorcn_searchfor those. - Baidu is excluded on purpose: it aggressively captchas automated requests.
- ToS disclaimer: this project works by parsing public search-result pages. It is provided for personal / educational use and does not claim to comply with the terms of service of Bing, Qihoo 360, or Sogou. Scraping may violate those terms; automated access may be throttled or blocked. Use at your own risk, and consider the official Search APIs for production use.
License
MIT © Quqing-future
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.