Web Search MCP
Web Search MCP
多源网络搜索 MCP 服务器,具备 RRF 融合、4 层 URL 提取以及提供商健康跟踪功能。
状态
第二阶段:5 个提供商(SearXNG/ddgr/Tavily/Exa/opencli-zh)、RRF 融合、摘要清理(规则 + 可选 LLM 压缩)、search/extract/doctor 工具、包含自动降级的提供商健康跟踪。
Related MCP server: Prism
安装
添加到 Claude Desktop 第三方配置(~/Library/Application Support/Claude-3p/configLibrary/<uuid>.json):
{
"name": "web-search",
"source": "user",
"transport": "stdio",
"command": "node",
"args": ["/Users/hades/projects/web-search-mcp/bin/cli.js"],
"env": {
"SEARXNG_URL": "http://localhost:18443",
"TAVILY_API_KEY": "...",
"EXA_API_KEY": "...",
"FIRECRAWL_API_KEY": "...",
"WSM_LLM_PROVIDER": "haiku",
"ANTHROPIC_API_KEY": "..."
},
"toolPolicy": {
"search": "allow",
"extract": "allow",
"doctor": "allow"
}
}发布到 npm 后,将 command: "node" + 绝对路径替换为 command: "npx" + args: ["-y", "@thehappyboy/web-search-mcp@latest"]。
配置
环境变量(或当前工作目录下的 .env,或 ~/.agents/skills/web-search/.env):
变量 | 默认值 | 必填 | 描述 |
|
| 否 | SearXNG 基础 URL |
| — | 否 | 启用 Tavily 提供商 |
| — | 否 | 启用 Exa 提供商 |
| — | 否 | 在提取管道中启用 Firecrawl(第 3 层) |
|
| 否 |
|
| — | 否 |
|
| — | 否 |
|
|
| 否 | 默认最大结果数 |
|
| 否 | 全局搜索超时时间 |
没有密钥的提供商将自动禁用。搜索工具仍可使用可用的提供商。ddgr、opencli、defuddle 通过 which 自动检测。
工具
search
{
query: string, // required
max_results?: number, // 1-30, default 10
category?: 'general'|'news'|'science',
mode?: 'fast'|'quality', // quality = LLM compression (top-5 results)
providers?: string[], // override default list (replace semantics)
}返回:
{
count: number,
took_ms: number,
providers_used: string[], // providers that returned ≥1 result
providers_failed: string[], // providers that errored OR returned []
results: [{
title, url, snippet,
providers: string[], // which sources surfaced this URL (multi-source corroboration)
rrf_score: number, // reciprocal rank fusion score
}]
}opencli-zh 自动路由:当查询包含诸如 知乎、小红书、雪球、B站、微博 等关键词,或 600519.SH 等模式时,opencli-zh 提供商会路由到对应的适配器。通过 opencli_sites 强制指定特定站点(通过提供商扩展传递,参见编排器)。
extract
{
url: string, // required
timeout?: number, // 5-60 seconds, default 20
}按顺序尝试 4 层,直到某层成功:
defuddle — 最快,纯文本站点
opencli 适配器 — 适用于已知站点(知乎/小红书/雪球/B站/微博)
Firecrawl — JS 渲染页面(需要
FIRECRAWL_API_KEY)opencli 浏览器 — 最后手段,驱动真实的 Chrome
返回:
{
content: string, // markdown
source: 'defuddle'|'opencli'|'firecrawl'|'opencli-browser'|'none',
took_ms: number,
error?: string, // only when source === 'none'
}doctor
{} // no arguments返回提供商可用性及运行时健康统计:
{
providers: {
searxng: { available: true, url: "http://localhost:18443" },
ddgr: { available: true },
tavily: { available: true },
exa: { available: true },
opencli_zh: { available: true },
firecrawl: { available: true },
llm: { available: true, provider: "haiku" },
},
health: {
tavily: {
total: 24,
success: 15,
fail: 9,
success_rate: 0.625,
last_failure: "2026-07-06T...",
last_failure_reason: "timeout",
recommendation: "healthy" | "insufficient" | "degraded",
},
// ...
},
version: "0.2.0",
}当某个提供商的 success_rate 低于 0.5 且样本数至少为 20 时,该提供商将被自动跳过(建议:degraded)。健康统计保存在内存中,重启后重置。
开发
npm test # all tests (unit + integration, 158 total)
npm run test:unit # unit only
npm run test:integration # integration only (needs searxng at SEARXNG_URL)
npm start # start stdio server架构
MCP client (Claude/Cowork)
│ JSON-RPC over stdio
▼
server.js ───┬── search tool ──→ search.js (orchestrator)
├── extract tool ─→ extract/index.js (4-layer pipeline)
└── doctor tool ──→ health tracker snapshot
search.js:
Provider layer (parallel, isolated failure)
searxng | ddgr | tavily | exa | opencli-zh
▼
Merger layer: normalize → dedup(URL) → RRF(k=60)
▼
Cleaner layer: rules (default) | LLM compression (quality mode, top-5)
▼
Health tracker records success/failure per provider
extract/index.js:
defuddle → opencli adapter → Firecrawl → opencli browser
(each layer returns null on failure, falls through to next)阶段历史
第一阶段(15 项任务):4 个提供商(searxng/ddgr/tavily/exa)、RRF 融合、基于规则的清理、stdio MCP、仅
search工具第二阶段(8 项任务):opencli-zh 提供商、LLM 质量模式、4 层
extract、doctor+ 健康自动降级
许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for web search with LLM-optimized results and anti-detection mechanisms.328MIT
- Alicense-qualityCmaintenanceMulti-level web search MCP server that wraps Claude, Gemini, Perplexity, and Tavily behind a unified interface, enabling multi-depth searches with session management and provider selection.MIT
- Alicense-qualityAmaintenanceMulti-engine aggregated search MCP server that combines results from 7 search engines with deduplication, relevance ranking, and web page content extraction.1MIT
- Alicense-qualityBmaintenanceMCP server for multi-engine web search and web page fetching, supporting parallel search, content extraction, and optional LLM-powered search summarization and deep search.2MIT
Related MCP Connectors
MCP server for Google search results via SERP API
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Fast, intelligent web search and web crawling. New mcp tool: Exa-code is a context tool for coding
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thehappyboy/web-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server