@gecho-ai/gecho-bridge 1.1.7 → 1.1.23

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@gecho-ai/gecho-bridge",
3
- "version": "1.1.7",
3
+ "version": "1.1.23",
4
4
  "description": "TikTok Search Tool for OpenClaw"
5
5
  }
package/README.md CHANGED
@@ -1,68 +1,85 @@
1
1
  # Gecho Bridge 🚀
2
2
 
3
- 🌐 **Gecho Bridge** 是一款通用的 MCPModel Context Protocol)工具,旨在为你的大语言模型(LLM)与本地浏览器之间搭建一座桥梁。
4
- 安装后,无论是使用 **OpenClaw**、**Hermes** 还是 **Trae**,你的 AI 助手都能直接控制浏览器,自动化完成 TikTok 搜索、数据抓取与深度商机洞察。
3
+ 🌐 **Gecho Bridge** is a universal MCP (Model Context Protocol) tool designed to build a bridge between your large language model (LLM) and your local browser.
4
+ After installation, whether you use **OpenClaw**, **Hermes**, or **Trae**, your AI assistant can directly control the browser to automate TikTok search, data collection, and deep business opportunity insights.
5
5
 
6
6
  ---
7
7
 
8
- ## ✨ 适合谁用
8
+ ## ✨ Who Is It For
9
9
 
10
- - 📊 **分析竞品**:输入关键词,快速获取 TikTok 前排高赞视频的各项互动数据。
11
- - 💡 **寻找爆款**:使用深度洞察工具分析特定品类(如 "portable blender")的流行趋势,捕捉未被满足的市场蓝海。
12
- - 🤖 **自动化运营**:让大模型直接指挥浏览器,自动翻页抓取并生成数据报表,免去繁琐的手动统计。
10
+ - 📊 **Competitor analysis**: Enter a keyword and quickly get engagement data for top TikTok videos.
11
+ - 💡 **Finding winning products**: Use deep insight tools to analyze trends in specific categories (such as "portable blender") and identify underserved blue-ocean opportunities.
12
+ - 🤖 **Automated operations**: Let a large model directly control the browser, auto-scroll, scrape data, and generate reports, eliminating tedious manual counting.
13
13
 
14
- ## 🚀 能做什么
14
+ ## 🚀 What It Can Do
15
15
 
16
- - 自动唤起 Chrome 并在 TikTok 搜索指定关键词,模拟真人自然滚动加载。
17
- - 抓取海量结构化数据(视频 ID、标题、点赞量、播放链接等)并自动安全落盘为 JSON 文件。
18
- - 执行基于大数据检索的**异步深度洞察**,智能提炼爆款趋势与潜在商机。
16
+ - Automatically launch Chrome, search TikTok for a target keyword, and simulate natural human-like scrolling.
17
+ - Collect large volumes of structured data (video ID, title, likes, playback link, and more) and safely save it as JSON files.
18
+ - Run **asynchronous deep insights** based on large-scale retrieval to intelligently summarize winning-product trends and potential business opportunities.
19
19
 
20
- ## 🔗 相关链接
20
+ ## 🔗 Related Links
21
21
 
22
- - **官网**:[https://gecho.ai/](https://gecho.ai/)
23
- - **ClawHub 插件页**:[https://clawhub.ai/plugins/gecho-bridge](https://clawhub.ai/plugins/gecho-bridge)
24
- - **Chrome 浏览器扩展**:[前往 Chrome 网上应用店下载](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)
22
+ - **Official Website**: [https://gecho.ai/](https://gecho.ai/)
23
+ - **GitHub**: [https://github.com/gecho-ai/gecho-bridge](https://github.com/gecho-ai/gecho-bridge)
24
+ - **ClawHub Plugin Page**: [https://clawhub.ai/p/gecho-ai](https://clawhub.ai/p/gecho-ai)
25
+ - **Chrome Browser Extension**: [Install from Chrome Web Store](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)
26
+
27
+ ## 💬 Community & Feedback
28
+
29
+ Welcome to join our community for discussion or feedback:
30
+
31
+ - **Discord Community**: [Join Discord](https://discord.gg/RFDVZMR6Tn)
32
+ - **WeCom Group**: Scan the QR code below to join (or [click here to view the QR code](https://github.com/gecho-ai/gecho-bridge/blob/main/qywx.jpg))
33
+
34
+ ![WeCom QR Code](https://github.com/gecho-ai/gecho-bridge/blob/main/qywx.jpg)
25
35
 
26
36
  ---
27
37
 
28
- ## 📦 安装与配置
38
+ ## 📦 Installation & Setup
39
+
40
+ This project is built on the standard MCP protocol and can be seamlessly integrated into any AI client that supports MCP (such as OpenClaw, Hermes, and Trae).
29
41
 
30
- 本项目基于标准 MCP 协议开发,可以无缝接入任何支持 MCP 的 AI 客户端(如 OpenClaw、Hermes、Trae 等)。
42
+ **One key point first:**
43
+ The **Skill** on ClawHub mainly provides calling instructions for the large model. It is not the server itself. To actually search TikTok, you still need to configure the `gecho-bridge` MCP service in your client and install the browser extension.
31
44
 
32
- ### 0. 前置环境要求
33
- 1. **Node.js**:>= 18(需支持 `npm` / `npx`)。
34
- 2. **浏览器扩展**:请先[点击此处安装 Gecho 浏览器扩展](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)
35
- 3. **网络与状态**:确保本地网络可稳定访问 TikTok,并在浏览器中登录账号,保持扩展在线。
45
+ ### 0. Prerequisites
46
+ 1. **Node.js**: >= 18 (must support `npm` / `npx`).
47
+ 2. **Browser extension**: Please [install the Gecho browser extension here first](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb).
48
+ 3. **Network and state**: Make sure your local network can access TikTok reliably, and log in to both your browser account and the browser extension.
36
49
 
37
- ### 方式一:在 OpenClaw 中一键安装 (ClawHub)
38
- ClawHub 中有两种安装方式:`Skill` `Plugin`。
50
+ ### Option 1: One-Click Installation in OpenClaw (ClawHub)
51
+ ClawHub offers two installation types: `Skill` and `Plugin`.
39
52
 
40
- #### 方案 ASkill 安装(需先配置 MCP
41
- Skill 安装后会通过 MCP 调用执行,因此需要先完成以下 MCP 配置:
53
+ #### Plan A: Skill Install (MCP Must Be Configured First)
54
+ If you install the **Skill** from ClawHub, please note: **installing only the Skill page is not enough**. After installation, the Skill runs through MCP calls, so you need to complete the following MCP setup first:
42
55
  ```bash
43
56
  openclaw mcp set gecho-bridge '{"command":"npx","args":["-y","@gecho-ai/gecho-bridge@latest"]}'
44
57
  openclaw gateway restart
45
58
  ```
46
- *配置后,可通过 `openclaw mcp list` 检查状态。*
47
- *完成 MCP 配置后,再回到 ClawHub 选择 Skill 安装即可。*
59
+ *After configuration, you can check the status with `openclaw mcp list`.*
60
+ *Once MCP is configured, go back to ClawHub and use the Skill.*
48
61
 
49
- #### 方案 BPlugin 安装(推荐)
62
+ #### Plan B: Plugin Install (Recommended)
50
63
  ```bash
51
- openclaw plugins install @gecho-ai/gecho-bridge
64
+ openclaw plugins install clawhub:@gecho-ai/gecho-bridge-bundle
52
65
  openclaw gateway restart
53
66
  ```
54
- *如需升级已安装的版本,使用 `openclaw plugins update @gecho-ai/gecho-bridge` 即可。*
67
+ *This is the more hassle-free installation method. After installation, you generally do not need to separately configure the MCP that the Skill depends on.*
68
+ *If you need to upgrade an installed version, use `openclaw plugins update clawhub:@gecho-ai/gecho-bridge-bundle`.*
69
+ *The plugin will automatically start a local Gecho service when needed. If the browser extension was opened after the client, run `openclaw gateway restart` once to reconnect cleanly.*
55
70
 
56
- ### 方式二:在 Hermes 中一键配置 (Hermes Skill Hub)
57
- 你可以通过以下命令将服务快捷添加到 Hermes 并重启:
71
+ ### Option 2: One-Click Setup in Hermes (Hermes Skill Hub)
72
+ You can quickly add the service to Hermes and restart it with the following commands:
58
73
  ```bash
59
74
  hermes mcp add gecho-bridge --command npx --args="-y" --args="@gecho-ai/gecho-bridge@latest"
75
+
60
76
  hermes restart
61
77
  ```
62
- *重启后,可通过 `hermes mcp list` 检查安装状态。*
78
+ *After restart, you can check the installation status with `hermes mcp list`.*
79
+ *Reference only: if Hermes reports `npx` or `node` as missing even though Node is installed on your machine, that is usually a Hermes shell/PATH issue rather than a Gecho Bridge issue. On macOS with Homebrew, one workaround is to register the MCP server with an absolute command path: `hermes mcp add gecho-bridge --command /opt/homebrew/bin/npx --args="-y" --args="@gecho-ai/gecho-bridge@latest"` and then run `hermes restart`.*
63
80
 
64
- ### 方式三:在 Trae / Claude Desktop 等通用客户端配置
65
- 在支持手动配置的 MCP 客户端中,打开对应的 `mcp.json` `claude_desktop_config.json` 文件,添加如下节点:
81
+ ### Option 3: Configure in General Clients Such as Trae / Claude Desktop
82
+ In MCP clients that support manual configuration, open the corresponding `mcp.json` or `claude_desktop_config.json` file and add the following node:
66
83
  ```json
67
84
  {
68
85
  "mcpServers": {
@@ -74,74 +91,96 @@ hermes restart
74
91
  }
75
92
  ```
76
93
 
94
+ ### Option 4: One-Click Setup in Claude Code
95
+ You can quickly add the service to Claude Code with the following command:
96
+ ```bash
97
+ claude mcp add gecho-bridge -- npx -y @gecho-ai/gecho-bridge@latest
98
+ ```
99
+ - By default, the configuration is saved at the **project level** (`.claude/settings.json`).
100
+ - Use `--scope user` to make it available for all projects, or `--scope local` for a local-only configuration.
101
+ - After adding, use `claude mcp list` to verify the server is registered.
102
+ - Restart Claude Code if the MCP tools don't appear immediately.
103
+
77
104
  ---
78
105
 
79
- ## 🏁 快速开始与常见流程
106
+ ## 🏁 Quick Start & Common Workflows
80
107
 
81
- 环境配置完毕并重启 AI 客户端后,你可以直接通过自然语言向 AI 下达指令。
108
+ After the environment is configured and your AI client has restarted, you can directly issue instructions to the AI in natural language.
82
109
 
83
- ### 🔍 基础搜索 (`tiktok_search`)
84
- 适用于快速检索和收集视频数据。
85
- **你可以这样说:**
86
- - *"帮我搜索 TikTok 关键词 'portable blender',返回点赞最高的前 10 条"*
87
- - *"搜索 'cat toy',并把完整结果保存到 /Users/yourname/gecho-data"*
110
+ ### Self-Check Before First Use
111
+ 1. `gecho-bridge` MCP is configured, or the `@gecho-ai/gecho-bridge-bundle` plugin is installed.
112
+ 2. The [Gecho browser extension](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb) is installed.
113
+ 3. TikTok is open in Chrome and the account is logged in.
114
+ 4. The Gecho extension is logged in and online, and the TikTok page is not stuck or left on a CAPTCHA page.
88
115
 
89
- **执行流程:**
90
- 1. AI 唤起本地浏览器的 Gecho 扩展进行搜索和自动滚动。
91
- 2. 抓取完成后,海量数据会自动落盘到本地。
92
- 3. AI 会在会话中为你精简总结前 20 条高赞结果。
116
+ ### 🔍 Basic Search (`tiktok_search`)
117
+ Suitable for quickly retrieving and collecting video data.
118
+ **You can say:**
119
+ - *"Search TikTok for the keyword 'portable blender' and return the top 10 by likes."*
120
+ - *"Search 'cat toy' and save the full results to /Users/yourname/gecho-data."*
93
121
 
94
- ### 📈 深度洞察 (`tiktok_insight`)
95
- 适用于品类调研和趋势分析。
96
- **你可以这样说:**
97
- - *"请对 'outdoor picnic mat' tiktok_insight 分析"*
98
- - *"对比 'desk setup' 和 'minimal desk' 的热视频风格与互动量"*
122
+ **Execution flow:**
123
+ 1. The AI triggers the local Gecho browser extension to perform the search and auto-scroll.
124
+ 2. After scraping is complete, large volumes of data are automatically saved locally.
125
+ 3. The AI summarizes the top 20 most-liked results for you in the conversation.
99
126
 
100
- **执行流程:**
101
- 1. 插件会下发异步洞察任务,并立即返回一个 `jobId`。
102
- 2. **⚠️ 高危注意**:洞察分析涉及深度抓取和 AI 运算,耗时通常会**超过 5 分钟**。在执行期间,**请务必不要关闭浏览器插件或相关的 TikTok 页面**。
103
- 3. 等待一段时间后,对 AI 说:*“用 check_insight_status 查询刚才任务的执行状态”* 来获取最终的分析报告。
127
+ ### 📈 Deep Insight (`tiktok_insight`)
128
+ Suitable for category research and trend analysis.
129
+ **You can say:**
130
+ - *"Please run tiktok_insight analysis for 'outdoor picnic mat'."*
131
+ - *"Compare the hot video styles and engagement of 'desk setup' and 'minimal desk'."*
132
+
133
+ **Execution flow:**
134
+ 1. The plugin submits an asynchronous insight task and immediately returns a `jobId`.
135
+ 2. **⚠️ Note**: Deep insight analysis involves heavy scraping and AI computation, and usually takes **more than 5 minutes**. During execution, **do not close the browser extension or the related TikTok page**.
136
+ 3. After waiting for a while, say to the AI: *"Use check_insight_status to query the status of the previous task"* to get the final analysis report.
137
+ 4. If it returns `running`, the task is still being processed. Please continue waiting and query again later.
104
138
 
105
139
  ---
106
140
 
107
- ## ⚙️ 存储配置
141
+ ## ⚙️ Storage Configuration
108
142
 
109
- 为了更好地管理数据资产,抓取的海量结果需要落盘保存。插件支持以下优先级配置方式:
143
+ To better manage data assets, the large amount of scraped results needs to be saved to disk. The plugin supports the following priority order:
110
144
 
111
- 1. **会话级(最高优先级)**:直接在对话时让 AI 指定 `save_dir`(必须为绝对路径)。
112
- 2. **全局级**:配置环境变量 `GECHO_DATA_DIR` 来指定默认的数据保存目录。
113
- 3. **默认回退**:若未指定,默认保存在工具自带的 `./data` 目录下。
145
+ 1. **Session level (highest priority)**: Ask the AI to specify `save_dir` directly during the conversation (must be an absolute path).
146
+ 2. **Global level**: Configure the environment variable `GECHO_DATA_DIR` to specify the default data save directory.
147
+ 3. **Default fallback**: If not specified, data is saved to the tool's built-in `./data` directory by default.
114
148
 
115
- *(注:所有保存的文件名均会自动进行安全化处理,避免非法字符导致写入失败。)*
149
+ *(Note: All saved filenames are automatically sanitized to avoid write failures caused by invalid characters.)*
116
150
 
117
151
  ---
118
152
 
119
- ## 🛠️ 排障指南
153
+ ## 🛠️ Troubleshooting
120
154
 
121
- ### 1. 如何确认插件已加载?(以 OpenClaw 为例)
122
- 执行:
155
+ ### 1. How to confirm the plugin is loaded? (Using OpenClaw as an example)
156
+ Run:
123
157
  ```bash
124
- openclaw plugins info @gecho-ai/gecho-bridge
158
+ openclaw plugins info @gecho-ai/gecho-bridge-bundle
125
159
  ```
126
- 如果安装成功,你应看到 `Status: loaded` 以及 `MCP servers: gecho-tiktok-search`。
160
+ If installation is successful, you should see `Status: loaded` and `MCP servers: gecho-tiktok-search`.
161
+
162
+ ### 2. Note about the local background service
163
+ - Gecho Bridge automatically starts a local service on demand so the MCP client can talk to the browser extension.
164
+ - This service only listens on `127.0.0.1` and is expected to stay available while you use the plugin.
165
+ - If Chrome or the extension was restarted and requests start failing, first run `openclaw gateway restart`, then try again.
127
166
 
128
- ### 2. 报错:提示扩展未连接
129
- - 检查 Chrome 浏览器中的 Gecho 扩展是否已开启。
130
- - 确认当前浏览器环境中已登录 TikTok 账号,且 TikTok 页面未处于崩溃或无响应状态。
167
+ ### 3. Error: Extension not connected
168
+ - Check whether the Gecho extension in Chrome is enabled.
169
+ - Confirm that the TikTok account is logged in in the current browser environment, and that the TikTok page is not crashed or unresponsive.
131
170
 
132
- ### 3. 报错:请求超时
133
- - 检查 TikTok 页面是否弹出了人机验证码(CAPTCHA),如果是,请手动滑动解决。
134
- - 若目标关键词本身结果极少或网络卡顿,可尝试更换更具体的关键词后重试。
171
+ ### 4. Error: Request timeout
172
+ - Check whether a TikTok CAPTCHA challenge has appeared. If so, solve it manually first.
173
+ - If the target keyword has very few results or the network is unstable, try a more specific keyword and retry.
135
174
 
136
- ### 4. 报错:无法保存结果
137
- - 检查你让 AI 指定的 `save_dir` 是否为合法的绝对路径。
138
- - 确认当前系统用户是否具有该目标目录的写入权限。
175
+ ### 5. Error: Failed to save results
176
+ - Check whether the `save_dir` you asked the AI to specify is a valid absolute path.
177
+ - Confirm that the current system user has write permission for the target directory.
139
178
 
140
179
  ---
141
180
 
142
- ## 🧑‍💻 本地开发
181
+ ## 🧑‍💻 Local Development
143
182
 
144
- 对于希望基于本工具进行二次开发的开发者:
183
+ For developers who want to build on top of this tool:
145
184
  ```bash
146
185
  git clone https://github.com/gecho-ai/bridge.git
147
186
  cd bridge
@@ -149,9 +188,9 @@ npm install
149
188
  npm run server
150
189
  ```
151
190
 
152
- **双层架构说明:**
153
- - **Client 层** (`mcp-client.js`):标准 MCP STDIO 接入层,负责与 OpenClaw/Hermes/Trae 等客户端通信,并声明 Tools 规范。
154
- - **Service 层** (`server.js`):本地常驻服务层,负责与浏览器扩展通过 WebSocket 通信,执行实际抓取与落盘。(支持 Lazy Start 机制,仅在需要时自动拉起)。
191
+ **Two-layer architecture description:**
192
+ - **Client layer** (`mcp-client.js`): The standard MCP STDIO integration layer, responsible for communicating with clients such as OpenClaw, Hermes, and Trae, and declaring the Tools specification.
193
+ - **Service layer** (`server.js`): The local resident service layer, responsible for communicating with the browser extension via WebSocket and executing the actual scraping and persistence. (Supports a Lazy Start mechanism and launches only when needed.)
155
194
 
156
195
  ## License
157
196
 
package/README.zh.md ADDED
@@ -0,0 +1,197 @@
1
+ # Gecho Bridge 🚀
2
+
3
+ 🌐 **Gecho Bridge** 是一款通用的 MCP(Model Context Protocol)工具,旨在为你的大语言模型(LLM)与本地浏览器之间搭建一座桥梁。
4
+ 安装后,无论是使用 **OpenClaw**、**Hermes** 还是 **Trae**,你的 AI 助手都能直接控制浏览器,自动化完成 TikTok 搜索、数据抓取与深度商机洞察。
5
+
6
+ ---
7
+
8
+ ## ✨ 适合谁用
9
+
10
+ - 📊 **分析竞品**:输入关键词,快速获取 TikTok 前排高赞视频的各项互动数据。
11
+ - 💡 **寻找爆款**:使用深度洞察工具分析特定品类(如 "portable blender")的流行趋势,捕捉未被满足的市场蓝海。
12
+ - 🤖 **自动化运营**:让大模型直接指挥浏览器,自动翻页抓取并生成数据报表,免去繁琐的手动统计。
13
+
14
+ ## 🚀 能做什么
15
+
16
+ - 自动唤起 Chrome 并在 TikTok 搜索指定关键词,模拟真人自然滚动加载。
17
+ - 抓取海量结构化数据(视频 ID、标题、点赞量、播放链接等)并自动安全落盘为 JSON 文件。
18
+ - 执行基于大数据检索的**异步深度洞察**,智能提炼爆款趋势与潜在商机。
19
+
20
+ ## 🔗 相关链接
21
+
22
+ - **官网**:[https://gecho.ai/](https://gecho.ai/)
23
+ - **GitHub**:[https://github.com/gecho-ai/gecho-bridge](https://github.com/gecho-ai/gecho-bridge)
24
+ - **ClawHub 插件页**:[https://clawhub.ai/p/gecho-ai](https://clawhub.ai/p/gecho-ai)
25
+ - **Chrome 浏览器扩展**:[前往 Chrome 网上应用店下载](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)
26
+
27
+ ## 💬 交流与反馈
28
+
29
+ 欢迎加入我们的社区进行交流或反馈问题:
30
+
31
+ - **Discord 社区**:[点击加入 Discord](https://discord.gg/RFDVZMR6Tn)
32
+ - **企业微信群**:扫描下方二维码加入(若图片未显示,请 [点击此处查看二维码](https://github.com/gecho-ai/gecho-bridge/blob/main/qywx.jpg))
33
+
34
+ ![企业微信二维码](https://github.com/gecho-ai/gecho-bridge/blob/main/qywx.jpg)
35
+
36
+ ---
37
+
38
+ ## 📦 安装与配置
39
+
40
+ 本项目基于标准 MCP 协议开发,可以无缝接入任何支持 MCP 的 AI 客户端(如 OpenClaw、Hermes、Trae 等)。
41
+
42
+ **先说明一个关键点:**
43
+ ClawHub 上的 **Skill** 主要提供给大模型的调用指令,本身不是服务端。想要真正搜索 TikTok,你还需要把 `gecho-bridge` MCP 服务配置到客户端里,并安装浏览器扩展。
44
+
45
+ ### 0. 前置环境要求
46
+ 1. **Node.js**:>= 18(需支持 `npm` / `npx`)。
47
+ 2. **浏览器扩展**:请先[点击此处安装 Gecho 浏览器扩展](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)。
48
+ 3. **网络与状态**:确保本地网络可稳定访问 TikTok,并在浏览器中登录账号,登录浏览器扩展。
49
+
50
+ ### 方式一:在 OpenClaw 中一键安装 (ClawHub)
51
+ ClawHub 中有两种安装方式:`Skill` 与 `Plugin`。
52
+
53
+ #### 方案 A:Skill 安装(需先配置 MCP)
54
+ 如果你安装的是 ClawHub 上的 **Skill**,请注意:**只安装 Skill 页面还不够**。Skill 安装后会通过 MCP 调用执行,因此需要先完成以下 MCP 配置:
55
+ ```bash
56
+ openclaw mcp set gecho-bridge '{"command":"npx","args":["-y","@gecho-ai/gecho-bridge@latest"]}'
57
+ openclaw gateway restart
58
+ ```
59
+ *配置后,可通过 `openclaw mcp list` 检查状态。*
60
+ *完成 MCP 配置后,再回到 ClawHub 使用 Skill 即可。*
61
+
62
+ #### 方案 B:Plugin 安装(推荐)
63
+ ```bash
64
+ openclaw plugins install clawhub:@gecho-ai/gecho-bridge-bundle
65
+ openclaw gateway restart
66
+ ```
67
+ *这是更省心的安装方式。安装完成后,一般不需要再单独配置 Skill 所依赖的 MCP。*
68
+ *如需升级已安装的版本,使用 `openclaw plugins update clawhub:@gecho-ai/gecho-bridge-bundle` 即可。*
69
+ *插件会在需要时自动启动本地 Gecho Service。如果是先打开了客户端、后打开浏览器扩展,建议再执行一次 `openclaw gateway restart` 重新建立连接。*
70
+
71
+ ### 方式二:在 Hermes 中一键配置 (Hermes Skill Hub)
72
+ 你可以通过以下命令将服务快捷添加到 Hermes 并重启:
73
+ ```bash
74
+ hermes mcp add gecho-bridge --command npx --args="-y" --args="@gecho-ai/gecho-bridge@latest"
75
+
76
+ hermes restart
77
+ ```
78
+ *重启后,可通过 `hermes mcp list` 检查安装状态。*
79
+ *仅供参考:如果你的机器已经安装了 Node,但 Hermes 仍提示 `npx` 或 `node` 不存在,这通常是 Hermes 自身 shell/PATH 环境的问题,不是 Gecho Bridge 的问题。在 macOS + Homebrew 下,一个常见绕过方式是改用绝对路径注册 MCP:`hermes mcp add gecho-bridge --command /opt/homebrew/bin/npx --args="-y" --args="@gecho-ai/gecho-bridge@latest"`,然后执行 `hermes restart`。*
80
+
81
+ ### 方式三:在 Trae / Claude Desktop 等通用客户端配置
82
+ 在支持手动配置的 MCP 客户端中,打开对应的 `mcp.json` 或 `claude_desktop_config.json` 文件,添加如下节点:
83
+ ```json
84
+ {
85
+ "mcpServers": {
86
+ "gecho-bridge": {
87
+ "command": "npx",
88
+ "args": ["-y", "@gecho-ai/gecho-bridge@latest"]
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### 方式四:在 Claude Code 中一键配置
95
+ 你可以通过以下命令将服务快捷添加到 Claude Code 中:
96
+ ```bash
97
+ claude mcp add gecho-bridge -- npx -y @gecho-ai/gecho-bridge@latest
98
+ ```
99
+ - 默认情况下,该配置保存在**项目级别**(`.claude/settings.json`)。
100
+ - 可以添加 `--scope user` 使其对所有项目生效,或使用 `--scope local` 仅在当前目录生效。
101
+ - 添加完成后,使用 `claude mcp list` 验证服务是否注册成功。
102
+ - 如果 MCP 工具没有立即出现,请重启 Claude Code。
103
+
104
+ ---
105
+
106
+ ## 🏁 快速开始与常见流程
107
+
108
+ 环境配置完毕并重启 AI 客户端后,你可以直接通过自然语言向 AI 下达指令。
109
+
110
+ ### ✅ 首次使用前自检
111
+ 1. 已配置 `gecho-bridge` MCP,或已安装 `@gecho-ai/gecho-bridge-bundle` Plugin。
112
+ 2. 已安装 [Gecho 浏览器扩展](https://chromewebstore.google.com/detail/pjkaeenpekolahdbccjfenjcmanemlbj?utm_source=item-share-cb)。
113
+ 3. Chrome 中已打开 TikTok 并登录账号。
114
+ 4. Gecho 扩展已登录并处于在线状态,TikTok 页面未卡住或未停在验证码页面。
115
+
116
+ ### 🔍 基础搜索 (`tiktok_search`)
117
+ 适用于快速检索和收集视频数据。
118
+ **你可以这样说:**
119
+ - *"帮我搜索 TikTok 关键词 'portable blender',返回点赞最高的前 10 条"*
120
+ - *"搜索 'cat toy',并把完整结果保存到 /Users/yourname/gecho-data"*
121
+
122
+ **执行流程:**
123
+ 1. AI 唤起本地浏览器的 Gecho 扩展进行搜索和自动滚动。
124
+ 2. 抓取完成后,海量数据会自动落盘到本地。
125
+ 3. AI 会在会话中为你精简总结前 20 条高赞结果。
126
+
127
+ ### 📈 深度洞察 (`tiktok_insight`)
128
+ 适用于品类调研和趋势分析。
129
+ **你可以这样说:**
130
+ - *"请对 'outdoor picnic mat' 做 tiktok_insight 分析"*
131
+ - *"对比 'desk setup' 和 'minimal desk' 的热视频风格与互动量"*
132
+
133
+ **执行流程:**
134
+ 1. 插件会下发异步洞察任务,并立即返回一个 `jobId`。
135
+ 2. **⚠️ 注意**:洞察分析涉及深度抓取和 AI 运算,耗时通常会**超过 5 分钟**。在执行期间,**请务必不要关闭浏览器插件或相关的 TikTok 页面**。
136
+ 3. 等待一段时间后,对 AI 说:*“用 check_insight_status 查询刚才任务的执行状态”* 来获取最终的分析报告。
137
+ 4. 如果返回 `running`,说明任务还在处理,请继续等待后再次查询。
138
+
139
+ ---
140
+
141
+ ## ⚙️ 存储配置
142
+
143
+ 为了更好地管理数据资产,抓取的海量结果需要落盘保存。插件支持以下优先级配置方式:
144
+
145
+ 1. **会话级(最高优先级)**:直接在对话时让 AI 指定 `save_dir`(必须为绝对路径)。
146
+ 2. **全局级**:配置环境变量 `GECHO_DATA_DIR` 来指定默认的数据保存目录。
147
+ 3. **默认回退**:若未指定,默认保存在工具自带的 `./data` 目录下。
148
+
149
+ *(注:所有保存的文件名均会自动进行安全化处理,避免非法字符导致写入失败。)*
150
+
151
+ ---
152
+
153
+ ## 🛠️ 排障指南
154
+
155
+ ### 1. 如何确认插件已加载?(以 OpenClaw 为例)
156
+ 执行:
157
+ ```bash
158
+ openclaw plugins info @gecho-ai/gecho-bridge-bundle
159
+ ```
160
+ 如果安装成功,你应看到 `Status: loaded` 以及 `MCP servers: gecho-tiktok-search`。
161
+
162
+ ### 2. 关于本地后台服务的说明
163
+ - Gecho Bridge 会在需要时自动拉起本地服务,用来让 MCP 客户端和浏览器扩展通信。
164
+ - 这个服务只监听 `127.0.0.1`,在你使用插件期间保持可用属于正常行为。
165
+ - 如果你重启了 Chrome 或扩展,随后请求开始失败,先执行一次 `openclaw gateway restart`,再重试。
166
+
167
+ ### 3. 报错:提示扩展未连接
168
+ - 检查 Chrome 浏览器中的 Gecho 扩展是否已开启。
169
+ - 确认当前浏览器环境中已登录 TikTok 账号,且 TikTok 页面未处于崩溃或无响应状态。
170
+
171
+ ### 4. 报错:请求超时
172
+ - 检查 TikTok 页面是否弹出了人机验证码(CAPTCHA),如果是,请手动滑动解决。
173
+ - 若目标关键词本身结果极少或网络卡顿,可尝试更换更具体的关键词后重试。
174
+
175
+ ### 5. 报错:无法保存结果
176
+ - 检查你让 AI 指定的 `save_dir` 是否为合法的绝对路径。
177
+ - 确认当前系统用户是否具有该目标目录的写入权限。
178
+
179
+ ---
180
+
181
+ ## 🧑‍💻 本地开发
182
+
183
+ 对于希望基于本工具进行二次开发的开发者:
184
+ ```bash
185
+ git clone https://github.com/gecho-ai/bridge.git
186
+ cd bridge
187
+ npm install
188
+ npm run server
189
+ ```
190
+
191
+ **双层架构说明:**
192
+ - **Client 层** (`mcp-client.js`):标准 MCP STDIO 接入层,负责与 OpenClaw/Hermes/Trae 等客户端通信,并声明 Tools 规范。
193
+ - **Service 层** (`server.js`):本地常驻服务层,负责与浏览器扩展通过 WebSocket 通信,执行实际抓取与落盘。(支持 Lazy Start 机制,仅在需要时自动拉起)。
194
+
195
+ ## License
196
+
197
+ MIT