Skip to content
Back to search

huge-ai-search

Huge AI Search MCP Server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wangwingzero--huge-ai-search/badge.svg)](/listings/wangwingzero--huge-ai-search)

HTML

<a href="/listings/wangwingzero--huge-ai-search"><img src="/api/listings/wangwingzero--huge-ai-search/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

> [!NOTE] > Windows 默认推荐:先全局安装 `npm i -g huge-ai-search`,配置里使用 `cmd /c huge-ai-search`。 > 如需 npx,请写成 `cmd /c npx ...`,不要直接把 `command` 写成 `npx`。

<details> <summary><b>Quick Install</b></summary>

免安装运行:

npx huge-ai-search

全局安装:

npm install -g huge-ai-search

</details>

<details> <summary><b>Install in Cursor</b></summary>

配置文件: - macOS / Linux: `~/.cursor/mcp.json` - Windows: `%USERPROFILE%\\.cursor\\mcp.json`

macOS / Linux:

{
  "mcpServers": {
    "huge-ai-search": {
      "command": "npx",
      "args": ["-y", "huge-ai-search@latest"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "huge-ai-search": {
      "command": "cmd",
      "args": ["/c", "huge-ai-search"]
    }
  }
}

中国大陆或必须走代理的环境,建议显式写入代理变量,避免 MCP 子进程在启动时没有继承到代理,导致握手阶段直接断开:

{
  "mcpServers": {
    "huge-ai-search": {
      "command": "cmd",
      "args": ["/c", "huge-ai-search"],
      "type": "stdio",
      "startup_timeout_sec": 120,
      "tool_timeout_sec": 180,
      "env": {
        "ALL_PROXY": "socks5://127.0.0.1:10808",
        "NO_PROXY": "localhost,127.0.0.1,::1"
      }
    }
  }
}

</details>

<details> <summary><b>Install in Claude Code</b></summary>

macOS / Linux:

claude mcp add huge-ai-search -- npx -y huge-ai-search@latest

Windows (PowerShell):

claude mcp add-json huge-ai-search -s user '{"command":"cmd", "args":["/c", "huge-ai-search"]}'

Windows (CMD):

claude mcp add-json huge-ai-search -s user "{\"command\":\"cmd\", \"args\":[\"/c\", \"huge-ai-search\"]}"

</details>

<details> <summary><b>Install in Codex CLI</b></summary>

配置文件:`~/.codex/config.toml`

默认写法:

[mcp_servers.huge-ai-search]
command = "npx"
args = ["-y", "huge-ai-search@latest"]

Windows 推荐:

[mcp_servers.huge-ai-search]
type = "stdio"
command = "cmd"
args = ["/c", "huge-ai-search"]
startup_timeout_sec = 120
tool_timeout_sec = 180

[mcp_servers.huge-ai-search.env]
ALL_PROXY = "socks5://127.0.0.1:10808"
NO_PROXY = "localhost,127.0.0.1,::1"

如果你的本地代理不是 `10808`,把 `ALL_PROXY` 改成实际可用端口即可,例如 `http://127.0.0.1:7890`。

</details>

<details> <summary><b>Other IDEs and Clients (Use Cursor Template)</b></summary>

以下客户端直接复用 Cursor 的 JSON 模板,仅替换配置文件路径:

- Kiro: `~/.kiro/settings/mcp.json`(Windows: `%USERPROFILE%\\.kiro\\settings\\mcp.json`) - Windsurf: `~/.codeium/windsurf/mcp_config.json`(Windows: `%APPDATA%\\Codeium\\Windsurf\\mcp_config.json`) - Claude Desktop: macOS `~/Library/Application Support/Claude/claude_desktop_config.json` Windows `%APPDATA%\\Claude\\claude_desktop_config.json` - VS Code (GitHub Copilot): 项目根目录 `.vscode/mcp.json` - VS Code + Cline: macOS `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` Windows `%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`

</details>

<details> <summary><b>推荐提示词(搜索优先原则 · 深度追问通用版)</b></summary>

# 搜索优先原则(深度追问通用版)

> **先知其不可为,方能有所为**

## 🚨 硬性规则

**采用分级策略:由 AI 先判断任务复杂度,再决定是否深搜。**

- 高风险/不确定任务:必须先搜索并追问 2-3 次。
- 低风险/确定性任务:可直接执行,不强制搜索。
- 若 AI 判断有歧义:默认倾向搜索一次确认。

## 🔥 核心工具:mcp_huge_ai_search_search

这是支持多轮追问的 AI 搜索工具,**必须进行深度追问**!

- 首次搜索返回 `session_id`
- 后续追问设置 `follow_up: true` + `session_id` 继续深入
- AI 会在上下文中持续回答,越问越深

## ⭐ 深度追问流程(必须遵循)

### 第一步:初次搜索
```
mcp_huge_ai_search_search({
  query: "{技术/问题} 是什么?核心概念和常见用法?",
  language: "zh-CN",
  follow_up: false
})
```
→ 获取 `session_id`

### 第二步:场景化追问(必追!)
```
mcp_huge_ai_search_search({
  query: "如果我的场景是 {具体场景},应该怎么做?",
  session_id: "上一步返回的 session_id",
  follow_up: true
})
```

### 第三步:避坑追问(必追!)
```
mcp_huge_ai_search_search({
  query: "有哪些常见的坑和反模式需要避免?",
  session_id: "同一个 session_id",
  follow_up: true
})
```

### 第四步:最佳实践追问(推荐)
```
mcp_huge_ai_search_search({
  query: "有哪些推荐的最佳实践?",
  session_id: "同一个 session_id",
  follow_up: true
})
```

---

## 第一式:辨(明其性)

辨别请求之性质,决定行动路径:

| 请求类型 | 行动 |
|----------|------|

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 756 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <img src="./resources/icon.png" alt="Huge AI Search" width="220" />
  3. </p>
  4. <h1 align="center">Huge AI Search MCP Server</h1>
  5. <p align="center">
  6. 把 Google AI Mode 搜索接入到 Cursor、Claude Code、Codex 等客户端,支持连续追问与来源链接。
  7. </p>
  8. <p align="center">
  9. <a href="https://www.npmjs.com/package/huge-ai-search"><img src="https://img.shields.io/npm/v/huge-ai-search?color=red" alt="NPM Version" /></a>
  10. <a href="./LICENSE"><img src="https://img.shields.io/npm/l/huge-ai-search" alt="MIT licensed" /></a>
  11. </p>
  12. ## 版本说明(三部分)
  13. <p align="center">
  14. <a href="#第一部分skill-版"><img src="https://img.shields.io/badge/查看-Skill%20版-6f42c1?style=for-the-badge" alt="Skill 版" /></a>
  15. <a href="#第二部分mcp-版"><img src="https://img.shields.io/badge/查看-MCP%20版-ff8c00?style=for-the-badge" alt="MCP 版" /></a>
  16. <a href="#第三部分ide-插件版"><img src="https://img.shields.io/badge/查看-IDE%20插件版-2ea44f?style=for-the-badge" alt="IDE 插件版" /></a>
  17. </p>
  18. ### 1) Skill 版(本 README 推荐入口)
  19. - 给 Cursor / Claude Code / Codex 等 Agent 用的 `SKILL.md`
  20. - 有 MCP 时直接调 `search` 工具;没有 MCP 时走 `huge-ai-search search` CLI
  21. - 安装:把 [一键部署话术](#skill-one-click) 发给你的 AI,或执行 `npx -y huge-ai-search@latest skill-install`
  22. ### 2) MCP 版
  23. - 面向 Cursor / Claude Code / Codex 等支持 MCP 的客户端
  24. - 通过 `huge-ai-search` 工具调用联网搜索
  25. - NPM:
  26. `https://www.npmjs.com/package/huge-ai-search`
  27. ### 3) IDE 插件版(兼容 VS Code 扩展生态)
  28. - 扩展名:`hudawang.huge-ai-search`(显示名:HUGE)
  29. - 可在支持 VS Code 扩展生态的 IDE 中使用(如 VS Code / Cursor / Windsurf 等)
  30. - 可作为 MCP 之外的 IDE 内使用方式,也可结合你的现有工作流一起使用
  31. - 插件文档:`extensions/huge-ai-chat/README.md`
  32. - VS Code Marketplace:
  33. `https://marketplace.visualstudio.com/items?itemName=hudawang.huge-ai-search`
  34. ## 第一部分:Skill 版
  35. Skill 教 Agent「什么时候搜、怎么追问」。真正搜索仍由本项目的 MCP 或 CLI 执行,Agent 不用自己写 Playwright、也不用自己开浏览器。
  36. <h3 id="skill-one-click">30 秒:复制给 AI,一键安装</h3>
  37. 1. 确认已安装 [Node.js 18+](https://nodejs.org/) 和 [Microsoft Edge](https://www.microsoft.com/edge)
  38. 2. 打开 Cursor / Claude Code / Codex(或任何能在你电脑上执行命令的 AI)
  39. 3. 复制下面整段话,原样发给它
  40. 4. 如果弹出 Edge / Google 登录窗口,你自己点完登录再关窗口
  41. 5. 看到「安装完成」后,**新开一个对话**,再说「搜一下 xxx」
  42. GitHub 代码块右上角有复制按钮:
  43. ```text
  44. 请在我这台电脑上安装 Huge AI Search 的 Agent Skill,让以后对话里你能用 Google AI Mode 联网搜索。不要只给步骤,请直接执行命令。
  45. 项目:https://github.com/wangwingzero/huge-ai-search
  46. 包名:huge-ai-search
  47. 按这个顺序做。不要启动无参数的 huge-ai-search(那会进入 MCP 服务器并卡住)。只有缺 Node.js 18+、没装 Microsoft Edge、或弹出了 Google 登录窗口需要我动手时,才停下来问我。
  48. 1) 检查 node、npm、npx 是否可用。没有就告诉我先安装 Node.js 18+ LTS,然后停止。
  49. 2) 检查本机是否已安装 Microsoft Edge。没有就告诉我先安装 Edge,然后停止。
  50. 3) 先执行:npx -y huge-ai-search@latest skill-install
  51. 如果提示未知命令 skill-install,或版本过旧,则改用源码安装:
  52. - 克隆 https://github.com/wangwingzero/huge-ai-search.git 到系统临时目录(--depth 1)
  53. - 在仓库里执行 npm install 和 npm run build
  54. - 再执行 node dist/index.js skill-install
  55. 4) 确认 Skill 文件已落到用户目录,至少成功一份即可:
  56. Windows:
  57. %USERPROFILE%\.cursor\skills\huge-ai-search\SKILL.md
  58. %USERPROFILE%\.claude\skills\huge-ai-search\SKILL.md
  59. %USERPROFILE%\.codex\skills\huge-ai-search\SKILL.md
  60. %USERPROFILE%\.agents\skills\huge-ai-search\SKILL.md
  61. macOS / Linux:
  62. ~/.cursor/skills/huge-ai-search/SKILL.md
  63. ~/.claude/skills/huge-ai-search/SKILL.md
  64. ~/.codex/skills/huge-ai-search/SKILL.md
  65. ~/.agents/skills/huge-ai-search/SKILL.md
  66. 5) 如果 ~/.huge-ai-search/browser_data/storage_state.json 还不存在,执行:
  67. npx -y -p huge-ai-search@latest huge-ai-search-setup
  68. 浏览器弹出后立刻停下来,让我完成 Google 登录或验证码,并关闭浏览器窗口,然后再继续。
  69. 6) 用这条命令确认 CLI 可用(不要做完整网页搜索):
  70. npx -y huge-ai-search@latest --help
  71. 输出里必须能看到 search 和 skill-install。
  72. 7) 最后用中文回复我:装到了哪些目录、CLI 是否可用、以及下一句该对 AI 说什么。请明确告诉我:请新开一个对话,然后说「搜一下 React 19 有什么新特性」。
  73. 中国大陆如需代理:优先沿用已有的 HTTP_PROXY / HTTPS_PROXY / ALL_PROXY。本工具也会自动探测 10808、7890 等本地端口,一般不用你手动配。
  74. ```
  75. 装好后的用法:新开对话,直接说「搜一下 ……」。Agent 会读这个 Skill:有 MCP 就调 `search` 工具,没有 MCP 就跑 `huge-ai-search search`。
  76. ### 这是什么
  77. | 文件 | 作用 |
  78. |---|---|
  79. | `skills/huge-ai-search/SKILL.md` | 给 Agent 的说明书:何时搜、怎么追问、MCP / CLI 怎么选 |
  80. | `huge-ai-search skill-install` | 把上面这份 Skill 复制到本机各 Agent 目录 |
  81. | `huge-ai-search search` | 没有 MCP 时,Skill 用来调用 Google AI Mode 的命令 |
  82. 本仓库里也放了一份,克隆后 Cursor 即可发现:
  83. - `.agents/skills/huge-ai-search/`
  84. - `.cursor/skills/huge-ai-search/`
  85. 其他项目、或只想装到自己电脑上,用 `skill-install`(装到用户主目录,对所有站点生效)。
  86. ### 手动安装
  87. 1. 安装 Microsoft Edge,并完成一次登录:
  88. ```bash
  89. npx -y -p huge-ai-search@latest huge-ai-search-setup
  90. ```
  91. 2. 安装 Skill(默认同时装到 Cursor / Claude Code / Codex / agents):
  92. ```bash
  93. npx -y huge-ai-search@latest skill-install
  94. ```
  95. 只要装其中一个客户端:
  96. ```bash
  97. npx -y huge-ai-search@latest skill-install --target cursor
  98. ```
  99. `--target` 可选:`all`(默认)、`cursor`、`claude`、`codex`、`agents`。
  100. 3. **新开一个 Agent 会话**。之后直接说「搜一下 React 19 新特性」即可。
  101. 安装位置:
  102. | 目标 | 目录 |
  103. |---|---|
  104. | Cursor | `~/.cursor/skills/huge-ai-search` |
  105. | Claude Code | `~/.claude/skills/huge-ai-search` |
  106. | Codex | `~/.codex/skills/huge-ai-search` |
  107. | 通用 | `~/.agents/skills/huge-ai-search` |
  108. Windows 对应 `%USERPROFILE%\.cursor\skills\huge-ai-search` 等。
  109. ### Agent 怎么搜
  110. **优先 MCP**(已配置 `huge-ai-search` 服务器时):调用 `search` 工具,用返回的 `session_id` 追问 2–3 次。
  111. **没有 MCP 时走 CLI**:
  112. ```bash
  113. huge-ai-search search --query "React 19 有什么新特性" --language zh-CN --format json
  114. ```
  115. Windows 未全局安装时:
  116. ```powershell
  117. npx -y huge-ai-search@latest search --query "React 19 有什么新特性" --language zh-CN --format json
  118. ```
  119. CLI 说明:
  120. - stdout 是结果,日志在 stderr
  121. - Agent 调命令时默认输出 JSON:读 `data.answer_markdown` 和 `data.session_id`
  122. - 查看参数:`huge-ai-search help search` 或 `huge-ai-search schema search`
  123. - CLI 每次都是新进程,页内连续对话不如 MCP。没有 MCP 时,把上一轮要点写进下一条 `--query`
  124. - 不要运行无参数的 `huge-ai-search`,那会启动 MCP 并占用终端
  125. ### 和 MCP / 插件的关系
  126. | 方式 | 适合谁 | 追问 |
  127. |---|---|---|
  128. | Skill 版 | 任意支持 Agent Skills 的客户端 | 有 MCP 则走 MCP;否则 CLI 多轮新搜索 |
  129. | MCP 版 | 已配置 MCP 的 Cursor / Claude Code / Codex | 同一进程内 `follow_up` + `session_id` |
  130. | 插件版 | 要侧边栏聊天的 IDE 用户 | 插件会话内连续问 |
  131. 三者共用同一套 Google 登录态(`~/.huge-ai-search/`)。只装 Skill、不配 MCP 也可以搜索。
  132. ### Skill 版常见问题
  133. 1. 发给 AI 后它只回步骤、不执行
  134. 再发一句:「按刚才那段话直接在我电脑上执行,不要只讲解。」并确认当前模式允许跑终端命令。
  135. 2. `skill-install` 不是一个命令
  136. 先确认版本:`npx -y huge-ai-search@latest --version` 应为 `1.2.0` 及以上;否则按一键话术里的源码安装分支做。
  137. 3. 装好了但 AI 还不搜
  138. 必须**新开对话**。当前这次会话开始时还没读到新 Skill。
  139. 4. 弹出登录 / 验证码
  140. 在浏览器里完成验证后关闭窗口,再让 AI 重试。或手动执行 `npx -y -p huge-ai-search@latest huge-ai-search-setup`。
  141. 5. Windows 上 `npx` 不稳定
  142. 先 `npm i -g huge-ai-search@latest`,再执行 `huge-ai-search skill-install`。
  143. ## 第二部分:MCP 版
  144. <p align="left">
  145. <img src="./resources/MCP-introduce.png" alt="MCP 连续追问示意" width="620" />
  146. </p>
  147. ### 这是什么
  148. - 让 AI 客户端直接调用 `huge-ai-search` 做联网搜索
  149. - 返回 AI 总结结果 + 来源链接
  150. - 支持同一会话连续追问(更深入)
  151. - 支持文本 + 图片搜索(`image_path`)
  152. ### 使用前准备
  153. 1. 安装 Microsoft Edge(必需)
  154. 2. 首次使用建议先做一次登录验证:
  155. ```bash
  156. npx -y -p huge-ai-search@latest huge-ai-search-setup
  157. ```
  158. 3. 中国大陆用户请配置代理(推荐设置 `HTTP_PROXY` / `HTTPS_PROXY` / `ALL_PROXY`)
  159. ### Installation
  160. > [!NOTE]
  161. > Windows 默认推荐:先全局安装 `npm i -g huge-ai-search`,配置里使用 `cmd /c huge-ai-search`。
  162. > 如需 npx,请写成 `cmd /c npx ...`,不要直接把 `command` 写成 `npx`。
  163. <details>
  164. <summary><b>Quick Install</b></summary>
  165. 免安装运行:
  166. ```bash
  167. npx huge-ai-search
  168. ```
  169. 全局安装:
  170. ```bash
  171. npm install -g huge-ai-search
  172. ```
  173. </details>
  174. <details>
  175. <summary><b>Install in Cursor</b></summary>
  176. 配置文件:
  177. - macOS / Linux: `~/.cursor/mcp.json`
  178. - Windows: `%USERPROFILE%\\.cursor\\mcp.json`
  179. macOS / Linux:
  180. ```json
  181. {
  182. "mcpServers": {
  183. "huge-ai-search": {
  184. "command": "npx",
  185. "args": ["-y", "huge-ai-search@latest"]
  186. }
  187. }
  188. }
  189. ```
  190. Windows:
  191. ```json
  192. {
  193. "mcpServers": {
  194. "huge-ai-search": {
  195. "command": "cmd",
  196. "args": ["/c", "huge-ai-search"]
  197. }
  198. }
  199. }
  200. ```
  201. 中国大陆或必须走代理的环境,建议显式写入代理变量,避免 MCP 子进程在启动时没有继承到代理,导致握手阶段直接断开:
  202. ```json
  203. {
  204. "mcpServers": {
  205. "huge-ai-search": {
  206. "command": "cmd",
  207. "args": ["/c", "huge-ai-search"],
  208. "type": "stdio",
  209. "startup_timeout_sec": 120,
  210. "tool_timeout_sec": 180,
  211. "env": {
  212. "ALL_PROXY": "socks5://127.0.0.1:10808",
  213. "NO_PROXY": "localhost,127.0.0.1,::1"
  214. }
  215. }
  216. }
  217. }
  218. ```
  219. </details>
  220. <details>
  221. <summary><b>Install in Claude Code</b></summary>
  222. macOS / Linux:
  223. ```sh
  224. claude mcp add huge-ai-search -- npx -y huge-ai-search@latest
  225. ```
  226. Windows (PowerShell):
  227. ```powershell
  228. claude mcp add-json huge-ai-search -s user '{"command":"cmd", "args":["/c", "huge-ai-search"]}'
  229. ```
  230. Windows (CMD):
  231. ```cmd
  232. claude mcp add-json huge-ai-search -s user "{\"command\":\"cmd\", \"args\":[\"/c\", \"huge-ai-search\"]}"
  233. ```
  234. </details>
  235. <details>
  236. <summary><b>Install in Codex CLI</b></summary>
  237. 配置文件:`~/.codex/config.toml`
  238. 默认写法:
  239. ```toml
  240. [mcp_servers.huge-ai-search]
  241. command = "npx"
  242. args = ["-y", "huge-ai-search@latest"]
  243. ```
  244. Windows 推荐:
  245. ```toml
  246. [mcp_servers.huge-ai-search]
  247. type = "stdio"
  248. command = "cmd"
  249. args = ["/c", "huge-ai-search"]
  250. startup_timeout_sec = 120
  251. tool_timeout_sec = 180
  252. [mcp_servers.huge-ai-search.env]
  253. ALL_PROXY = "socks5://127.0.0.1:10808"
  254. NO_PROXY = "localhost,127.0.0.1,::1"
  255. ```
  256. 如果你的本地代理不是 `10808`,把 `ALL_PROXY` 改成实际可用端口即可,例如 `http://127.0.0.1:7890`。
  257. </details>
  258. <details>
  259. <summary><b>Other IDEs and Clients (Use Cursor Template)</b></summary>
  260. 以下客户端直接复用 Cursor 的 JSON 模板,仅替换配置文件路径:
  261. - Kiro: `~/.kiro/settings/mcp.json`(Windows: `%USERPROFILE%\\.kiro\\settings\\mcp.json`)
  262. - Windsurf: `~/.codeium/windsurf/mcp_config.json`(Windows: `%APPDATA%\\Codeium\\Windsurf\\mcp_config.json`)
  263. - Claude Desktop:
  264. macOS `~/Library/Application Support/Claude/claude_desktop_config.json`
  265. Windows `%APPDATA%\\Claude\\claude_desktop_config.json`
  266. - VS Code (GitHub Copilot): 项目根目录 `.vscode/mcp.json`
  267. - VS Code + Cline:
  268. macOS `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
  269. Windows `%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`
  270. </details>
  271. <details>
  272. <summary><b>推荐提示词(搜索优先原则 · 深度追问通用版)</b></summary>
  273. ````markdown
  274. # 搜索优先原则(深度追问通用版)
  275. > **先知其不可为,方能有所为**
  276. ## 🚨 硬性规则
  277. **采用分级策略:由 AI 先判断任务复杂度,再决定是否深搜。**
  278. - 高风险/不确定任务:必须先搜索并追问 2-3 次。
  279. - 低风险/确定性任务:可直接执行,不强制搜索。
  280. - 若 AI 判断有歧义:默认倾向搜索一次确认。
  281. ## 🔥 核心工具:mcp_huge_ai_search_search
  282. 这是支持多轮追问的 AI 搜索工具,**必须进行深度追问**!
  283. - 首次搜索返回 `session_id`
  284. - 后续追问设置 `follow_up: true` + `session_id` 继续深入
  285. - AI 会在上下文中持续回答,越问越深
  286. ## ⭐ 深度追问流程(必须遵循)
  287. ### 第一步:初次搜索
  288. ```
  289. mcp_huge_ai_search_search({
  290. query: "{技术/问题} 是什么?核心概念和常见用法?",
  291. language: "zh-CN",
  292. follow_up: false
  293. })
  294. ```
  295. → 获取 `session_id`
  296. ### 第二步:场景化追问(必追!)
  297. ```
  298. mcp_huge_ai_search_search({
  299. query: "如果我的场景是 {具体场景},应该怎么做?",
  300. session_id: "上一步返回的 session_id",
  301. follow_up: true
  302. })
  303. ```
  304. ### 第三步:避坑追问(必追!)
  305. ```
  306. mcp_huge_ai_search_search({
  307. query: "有哪些常见的坑和反模式需要避免?",
  308. session_id: "同一个 session_id",
  309. follow_up: true
  310. })
  311. ```
  312. ### 第四步:最佳实践追问(推荐)
  313. ```
  314. mcp_huge_ai_search_search({
  315. query: "有哪些推荐的最佳实践?",
  316. session_id: "同一个 session_id",
  317. follow_up: true
  318. })
  319. ```
  320. ---
  321. ## 第一式:辨(明其性)
  322. 辨别请求之性质,决定行动路径:
  323. | 请求类型 | 行动 |
  324. |----------|------|
  325. | 代码实现 / 架构设计 / 性能优化 | **必搜其坑 + 深度追问** |
  326. | Bug 修复 | 走「捉虫三步」|
  327. | 简单查询 / 文件操作 / 文档修改 | 可直接执行(AI 自主判断可跳过搜索) |
  328. | 用户言「不搜索」或「直接做」| 从其意 |
  329. ---
  330. ## 🐛 捉虫三步(Bug 修复通用流程)
  331. **第一步:搜(问道于网)**
  332. 使用 `mcp_huge_ai_search_search` 搜索并追问:
  333. - 初次:「{错误信息} 常见原因和解决方案」
  334. - 追问1:「在 {技术栈/框架} 环境下最可能是什么原因?」
  335. - 追问2:「有哪些排查步骤和调试技巧?」
  336. **第二步:查(问道于日志)**
  337. 查看日志文件定位问题:
  338. - 关注:ERROR、WARNING、Exception、崩溃堆栈
  339. - 若无相关日志 → 先添加调试日志,复现问题
  340. **第三步:解(对症下药)**
  341. 根据搜索结果 + 日志信息,定位问题根因后修复。
  342. ---
  343. ## 🔧 常规开发流程
  344. **第二式:避(知其不可为)**
  345. 使用 `mcp_huge_ai_search_search` 搜索避坑 + 深度追问:
  346. - 初次:「{技术} 常见错误和反模式?」
  347. - 追问1:「在我的场景({具体场景})下要注意什么?」
  348. - 追问2:「有哪些最佳实践?」
  349. - 追问3:「有哪些常见的坑需要避免?」
  350. **第三式:记(铭其戒)**
  351. 简要总结需要避免的错误,作为实现的警示。
  352. **第四式:行(顺势而为)**
  353. 知其不可为后,方可有所为。
  354. ---
  355. ## 追问策略模板
  356. | 追问类型 | 示例查询 |
  357. |----------|----------|
  358. | **场景化** | 「如果我的场景是 {具体场景},应该怎么做?」 |
  359. | **细节深入** | 「刚才提到的 {某个点},能详细说说吗?」 |
  360. | **对比选型** | 「{方案A} 和 {方案B} 在我的场景下哪个更好?」 |
  361. | **避坑** | 「这个方案有什么潜在的坑需要注意?」 |
  362. | **最佳实践** | 「有哪些推荐的最佳实践?」 |
  363. ---
  364. ## 搜索触发条件
  365. ### ✅ 必须搜索 + 追问
  366. - 修复 bug
  367. - 添加新功能
  368. - 重构代码
  369. - 遇到错误信息
  370. - 性能优化
  371. - 架构设计决策
  372. - 技术选型
  373. - 涉及外部依赖/第三方 API 的关键改动
  374. - AI 对正确性不确定(有明显踩坑风险)
  375. ### ❌ 可跳过
  376. - 纯文档修改(.md 文件)
  377. - 简单配置文件修改
  378. - 用户明确说「不搜索」或「直接做」
  379. - 简单的文件操作(重命名、移动等)
  380. - 小型确定性代码改动(如常量调整、文案修改、明显机械性改名)
  381. ---
  382. ## 金句
  383. > 「搜而不追,等于白搜」
  384. > 「宁可多追一次,不可少追一次」
  385. > 「追问成本很低,踩坑代价很高」
  386. > 「先知其不可为,方能有所为」
  387. ````
  388. </details>
  389. ### 怎么用
  390. ### 基本搜索
  391. 直接让你的 AI 助手调用搜索工具,例如:
  392. - “搜索一下 React 19 有什么新特性”
  393. - “用英文搜索 TypeScript 5.0 new features”
  394. ### 连续追问(推荐)
  395. 先问概况,再追问细节/场景/避坑,效果最好:
  396. 1. 第一次:问整体方案
  397. 2. 第二次:结合你的场景问怎么选
  398. 3. 第三次:问常见坑和最佳实践
  399. ### 图片搜索
  400. 工具支持传 `image_path`(本地图片绝对路径)进行图文联合搜索。
  401. ### 工具参数
  402. | 参数 | 必需 | 默认值 | 说明 |
  403. |---|---|---|---|
  404. | `query` | ✅ | - | 搜索问题(自然语言) |
  405. | `language` | ❌ | `zh-CN` | 结果语言(`zh-CN`/`en-US`/`ja-JP`/`ko-KR`/`de-DE`/`fr-FR`) |
  406. | `follow_up` | ❌ | `false` | 是否在当前会话中追问 |
  407. | `session_id` | ❌ | 自动生成 | 会话 ID(用于多窗口独立追问) |
  408. | `image_path` | ❌ | - | 本地图片绝对路径(单图) |
  409. ### 常见问题
  410. ### 1) 提示找不到 Edge
  411. 请先安装 Microsoft Edge。本工具仅支持 Edge 驱动流程。
  412. ### 2) Windows 下 `npx` 启动不稳定
  413. 改用:
  414. - `command = "cmd"`
  415. - `args = ["/c", "huge-ai-search"]`
  416. 或 npx 兼容写法:
  417. - `command = "cmd"`
  418. - `args = ["/c", "npx", "-y", "huge-ai-search@latest"]`
  419. 补充说明:
  420. - 不建议把 `command` 直接写成 `npx`(部分环境会出现依赖解析异常)
  421. - 优先使用全局安装 + `cmd /c huge-ai-search`(最稳定)
  422. ### 3) 报错 `connection closed: initialize response`
  423. 这表示 MCP Server 在初始化握手阶段未返回 `initialize` 响应就断开了。
  424. 优先检查:
  425. 1. 配置是否为 Windows 推荐写法(`cmd /c huge-ai-search`)
  426. 2. 命令是否可直接运行:`cmd /c huge-ai-search --version`
  427. 3. 若用 `npx`,改为 `cmd /c npx ...`,不要直接 `command: "npx"`
  428. 4. 中国大陆或需代理环境下,是否给 MCP 配置显式传入了 `ALL_PROXY` / `NO_PROXY`
  429. 5. 本地代理端口是否真的可用,且协议是否匹配,例如 `socks5://127.0.0.1:10808` 或 `http://127.0.0.1:7890`
  430. 常见根因:
  431. - `huge-ai-search` 可执行命令本身没有问题,但 MCP 客户端拉起的子进程没继承到代理
  432. - 代理端口存在切换、断开或协议写错,导致浏览器预热和初始化阶段网络失败
  433. - Windows 下直接把 `command` 写成 `npx`,导致部分客户端的 stdio 握手不稳定
  434. 推荐配置(Windows):
  435. ```json
  436. {
  437. "mcpServers": {
  438. "huge-ai-search": {
  439. "command": "cmd",
  440. "args": ["/c", "huge-ai-search"],
  441. "type": "stdio",
  442. "startup_timeout_sec": 120,
  443. "tool_timeout_sec": 180,
  444. "env": {
  445. "ALL_PROXY": "socks5://127.0.0.1:10808",
  446. "NO_PROXY": "localhost,127.0.0.1,::1"
  447. }
  448. }
  449. }
  450. }
  451. ```
  452. Codex `config.toml` 推荐配置(Windows):
  453. ```toml
  454. [mcp_servers.huge-ai-search]
  455. type = "stdio"
  456. command = "cmd"
  457. args = ["/c", "huge-ai-search"]
  458. startup_timeout_sec = 120
  459. tool_timeout_sec = 180
  460. [mcp_servers.huge-ai-search.env]
  461. ALL_PROXY = "socks5://127.0.0.1:10808"
  462. NO_PROXY = "localhost,127.0.0.1,::1"
  463. ```
  464. 排查顺序建议:
  465. 1. 先执行 `cmd /c huge-ai-search --version`,确认命令本身可运行
  466. 2. 再确认代理端口是否在线
  467. 3. 最后把代理环境变量显式写进 MCP 配置后重启客户端
  468. ### 4) 需要登录/验证码怎么办
  469. 执行:
  470. ```bash
  471. npx -y -p huge-ai-search@latest huge-ai-search-setup
  472. ```
  473. 按提示在浏览器完成登录/验证后关闭窗口即可。
  474. 如果 setup 闪退或浏览器异常关闭,可以清除旧的浏览器数据后重试:
  475. ```powershell
  476. # Windows PowerShell
  477. Remove-Item -Recurse -Force "$HOME\.huge-ai-search\nodriver_profile" -ErrorAction SilentlyContinue; npx -y -p huge-ai-search@latest huge-ai-search-setup
  478. ```
  479. ```bash
  480. # macOS / Linux
  481. rm -rf ~/.huge-ai-search/nodriver_profile && npx -y -p huge-ai-search@latest huge-ai-search-setup
  482. ```
  483. ### 5) 日志在哪
  484. - Windows: `C:\\Users\\<用户名>\\.huge-ai-search\\logs\\`
  485. - macOS: `/Users/<用户名>/.huge-ai-search/logs/`
  486. - Linux: `/home/<用户名>/.huge-ai-search/logs/`
  487. ## 第三部分:IDE 插件版
  488. 在支持 VS Code 扩展生态的 IDE 中,可直接安装并在侧边栏使用:
  489. <p align="left">
  490. <img src="./resources/IDE-install.png" alt="IDE 插件安装示意" width="620" />
  491. </p>
  492. <p align="left">
  493. <img src="./resources/IDE-introduce.png" alt="HUGE 聊天界面" width="420" />
  494. </p>
  495. ### 适用范围
  496. - 支持 VS Code 扩展生态的 IDE(如 VS Code / Cursor / Windsurf 等)
  497. - 可作为 MCP 之外的 IDE 内使用方式,也可与你现有工作流结合使用
  498. ### 安装前准备
  499. 1. 安装 Node.js 18+(建议 LTS)
  500. 2. 确认终端命令可用:`node -v`、`npm -v`、`npx -v`
  501. 3. 确认 Microsoft Edge 可正常打开(登录与浏览器流程会用到)
  502. ### 3 分钟快速安装
  503. 1. 在扩展市场安装 **HUGE**(扩展 ID:`hudawang.huge-ai-search`)
  504. 2. 打开聊天入口(见下方“如何打开聊天入口”)
  505. 3. 首次按提示登录;也可点击右上角 `浏览器查看` 在浏览器完成登录
  506. 4. 发送一条测试消息,能收到回复即安装成功
  507. Marketplace:
  508. `https://marketplace.visualstudio.com/items?itemName=hudawang.huge-ai-search`
  509. ### 从零安装(详细)
  510. 1. 打开 IDE 的扩展市场,搜索并安装 `hudawang.huge-ai-search`
  511. 2. 安装后建议重启 IDE
  512. 3. 打开命令面板,执行 `HUGE: Open Chat`
  513. 4. 首次使用按提示完成登录
  514. 5. 如登录流程未拉起,执行 `HUGE: Run Login Setup`
  515. 6. 在聊天框发送测试问题(如 `hello`),确认可正常返回答案
  516. ### 如何打开 `HUGE: Open Chat`
  517. #### 方式 A(推荐):命令面板
  518. 1. 按 `Ctrl+Shift+P`(macOS: `Cmd+Shift+P`)
  519. 2. 输入 `HUGE`
  520. 3. 点击 `HUGE: Open Chat`
  521. #### 方式 B(备用):活动栏图标
  522. 1. 看 VS Code 左侧活动栏
  523. 2. 点击 **HUGE** 图标(插件安装后会出现)
  524. 3. 打开后即可进入聊天面板
  525. #### 方式 C(备用):编辑器标题按钮
  526. 1. 打开任意代码文件
  527. 2. 在编辑器右上角工具区找到 HUGE 图标/入口
  528. 3. 点击进入聊天
  529. ### 常见问题(插件版)
  530. 1. 命令不可用/服务启动失败
  531. 先检查 `node -v`、`npm -v`、`npx -v` 是否可用;Windows 可执行 `npm i -g huge-ai-search` 后重试。
  532. 2. 登录流程打不开
  533. 先点 `浏览器查看`,不行再执行 `HUGE: Run Login Setup`。
  534. 3. 网络错误或超时
  535. 检查代理环境变量:`HTTP_PROXY` / `HTTPS_PROXY` / `ALL_PROXY`,必要时换网络后重试。
  536. ### 主要命令
  537. - `HUGE: Open Chat`
  538. - `HUGE: New Thread`
  539. - `HUGE: Run Login Setup`
  540. - `HUGE: Clear History`
  541. - `发送到 Huge`
  542. ### 详细插件文档
  543. - `extensions/huge-ai-chat/README.md`
  544. ## License
  545. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.