mcp-bing-search

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.

Category
Visit Server

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
  1. Request — httpx GETs https://cn.bing.com/search?q=... with a desktop browser User-Agent.
  2. Parse — lxml XPath extracts title / url / snippet from li.b_algo nodes.
  3. Relevance check — if no result title/url contains any query token (e.g. "本地大模型", "部署教程"), the result set is considered irrelevant.
  4. Fallback — on empty/irrelevant Bing results, tries 360 → Sogou and uses the first engine with relevant results.
  5. Link cleanup — redirect links (so.com/link?m=..., /link?url=...) are resolved once more to their real destination (Location header or window.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 fallback or cn_search for 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured