SearchHub MCP server
io.github.woodcoal/searchhub·v0.1.10·3 starsAggregate Serper, Tavily, Exa and AnySearch behind one MCP-ready API with key rotation and quotas.
3 stars120 downloads/wk
Reviews
Write oneNobody has reviewed SearchHub yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
SearchHub tools (3)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
searchhub_providers列出内置供应商及其支持的能力(时间范围、站内限定、地域、语言、翻页等)。
searchhub_search通过 SearchHub 聚合网关执行网络搜索,自动在多家供应商(Serper/Tavily/Exa/AnySearch)之间轮换密钥与容灾切换。返回标题、链接、摘要等结构化结果。
searchhub_status查看各搜索供应商的启用状态、熔断状态、可用/冷却/隔离的密钥数量与调用统计。
Public scan report
scanner v0.1.10 · 2026-11-01 · same rubric, same numbers if you re-run it
- Code scan30 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 41 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How SearchHub compares
Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 78/100
- higher than 62% of 3,472 Web search servers
- Tools
- 3
- the typical Web search server has 5
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 3
- more than 73% of 1,783 Web search servers
- Downloads a week
- 120
- more than 62% of 816 Web search servers with a package
What its tools let an agent do: 3 read
Install SearchHub in Claude Code, Cursor or VS Code
Runs npx -y searchhub on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add searchhub -- npx -y searchhub
What the publisher says
From the SearchHub repository's README, as published. We do not edit it. Read it on GitHub
SearchHub
English README · npm · Issues
面向 AI Agent 的自托管搜索容灾网关
One protocol. Multiple search providers. Automatic key rotation and failover.
SearchHub 把 Serper、Tavily、Exa、AnySearch 等搜索 API 统一成一个协议,并集中处理 API Key 轮换、限流、配额、供应商故障切换和熔断。
它适合需要稳定联网搜索能力的 MCP 客户端、AI Agent、RAG 应用和内部自动化服务。
为什么用 SearchHub?
单个搜索供应商出问题时,Agent 不应该直接失明:
- 一个 Key 失效或被限流:自动换下一个 Key
- 一个供应商故障或超时:自动切换供应商
- 连续失败:熔断,冷却后半开探测
- 每个 Key 独立设置 QPS、日/月/总配额
- HTTP API、CLI、MCP 和管理后台统一提供
- 自托管,密钥和调用日志留在自己的机器上
界面预览
概览 —— 每个供应商一张卡片:熔断状态、可用密钥数、冷却 / 隔离数、能力标签与全局默认配额。
搜索调试 —— 一次真实调用。第一把 Exa 密钥返回配额耗尽(keyQuotaExhausted),系统自动换到第二把并成功返回;调用链路把两次尝试完整记录下来,一眼看清命中了谁、用了哪把 Key、有没有降级。
供应商配置 —— 按权重(优先级)排序。全局 QPS 与三级配额可作为兜底,密钥里留空的字段自动继承;超时、单供应商最大换 Key 次数、熔断阈值与冷却时长都可调。
用量统计 —— 按尝试次数统计,含最近 24 小时与 14 天趋势、分供应商与分密钥的成功率、平均耗时与最近错误。
API 接口 —— 内置接口文档:认证方式、请求格式,以及各供应商在分页上的能力差异。
30 秒启动
npm 全局安装
要求 Node.js >= 22(推荐 24,Active LTS)。
npm install -g searchhub
searchhub start打开 ,使用启动日志中的管理密码登录后台。
生产环境务必固定管理密码和加密密钥。下面两条命令可以直接生成强随机值:
export SEARCHHUB_SECRET=$(openssl rand -hex 32)
export SEARCHHUB_ADMIN_PASSWORD=$(openssl rand -base64 18)
searchhub start这两项保护的是你的上游供应商密钥和后台登录。示例里出现的 change-me 只是占位符,直接沿用会让密钥加密形同虚设。
另外 SEARCHHUB_SECRET 一旦设置就不要再改——它是密钥的解密主密钥,改了之后已落盘的供应商密钥将无法解密。
npx 试用
npx searchhub startDocker Compose
curl -O https://raw.githubusercontent.com/woodcoal/SearchHub/main/docker-compose.yml
cat > .env <<EOF
SEARCHHUB_SECRET=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
SEARCHHUB_ADMIN_PASSWORD=$(node -e "console.log(require('crypto').randomBytes(12).toString('base64url'))")
# 可选:启动时自动加入供应商密钥
# SERPER_KEYS=...
# TAVILY_KEYS=...
# EXA_KEYS=...
# ANYSEARCH_KEYS=...
EOF
docker compose up -d --build打开 。数据和日志保存在 Docker 命名卷 searchhub-data 中。
注意 heredoc 用的是 <<EOF 而不是 <<'EOF'(不加引号),这样 $(...) 才会被 shell 展开。用 Node 生成是因为它本来就是本项目的运行前提,且跨平台一致。
生成的值请自行保管:SEARCHHUBSECRET 是供应商密钥的解密主密钥,设置之后不要再更改**;改了已落盘的密钥将无法解密。
不要把 .env 提交到 Git。生产环境请把 SEARCHHUBADMINPASSWORD、SEARCHHUB_SECRET 和供应商密钥放进安全的 Secret 管理系统。
第一次配置
- 登录管理后台。
- 进入「供应商」或「密钥管理」,添加 Serper / Tavily / Exa / AnySearch 的 API Key。
- 进入「API 授权」,创建一个调用方 API Key。
- 用调试台或 CLI 发起第一次搜索。
searchhub keys add serper '<provider-key>' --label primary --qps 2
searchhub keys add tavily '<provider-key>' --label backup --monthly-quota 1000
searchhub apikey create my-agent
searchhub search "latest MCP servers" --size 5供应商密钥和 SearchHub 调用方 API Key 是两套凭据:前者用于访问上游搜索服务,后者用于保护 SearchHub 接口。
MCP 接入
本地 stdio
适用于 Claude Desktop、Cursor、Cline 等支持本地 MCP 的客户端:
{
"mcpServers": {
"searchhub": {
"command": "searchhub",
"args": ["mcp"]
}
}
}CLI 会从当前目录 .env 和环境变量读取配置。也可以指定数据目录:
{
"mcpServers": {
"searchhub": {
"command": "searchhub",
"args": ["mcp", "--home", "/path/to/searchhub-data"]
}
}
}Streamable HTTP
主服务启动后默认提供 /mcp:
{
"mcpServers": {
"searchhub": {
"url": "http://your-host:8787/mcp",
"headers": {
"x-api-key": "sh_xxxxxxxxxx"
}
}
}
}也可以只启动 MCP HTTP 服务:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
SearchHub: common questions
- Is SearchHub MCP server safe?
- Mostly: it is graded B (78/100). Read the SearchHub safety report
- How do I install SearchHub?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does SearchHub need an API key?
- Yes. The registry entry asks for
SEARCHHUB_SECRET. - Is SearchHub maintained?
- The last commit was 42 days ago (2026-09-21). The latest release is v0.1.10.
- What can I use instead of SearchHub?
- Servers from other publishers that do the same job: Tavily MCP server, Exa Search MCP server and Free Search MCP server.
- How does SearchHub compare with other Web search MCP servers?
- safety score 78/100 (higher than 62% of 3,472 Web search servers); tools 3 (the typical Web search server has 5); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to SearchHub
Same job from other publishers: the closest match first, then the best rated.
- TavilyMCP server for advanced web search using Tavilynot reviewedWidely usedA
- Exa SearchSearch the live web and fetch clean content from source pages.not reviewedEstablishedA
Free SearchNo-API-key web search, page fetching and document reading across many engines. Local-first.not reviewedEstablishedB- ExaConnect AI agents to Exa for web search, content fetching, and multi-step research.not reviewedEstablishedA
- Keyline IconsSearch Keyline Icons by name and get any icon's SVG source or React import. No key, no network.not reviewedEstablishedA