shensou

shensou

An MCP server for divergent iterative web search that anchors on a question, proposes keyword queries, gathers evidence, and outputs a question-map and synthesis.

Category
访问服务器

README

深搜 · shensou

Divergent iterative web search. Anchor on one question; an explorer LLM keeps proposing keyword queries, reads what the web returns, distills it into findings, and then branches the next round toward the facets it hasn't understood yet — with an adversarial slice that deliberately hunts counter-evidence. Low-yield queries are triaged into genuine knowledge gaps vs. bad phrasing. It ends with a question-map (distinct branches + next steps) and a big-picture synthesis.

Not "one query → ten links." It's a loop that opens a question — novelty-deduped so it keeps reaching for new angles instead of re-searching what it already knows.

Provider-agnostic: the explorer is any OpenAI-compatible model; search is the Brave Search API. Ships as an MCP tool, a web demo, and a CLI.

深搜 run

<sub>Illustrative example — rounds of queries (extend + counter), findings, blind spots, and the final question-map.</sub>

How the loop works

question
   │  explorer LLM seeds N keyword queries (extend + counter)
   ▼
 ┌── search each (Brave) ──► evidence
 │        │
 │        ▼  explorer digests → findings (facets on the question)
 │        ▼  proposes next round's queries — cover what's NOT yet understood
 │   novelty filter (Jaccard) drops anything too close to past queries
 └───◄ loop until budget / saturation / max rounds
   │
   ├─ triage low-yield queries → knowledge gaps vs typos
   ├─ curate → question-map { direct, overview, branches[next/premise/cost], more }
   └─ synthesize → big-picture narrative

Key behaviours: anchored (every query serves the main question, no drift), adversarial (each round seeks reasons it's wrong), coverage-driven (branches toward gaps), novelty-deduped (won't spin on near-duplicate searches).

Quick start

git clone https://github.com/taoyongac/shensou
cd shensou
pip install -r requirements.txt
cp .env.example .env        # set EXPLORER_MODEL/API_KEY + BRAVE_API_KEY

CLI

set -a; source .env; set +a
python -m shensou "CRISPR base editor off-target 2025 controversy"
python -m shensou -b 32 "your question"      # bigger search budget
python -m shensou --json "your question" > record.json

Web demo

set -a; source .env; set +a
python web/server.py        # → http://127.0.0.1:8040

MCP server — add to your host config (e.g. Claude Code ~/.claude.json), with the EXPLORER_* + BRAVE_API_KEY vars in its environment:

{
  "mcpServers": {
    "shensou": {
      "command": "python",
      "args": ["/abs/path/to/shensou/mcp_server/server.py"],
      "env": { "EXPLORER_MODEL": "gpt-4o", "EXPLORER_API_KEY": "sk-...",
               "BRAVE_API_KEY": "..." }
    }
  }
}

Then call deep_search(question, budget) — it runs the full loop and returns a structured record (findings, blind spots, map, synthesis). It makes many sequential LLM + search calls, so a run takes minutes; size it with budget (4–96).

Configuration

All via environment (see .env.example).

var meaning default
EXPLORER_MODEL explorer model id (required) OPENAI_MODEL
EXPLORER_BASE_URL / EXPLORER_API_KEY OpenAI-compatible endpoint OPENAI_*
BRAVE_API_KEY / BRAVE_API_KEYS Brave Search key(s)
SHENSOU_BUDGET default searches per run 24
SHENSOU_ROUND_WIDTH / SHENSOU_NARROW_WIDTH queries per round / late-game 5 / 2
SHENSOU_MAX_ROUNDS round cap 12
SHENSOU_TAU novelty threshold (0–1) 0.30
SHENSOU_ADVERSARIAL include counter-evidence queries 1
SHENSOU_LANG / SHENSOU_COUNTRY Brave search locale en / US

The web demo also reads SHENSOU_HOST/PORT and optional SHENSOU_USER/PASS (HTTP Basic Auth). A global lock serializes web runs (concurrency = 1) so a shared demo never piles up parallel searches.

Notes

  • Get a Brave Search API key at https://brave.com/search/api/ (free tier exists).
  • Multiple BRAVE_API_KEYS are rotated on rate-limit; calls are serialized to respect the ~1 req/s free-tier cap. No usage state is written to disk.
  • The search provider is the one swappable piece — shensou/search.py is a small typed module; drop in another engine behind the same search(q, count) contract.

From the Tao Lab

Built and used at Tao Lab, School of Life Sciences, Yunnan University (云南大学 · 陶勇课题组) — epigenetics, aging, cancer, and AI-for-Science. 深搜 is the lab's tool for turning a fuzzy question into a mapped, evidence-anchored understanding — and its sibling 三人行 / sanrenxing opens the same question divergently across three AI seats.

🔗 Lab site: https://taolab.tail0ea5ac.ts.net/

License

MIT © 2026 Yong Tao (Tao Lab, Yunnan University). See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选