websearch-ring
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., "@websearch-ringsearch for MCP server best practices"
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.
websearch-ring
多后端轮询 · 自动故障转移 · Keyless 优先 的网页搜索 MCP Server。
一份 index.js,零 npm 依赖,接到任意支持 stdio MCP 的客户端即可稳定联网搜索——不绑模型、不绑厂商、不强制 API Key。
3 results for "杭州周末天气" (via exa, cached)
1. 杭州天气预报…
https://…首行标明实际来源(via exa / tavily / bing),以及是否命中缓存(, cached)或被并发合并(, shared with a concurrent call)。
为什么需要它
痛点 | websearch-ring 的做法 |
单一搜索 API 挂了 / 限流 | 按环顺序自动换下一家 |
不想管一堆 API Key | 默认 keyless 通道开箱即用 |
同样 query 被子代理打爆 | TTL 缓存 + 相同并发请求合并 |
出站带用户标识 | 请求不携带任何用户标识 |
换模型后内置 websearch 不可用 | 独立 stdio MCP,客户端无关 |
Related MCP server: GroundRoute
特性
✅ 厂商轮盘:默认
exa → tavily → bing,失败 / 超时 / 限流自动 failover✅ Keyless 优先:可选
EXA_API_KEY/TAVILY_API_KEY提额度✅ TTL 缓存:默认 20 分钟(
WEBSEARCH_TTL_MS)✅ 并发合并:相同 query 并发只打一次后端
✅ 可审计:via 来源 + 失败 attempts + 截断标记
✅ 单文件:约 400 行,无构建、无 dependencies
快速开始
1. 冒烟测试(可选)
node smoke-test.mjs "杭州周末天气"预期:第一次结果无 cached,相同参数第二次含 (via …, cached)。
2. 接入(两种通用方式)
路径改成你机器上的绝对路径。
方式 A — CLI(例:Claude Code)
claude mcp add websearch-ring -- node /absolute/path/to/websearch-ring/index.js方式 B — 通用 mcpServers JSON
(Claude Desktop、Cursor 等;Codex 等 TOML 客户端把同样字段改成对应格式即可)
{
"mcpServers": {
"websearch-ring": {
"command": "node",
"args": ["/absolute/path/to/websearch-ring/index.js"],
"env": {
"WEBSEARCH_VENDORS": "exa,tavily,bing",
"WEBSEARCH_TIMEOUT_MS": "12000",
"WEBSEARCH_TTL_MS": "1200000",
"WEBSEARCH_MAX_CHARS": "12000"
}
}
}
}任何支持 command + args + env 的 MCP 客户端都是同一套路。
环境变量(全部可选)
变量 | 默认 | 说明 |
|
| 轮转顺序 |
|
| 单厂商超时 |
|
| 返回文本上限 |
|
| 缓存 TTL; |
| (空) | 空则 keyless |
| (空) | 空则 keyless |
| Chrome UA | Bing 抓取 UA |
调用流程
要点:
优先级:缓存命中 → inflight 合并 → 新跑轮转(不可颠倒)
缓存命中:不写缓存、不续 TTL;
attempts: []+cached: true直接render仅厂商成功 时
cacheSet;合并方与全失败都不写全失败:正常返回
vendor: null+attempts,仍走render,isError: true标记:
cached>coalesced(shared)> 空;有失败才出 Note 行
工具接口
Tool: web_search
参数 | 类型 | 必填 | 说明 |
| string | ✅ | 搜索词 |
| integer | 默认 8,钳制 1–20 |
与同类方案的差异
最轻:单文件、零依赖
Keyless-first,可选补 Key
缓存 + 并发合并 同时具备
via / attempts 透明
最轻量的高可用搜索环:一份 index.js,exa→tavily→bing 自动故障转移 + TTL 缓存 + 并发合并。
许可证
MIT
Available Tools
1 toolweb_searchA
Search the web. Rotates across multiple keyless search backends with automatic failover, so it stays available regardless of which chat model or provider the client uses. Returns titles, URLs and snippets, and reports which backend served the result.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| numResults | No | Number of results to return (default 8, max 20) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does this well: it reveals hidden backend rotation, keyless access, automatic failover, availability rationale, and the exact result fields returned (titles, URLs, snippets) and backend reporting.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each earning its place: purpose first, then reliability behavior, then return shape. It is tight, front-loaded, and free of filler or redundant restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter search tool with no output schema, the description covers the core purpose, the return format, and the key hidden behavior. Nothing essential is missing for an agent to select and invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents both parameters, including the default and max for numResults, so coverage is complete. The description adds no additional parameter-level meaning beyond what the schema provides, which matches the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a direct verb and resource: 'Search the web.' It immediately clarifies what the tool does, and then adds what results contain (titles, URLs, snippets). With no sibling tools to distinguish from, this is a complete purpose statement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There are no sibling tools or explicit alternatives to compare against, and the description does not state exactly when to prefer this tool. However, 'Search the web' implies general web-search use cases, and the failover/availability note adds context that it can be used across providers. This is adequate but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
web_search
TDQS
Scored across 1 tool
With only one tool, there is no possibility of overlap or confusion. The tool's purpose is clear and distinct by definition.
A single tool named web_search follows a clear verb_noun convention. Consistency is trivially maintained since there are no other tools to conflict.
One tool for a web search server is borderline. While it serves a specific purpose, the lack of any auxiliary tools (e.g., for history, preferences, or pagination) makes the server feel minimal, though not unreasonable for a focused search utility.
The tool covers the core search workflow effectively, returning titles, URLs, and snippets. However, it lacks advanced search options (filters, pagination, explicit backend selection) that could round out the surface, though these are not strictly required for basic search.
Maintenance
Related MCP Connectors
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.
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
The best web search for your AI Agent
Related MCP Servers
- AlicenseBqualityAmaintenanceOne endpoint, five search providers. Search broker for AI agents with automatic fallback, RRF ranking, and budget enforcement. The LiteLLM of web search.1397 PyPI5MIT
- AlicenseAqualityDmaintenanceWeb search for AI agents across 6 engines (Serper, Brave, Exa, Tavily, Firecrawl, Perplexity) through one search tool. Routes each query to the cheapest engine that clears a quality bar and caches repeats. Hosted, streamable-HTTP, BYOK supported.11MIT
- AlicenseAqualityCmaintenanceEnables AI agents to perform unified web searches, GitHub, and GitLab searches with caching, reranking, and fallback across multiple providers.417 npm18MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to search the web and extract content using multiple search providers, with caching, retry logic, and options for JavaScript-heavy page rendering.-