agg-search
Integrates Brave Search as one of the parallel recall engines, using a Brave API key to retrieve web results that are fused and reranked with results from other engines.
Uses a local Ollama model for RAG-Fusion query expansion and optional cited answer generation, enriching searches and producing answer summaries without requiring a hosted model API.
Integrates SearXNG as a search engine source in the multi-engine recall pool, allowing results from a SearXNG instance to be aggregated and reranked alongside other search providers.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agg-search search for the latest rust async runtime comparisons, top 5 results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agg-search
多引擎并行召回 + RRF 融合 + Jina 精排的搜索工具链:CLI + MCP server + 分层抓取,宿主机零依赖(纯 Python 标准库)。
A multi-engine search stack for agents: parallel recall across eight engines, RRF fusion, listwise reranking, optional query expansion and cited answers, plus a tiered fetcher. Ships as a CLI and an MCP server. Standard library only on the host.
真实一次运行的输出:7 个引擎返回结果,DeepSeek 因余额不足进入冷却、被跳过;空结果不阻塞其余引擎。
为什么又一个搜索聚合器
同类项目不少,但多数是「多引擎 + 简单合并」或「零 key 依赖单一索引」。这个项目的差异在四件事:
DeepSeek 搜索/抓取是一等公民 —— 官方
/v1/tools/search自带rerank_score,/v1/tools/fetch服务端取页直接给 Markdown,省掉容器。抓取是阶梯而不是一个函数 —— DeepSeek Fetch → 静态 → 动态 → 反爬,逐级升级,跑在隔离容器里,宿主机不装浏览器。
排序是两阶段 —— RRF 粗排前 15,再交给 Jina Reranker v3.5 listwise 精排;模型不可用链式回退 v3 → v2,全失败则保留 RRF 顺序,绝不阻塞。
韧性层是显式的 —— 5 分钟磁盘缓存、按错误类型分级的冷却(额度 1h / 反爬 10min / 超时 90s)、引擎健康上报,缺 key 的引擎提前剔除不占线程。
Related MCP server: jina-web-mcp
架构
flowchart LR
Q[query] --> X[query expansion<br/>local ollama]
X --> A[exa]
X --> B[brave]
X --> C[serper]
X --> D[deepseek]
X --> E[firecrawl]
X --> F[anysearch]
X --> G[tavily]
X --> H[searxng]
A & B & C & D & E & F & G & H --> R[RRF fusion<br/>top 15]
R --> J[jina rerank v3.5<br/>fallback v3 → v2]
J --> O[top N results<br/>+ provenance + health]
O --> AN[optional cited answer]安装
git clone https://github.com/TsukimioRinka/agg-search
cd agg-search
python3 -m pip install -e .只想要脚本、不想装包也行:PYTHONPATH=src python3 -m agg_search.search "query"。
使用
# 搜索
agg-search "rust async runtime comparison" --top-n 10 --recency month
# 机器可读输出
agg-search "MCP server examples" --json
# RAG-Fusion 查询扩展(需要本地 ollama)
agg-search "vector database tradeoffs" --expand 3
# 带引用的答案段(本地 ollama;--answer deepseek 走 API)
agg-search "what changed in Python 3.13" --answer
# 快速模式:单池扇出,最早两个有结果的引擎就返回
agg-search "breaking news" --fast
# 抓取正文:DeepSeek Fetch 优先,失败落容器阶梯
crawl-fetch --url https://example.com/post --tier auto --out md密钥只从环境变量读(也兼容 ~/.config/agent-env、~/.config/ai-keys.env 的 KEY= 行)。缺失的引擎会被跳过,不会让整次搜索失败。完整变量表见 docs/environment.md。
MCP server
{
"mcpServers": {
"agg-search": {
"command": "agg-search-mcp",
"env": { "BRAVE_API_KEY": "...", "EXA_API_KEY": "..." }
}
}
}暴露两个工具:
工具 | 参数 | 说明 |
|
| 并行召回 + RRF + 精排,返回 JSON |
|
| 分层抓取正文 |
服务用换行分隔的 JSON-RPC 2.0,initialize / tools/list / tools/call / ping 都已实现,可直接挂到 MCP 客户端。
同类项目对比
只列能核实的能力,语言一列仅在仓库自述里明确时填写:
项目 | 栈 | 它强在哪 | 与本项目的差别 |
Rust | 13 个 provider,单一二进制 | 本项目免编译;多容器抓取阶梯与 DeepSeek Fetch 是一等路径 | |
TypeScript | SSRF 安全抓取、注入防御( | 它的抓取安全与内容抽取比本项目完整;本项目的差异在 8 引擎并行 + RRF→Jina listwise 两阶段排序、DeepSeek Search/Fetch、RAG-Fusion 扩展与容器化的静态→动态→反爬阶梯 | |
— | 300+ 来源、18 语言、MCP/CLI | 本项目只做通用网页检索,覆盖面窄;差异在排序链路与成本控制更细 | |
Go | 零 key 可跑、多引擎 + 学术源 | 本项目按 key 选择性启用引擎,不承诺零 key | |
— | 自托管、无 key、Tavily 兼容端点 | 本项目是客户端编排层,不提供兼容 API |
测试
PYTHONPATH=src python3 -m unittest discover -s tests -v离线测试只覆盖纯函数(域名归并、去重、RRF、冷却分类、缓存键),不发起网络请求、不消耗额度。
安全与隐私
仓库内不含任何密钥、账号、内网地址;
.env.example只有空占位。密钥只在进程环境里读取,不写日志、不落盘。
抓取在容器内执行,宿主机不留浏览器与爬虫依赖。
License
MIT
Available Tools
2 toolsfetchC
Fetch page text. Tries the DeepSeek Fetch API first (no container), then a static -> dynamic -> stealth container ladder.
Inputs: urls (required), out, tier, text_limit.
searchB
Parallel multi-engine web search with RRF fusion and Jina reranking. Returns JSON with ranked results, engine provenance and engine health.
Inputs: query (required), fast, top_n, answer, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Search and fetch have clearly separate roles: search discovers ranked results across engines, while fetch retrieves the full text of a specific URL. An agent can easily decide which to use with no overlap.
Both tool names are single, concrete verbs (search, fetch) following a consistent action-oriented convention. There is no mixing of casing or verb styles.
Two tools is thin for a search aggregation server, though both are essential to the core workflow. The surface feels minimal and could reasonably include health or configuration operations.
The search-plus-fetch pair covers the main retrieval pipeline well. Minor gaps exist, such as no dedicated engine-health or batch-fetch operation despite health data being referenced in search output.
Maintenance
Related MCP Connectors
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Web knowledge fetching tools for your agent.
Web search for AI agents — one tool across 6 engines, routed to the cheapest + cached.
Agent-native search engine with live web research optimized for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables web content retrieval and semantic search capabilities through the Jina AI API. Provides tools to fetch content from URLs and perform intelligent web searches with natural language queries.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables web search and webpage scraping using Jina AI services.-
- AlicenseNot gradedqualityDmaintenanceProvides multi-provider web search capabilities with fallback chains, semantic reranking, and content extraction for grounded agent retrieval.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to run local multi-engine web searches, fetch pages through anti-bot fallback chains, and query site-specific sources such as GitHub, npm, PyPI, Docker Hub, and Twitter/X for structured results.3MIT