dsh-free-search 0.9.63 → 0.9.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/client.js +1 -1
- package/lib/mcp_engines.js +113 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -548,7 +548,7 @@ Search engine test:
|
|
|
548
548
|
npx -y -p dsh-free-search dsh-free-search-mcp
|
|
549
549
|
```
|
|
550
550
|
|
|
551
|
-
`web_search` 默认只自动调用免 key 的 Bing / DuckDuckGo;在参数或 `MCP_SEARCH_ENGINE` 里显式点名 `google` / `baidu` / `brave` / `metaso` / `yandex` / `yuanbao` / `deepseek-tools` / `zhipu` 时才会使用付费引擎;`anysearch` / `searxng` / `exa` / `tavily` / `keenable` / `firecrawl` / `parallel` / `you` 可显式选择,且有免 key
|
|
551
|
+
`web_search` 默认只自动调用免 key 的 Bing / DuckDuckGo;在参数或 `MCP_SEARCH_ENGINE` 里显式点名 `google` / `baidu` / `brave` / `metaso` / `yandex` / `yuanbao` / `deepseek-tools` / `zhipu` / `perplexity` / `serpbase` / `serply` / `outcrawl` / `tinyfish` / `jina` / `kimi` / `aliyun` / `doubao` / `zhihu-global` / `zhihu-site` / `specstream` / `deepseek-official` / `openai` / `gemini` / `claude` 时才会使用付费引擎;`anysearch` / `searxng` / `exa` / `tavily` / `keenable` / `firecrawl` / `parallel` / `you` 可显式选择,且有免 key 档;`degoog` 需要 `MCP_DEGOOG_INSTANCES`。支持 `time_range`(day/week/month/year)。`advanced_search` 是同一后端的兼容别名,便于按宿主工具名调用。`web_fetch` 仍走直连 / 浏览器 / Exa / Firecrawl。`multi_search` 并行合并多个引擎(默认只跑免费引擎),`domain_search` 直查包/论文/CVE/财报/金融/法律等垂直源,`platform_search` 直查 GitHub/HN/Reddit/npm/Wikipedia/Bilibili/V2EX/掘金/豆瓣/Qiita/YouTube/Vimeo/X,`video_search` 查 Bing/DDG 视频,`research` 做轻量多引擎检索 + 抓取 + 证据摘要,`weather` 查询 1–7 天天气;不监听端口。Claude Desktop 配置示例:
|
|
552
552
|
|
|
553
553
|
```json
|
|
554
554
|
{
|
|
@@ -1292,7 +1292,7 @@ The repo also ships a standalone stdio MCP server for Claude Desktop, Cursor, Co
|
|
|
1292
1292
|
npx -y -p dsh-free-search dsh-free-search-mcp
|
|
1293
1293
|
```
|
|
1294
1294
|
|
|
1295
|
-
`web_search` auto-runs only the keyless Bing / DuckDuckGo engines; a keyed engine (`google` / `baidu` / `brave` / `metaso` / `yandex` / `yuanbao` / `deepseek-tools` / `zhipu`) runs only when named in the argument or `MCP_SEARCH_ENGINE`; `anysearch` / `searxng` / `exa` / `tavily` / `keenable` / `firecrawl` / `parallel` / `you` can also be named explicitly and have keyless tiers
|
|
1295
|
+
`web_search` auto-runs only the keyless Bing / DuckDuckGo engines; a keyed engine (`google` / `baidu` / `brave` / `metaso` / `yandex` / `yuanbao` / `deepseek-tools` / `zhipu` / `perplexity` / `serpbase` / `serply` / `outcrawl` / `tinyfish` / `jina` / `kimi` / `aliyun` / `doubao` / `zhihu-global` / `zhihu-site` / `specstream` / `deepseek-official` / `openai` / `gemini` / `claude`) runs only when named in the argument or `MCP_SEARCH_ENGINE`; `anysearch` / `searxng` / `exa` / `tavily` / `keenable` / `firecrawl` / `parallel` / `you` can also be named explicitly and have keyless tiers; `degoog` needs `MCP_DEGOOG_INSTANCES`. It supports `time_range` (day/week/month/year). `advanced_search` is a compatibility alias over the same backend for hosts that call that tool name. `web_fetch` still uses direct / browser / Exa / Firecrawl. `multi_search` merges several engines in parallel (free engines by default), `domain_search` queries structured package/paper/CVE/filing/finance/law sources, `platform_search` queries GitHub/HN/Reddit/npm/Wikipedia/Bilibili/V2EX/Juejin/Douban/Qiita/YouTube/Vimeo/X, `video_search` queries Bing/DDG videos, `research` runs a lightweight multi-engine search + fetch + evidence brief, and `weather` returns a 1-7 day forecast; the server does not listen on a port. Claude Desktop example:
|
|
1296
1296
|
|
|
1297
1297
|
```json
|
|
1298
1298
|
{
|
package/lib/client.js
CHANGED
|
@@ -777,7 +777,7 @@ window.__ModuleLoader__.load({
|
|
|
777
777
|
"cache_search",
|
|
778
778
|
"domain_search",
|
|
779
779
|
];
|
|
780
|
-
const PLUGIN_VERSION = "0.9.
|
|
780
|
+
const PLUGIN_VERSION = "0.9.65";
|
|
781
781
|
const PLUGIN_REPO_URL = "https://github.com/DDDMUC/dsh-free-search";
|
|
782
782
|
// 右侧浮动目录(#85):条目顺序即页面顺序,anchor 是页面里对应 field 的 id。
|
|
783
783
|
const NAV_ITEMS = [
|
package/lib/mcp_engines.js
CHANGED
|
@@ -20,6 +20,23 @@ import { searchParallel, searchParallelMCP } from "./engines/parallel.js";
|
|
|
20
20
|
import { searchYoucom } from "./engines/you.js";
|
|
21
21
|
import { searchAnysearch } from "./engines/anysearch.js";
|
|
22
22
|
import { searchSearxng } from "./engines/searxng.js";
|
|
23
|
+
import { searchPerplexity } from "./engines/perplexity.js";
|
|
24
|
+
import { searchSerpbase } from "./engines/serpbase.js";
|
|
25
|
+
import { searchSerply } from "./engines/serply.js";
|
|
26
|
+
import { searchOutcrawl } from "./engines/outcrawl.js";
|
|
27
|
+
import { searchTinyfish } from "./engines/tinyfish.js";
|
|
28
|
+
import { searchJina } from "./engines/jina.js";
|
|
29
|
+
import { searchKimi } from "./engines/kimi.js";
|
|
30
|
+
import { searchAliyun } from "./engines/aliyun.js";
|
|
31
|
+
import { searchDoubao } from "./engines/doubao.js";
|
|
32
|
+
import { searchZhihuGlobal } from "./engines/zhihu_global.js";
|
|
33
|
+
import { searchZhihuSite } from "./engines/zhihu_site.js";
|
|
34
|
+
import { searchSpecStream } from "./engines/specstream.js";
|
|
35
|
+
import { searchDeepSeekOfficial } from "./engines/deepseek-official.js";
|
|
36
|
+
import { searchDegoog } from "./engines/degoog.js";
|
|
37
|
+
import { searchOpenai } from "./engines/openai.js";
|
|
38
|
+
import { searchGemini } from "./engines/gemini.js";
|
|
39
|
+
import { searchClaude } from "./engines/claude.js";
|
|
23
40
|
import { parseTimeRange } from "./engines/shared.js";
|
|
24
41
|
|
|
25
42
|
export const MCP_ENGINE_IDS = [
|
|
@@ -43,11 +60,34 @@ export const MCP_ENGINE_IDS = [
|
|
|
43
60
|
"yuanbao",
|
|
44
61
|
"deepseek-tools",
|
|
45
62
|
"zhipu",
|
|
63
|
+
"perplexity",
|
|
64
|
+
"serpbase",
|
|
65
|
+
"serply",
|
|
66
|
+
"outcrawl",
|
|
67
|
+
"tinyfish",
|
|
68
|
+
"jina",
|
|
69
|
+
"kimi",
|
|
70
|
+
"aliyun",
|
|
71
|
+
"doubao",
|
|
72
|
+
"zhihu-global",
|
|
73
|
+
"zhihu-site",
|
|
74
|
+
"specstream",
|
|
75
|
+
"deepseek-official",
|
|
76
|
+
"degoog",
|
|
77
|
+
"openai",
|
|
78
|
+
"gemini",
|
|
79
|
+
"claude",
|
|
46
80
|
];
|
|
47
81
|
|
|
48
82
|
export const MCP_FREE_ENGINES = ["bing", "ddg", "ddg-lite"];
|
|
49
83
|
export const MCP_KEYLESS_ENGINES = ["anysearch", "searxng", "exa", "tavily", "keenable", "firecrawl", "parallel", "you"];
|
|
50
|
-
export const MCP_KEYED_ENGINES = [
|
|
84
|
+
export const MCP_KEYED_ENGINES = [
|
|
85
|
+
"google", "baidu", "brave", "metaso", "yandex", "yuanbao", "deepseek-tools", "zhipu",
|
|
86
|
+
"perplexity", "serpbase", "serply", "outcrawl", "tinyfish", "jina", "kimi", "aliyun", "doubao",
|
|
87
|
+
"zhihu-global", "zhihu-site", "specstream", "deepseek-official",
|
|
88
|
+
"openai", "gemini", "claude",
|
|
89
|
+
];
|
|
90
|
+
export const MCP_HOSTED_ENGINES = ["degoog"];
|
|
51
91
|
|
|
52
92
|
function env(name, fallback = "") {
|
|
53
93
|
return String(process.env[name] ?? fallback).trim();
|
|
@@ -203,6 +243,78 @@ export async function runMcpEngine(id, query, options = {}) {
|
|
|
203
243
|
...(await searchZhipu(query, maxResults, key, timeRange, signal, env("MCP_ZHIPU_SEARCH_ENGINE", "search_std"))),
|
|
204
244
|
};
|
|
205
245
|
}
|
|
246
|
+
case "perplexity":
|
|
247
|
+
return { engine, ...(await searchPerplexity(query, maxResults, requireEnv("PERPLEXITY_API_KEY", "Perplexity"), signal)) };
|
|
248
|
+
case "serpbase":
|
|
249
|
+
return {
|
|
250
|
+
engine,
|
|
251
|
+
...(await searchSerpbase(query, maxResults, requireEnv("SERPBASE_API_KEY", "SerpBase"), { lang }, signal)),
|
|
252
|
+
};
|
|
253
|
+
case "serply":
|
|
254
|
+
return {
|
|
255
|
+
engine,
|
|
256
|
+
...(await searchSerply(query, maxResults, requireEnv("SERPLY_API_KEY", "Serply"), { lang }, signal)),
|
|
257
|
+
};
|
|
258
|
+
case "outcrawl":
|
|
259
|
+
return { engine, ...(await searchOutcrawl(query, maxResults, requireEnv("OUTCRAWL_API_KEY", "Outcrawl"), signal)) };
|
|
260
|
+
case "tinyfish":
|
|
261
|
+
return { engine, ...(await searchTinyfish(query, maxResults, requireEnv("TINYFISH_API_KEY", "TinyFish"), timeRange, signal)) };
|
|
262
|
+
case "jina":
|
|
263
|
+
return { engine, ...(await searchJina(query, maxResults, requireEnv("JINA_API_KEY", "Jina"), signal)) };
|
|
264
|
+
case "kimi":
|
|
265
|
+
return { engine, ...(await searchKimi(query, maxResults, requireEnv("MOONSHOT_API_KEY", "Kimi"), timeRange, signal)) };
|
|
266
|
+
case "aliyun":
|
|
267
|
+
return { engine, ...(await searchAliyun(query, maxResults, requireEnv("DASHSCOPE_API_KEY", "Aliyun"), timeRange, signal)) };
|
|
268
|
+
case "doubao":
|
|
269
|
+
return { engine, ...(await searchDoubao(query, maxResults, requireEnv("DOUBAO_SEARCH_API_KEY", "Doubao"), timeRange, signal)) };
|
|
270
|
+
case "zhihu-global":
|
|
271
|
+
return { engine, ...(await searchZhihuGlobal(query, maxResults, requireEnv("ZHIHU_API_KEY", "Zhihu"), timeRange, signal)) };
|
|
272
|
+
case "zhihu-site":
|
|
273
|
+
return { engine, ...(await searchZhihuSite(query, maxResults, requireEnv("ZHIHU_API_KEY", "Zhihu"), signal)) };
|
|
274
|
+
case "specstream":
|
|
275
|
+
return { engine, ...(await searchSpecStream(query, maxResults, requireEnv("SPECSTREAM_API_KEY", "SpecStream"), signal)) };
|
|
276
|
+
case "deepseek-official":
|
|
277
|
+
return { engine, ...(await searchDeepSeekOfficial(query, maxResults, requireEnv("DEEPSEEK_API_KEY", "DeepSeek"), signal)) };
|
|
278
|
+
case "degoog": {
|
|
279
|
+
const instances = env("MCP_DEGOOG_INSTANCES")
|
|
280
|
+
.split(/[\s,]+/)
|
|
281
|
+
.map((entry) => entry.trim())
|
|
282
|
+
.filter(Boolean);
|
|
283
|
+
if (instances.length === 0) throw new Error("Degoog requires MCP_DEGOOG_INSTANCES (comma-separated base URLs)");
|
|
284
|
+
return {
|
|
285
|
+
engine,
|
|
286
|
+
...(await searchDegoog(query, maxResults, {
|
|
287
|
+
timeRange,
|
|
288
|
+
lang,
|
|
289
|
+
degoogInstances: instances,
|
|
290
|
+
...(env("MCP_DEGOOG_API_KEY") ? { degoogApiKey: env("MCP_DEGOOG_API_KEY") } : {}),
|
|
291
|
+
}, signal)),
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
case "openai":
|
|
295
|
+
return {
|
|
296
|
+
engine,
|
|
297
|
+
...(await searchOpenai(query, maxResults, requireEnv("OPENAI_API_KEY", "OpenAI"), {
|
|
298
|
+
openaiModel: env("MCP_OPENAI_MODEL"),
|
|
299
|
+
openaiBaseUrl: env("MCP_OPENAI_BASE_URL"),
|
|
300
|
+
}, signal)),
|
|
301
|
+
};
|
|
302
|
+
case "gemini":
|
|
303
|
+
return {
|
|
304
|
+
engine,
|
|
305
|
+
...(await searchGemini(query, maxResults, env("GEMINI_API_KEY") || requireEnv("GOOGLE_API_KEY", "Gemini"), {
|
|
306
|
+
geminiModel: env("MCP_GEMINI_MODEL"),
|
|
307
|
+
geminiBaseUrl: env("MCP_GEMINI_BASE_URL"),
|
|
308
|
+
}, signal)),
|
|
309
|
+
};
|
|
310
|
+
case "claude":
|
|
311
|
+
return {
|
|
312
|
+
engine,
|
|
313
|
+
...(await searchClaude(query, maxResults, requireEnv("ANTHROPIC_API_KEY", "Claude"), {
|
|
314
|
+
claudeModel: env("MCP_CLAUDE_MODEL"),
|
|
315
|
+
claudeBaseUrl: env("MCP_CLAUDE_BASE_URL"),
|
|
316
|
+
}, signal)),
|
|
317
|
+
};
|
|
206
318
|
default:
|
|
207
319
|
throw new Error(`unknown engine "${engine}"`);
|
|
208
320
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-free-search",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.65",
|
|
4
4
|
"description": "Free web search for DeepSeek Harness: 42 engines (Bing/DuckDuckGo/AnySearch/SearXNG/Exa/Tavily/Keenable/Firecrawl/Parallel/Brave/Zhipu/You.com keyless; Zhihu global/site via MCP and Perplexity/SerpBase/DeepSeek (official + native tools/search)/Baidu/Kimi/Aliyun/Doubao/Google CSE/Metaso/Yandex/Yuanbao/SpecStream with key; OpenAI/Gemini/Claude model built-in search, explicit-only) + auto smart routing + global engine enable/disable & fallback priority + editable zh/en language pools + multi mode (parallel full language-pool merge) + multi_search cross-source tool + failure-aware fallback (quota/auth cooldown, transient retry, fallbackOn) + time filtering + platform search + domain blocklist (blockedDomains) + web_fetch, with web settings UI, plus a standalone stdio MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|