@bsbofmusic/agent-reach-mcp 0.4.1 → 1.2.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,90 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.2.0] - 2025-02-27
9
+
10
+ ### Added
11
+
12
+ - **Docker auto-install**: Bootstrap 时自动安装 Docker Desktop (winget/chocolatey/brew)
13
+ - **Douyin (抖音) support**: 新增 `reach_search_douyin` 工具,解析抖音分享链接
14
+ - **Douyin MCP container**: 自动启动 douyin-mcp-server 容器
15
+ - **Full platform coverage**: 完整支持所有 12 个平台渠道
16
+
17
+ ### Changed
18
+
19
+ - **ensureDockerContainers**: Docker 未安装时自动尝试安装,而非跳过
20
+ - **reach_version**: 显示 Docker 状态和容器运行状态
21
+ - **reach_doctor**: 输出 Docker 安装建议
22
+
23
+ ### Improved
24
+
25
+ - **One-click deployment**: 真正实现一键部署,包括 Docker 依赖
26
+ - **Platform parity**: MCP 版本功能完全对齐 GitHub 原版
27
+
28
+ ## [1.1.0] - 2025-02-27
29
+
30
+ ### Added
31
+
32
+ - **Auto-install npm packages**: Bootstrap 时自动安装 bird、mcporter
33
+ - **Docker container management**: 自动检测并启动 xiaohongshu-mcp 容器
34
+ - **gh CLI auto-install**: Windows (winget) 和 macOS (brew) 自动安装 GitHub CLI
35
+ - **npx fallback**: 使用 `npx -y` 运行 bird/mcporter,无需全局 PATH 配置
36
+
37
+ ### Changed
38
+
39
+ - **reach_search_twitter**: 使用 `npx @steipete/bird` 替代直接调用
40
+ - **reach_search_xhs/web**: 使用 `npx mcporter` 替代直接调用
41
+ - **reach_version**: 显示所有依赖安装状态
42
+ - **detectEnvironment**: 使用 npx 检测 bird/mcporter
43
+
44
+ ### Fixed
45
+
46
+ - **Windows PATH issue**: npm 全局包不在 PATH 时仍可通过 npx 运行
47
+ - **Bootstrap timing**: 正确初始化所有依赖
48
+
49
+ ## [1.0.0] - 2025-02-27
50
+
51
+ ### Added
52
+
53
+ - **Bootstrap Ensure**: MCP 启动时自动检测环境、安装依赖、执行 smoke test
54
+ - **Concurrent Protection**: 使用 lockfile 防止并发 ensure 踩踏
55
+ - **Structured Logging**: 步骤、耗时、stdout/stderr、错误分类记录
56
+ - **nextSteps**: 所有失败场景输出可执行修复建议
57
+ - **Environment Detection**: 自动检测 OS、Python、Node.js、网络、磁盘空间
58
+ - **Graceful Degradation**: Bootstrap 失败时 MCP 仍可启动,工具返回明确错误
59
+
60
+ ### Changed
61
+
62
+ - **reach_doctor**: 增加 nextSteps 修复建议
63
+ - **reach_version**: 增加 bootstrap 状态显示
64
+ - **reach_search_***: 增加依赖预检查,缺失时返回 nextSteps
65
+ - **Error Output**: 所有错误包含结构化信息
66
+
67
+ ### Improved
68
+
69
+ - Windows 兼容性:spawn 命令使用 shell 模式
70
+ - 日志输出:支持 LOG_LEVEL 环境变量控制
71
+ - 原子更新:runtime 目录结构支持未来实现 atomic 策略
72
+
73
+ ## [0.4.1] - 2025-02-26
74
+
75
+ ### Added
76
+
77
+ - Initial MCP wrapper for Agent-Reach
78
+ - 5 core tools: ensure, doctor, exec, list_commands, version
79
+ - Auto-update mechanism
80
+ - Platform channel support: YouTube, Twitter, Reddit, GitHub, Bilibili, XiaoHongShu
81
+
82
+ ---
83
+
84
+ ## Roadmap
85
+
86
+ - [ ] Atomic update strategy (runtime_staging / runtime_active)
87
+ - [ ] Docker fallback for complex dependencies
88
+ - [ ] Proxy auto-detection
89
+ - [ ] Cache invalidation on upgrade
90
+ - [ ] Telemetry (opt-in)
package/README.md CHANGED
@@ -1,8 +1,21 @@
1
1
  # Agent-Reach MCP
2
2
 
3
- > ✅ 导入 MCP 即用 | ✅ 完整能力(exec) | ✅ 自发现(list) | ✅ 自动更新(latest) | ✅ 可诊断(doctor)
3
+ > ✅ 导入 MCP 即用 | ✅ 完整能力(exec) | ✅ 自发现(list) | ✅ 自动更新(latest) | ✅ 可诊断(doctor)| ✅ 启动自愈(bootstrap
4
4
 
5
- MCP (stdio) server that provides full access to [Agent-Reach](https://github.com/Panniantong/Agent-Reach) for OpenCode / CC-Switch.
5
+ MCP (stdio) server that provides full access to [Agent-Reach](https://github.com/Panniantong/Agent-Reach) for OpenCode / Claude Code / Cursor.
6
+
7
+ ---
8
+
9
+ ## 封装声明 / Wrapper Notice
10
+
11
+ 本项目是对上游项目 **Agent-Reach** 的 MCP 封装(wrapper),用于通过 MCP 接口调用其功能。
12
+
13
+ - **上游项目地址**: https://github.com/Panniantong/Agent-Reach
14
+ - **本项目不是上游项目的官方发布**
15
+ - 上游项目的名称、商标与版权归其各自权利人所有
16
+ - 上游项目按其许可证条款(MIT)授权使用;本项目已在 THIRD_PARTY_NOTICES.md 中包含上游许可证声明。
17
+
18
+ ---
6
19
 
7
20
  ## 一键启用
8
21
 
@@ -14,30 +27,43 @@ MCP (stdio) server that provides full access to [Agent-Reach](https://github.com
14
27
  }
15
28
  ```
16
29
 
30
+ **启用后自动完成**:
31
+ 1. 🔍 环境检测(OS、Python、Node.js、网络)
32
+ 2. 📦 自动安装 Python venv
33
+ 3. 🔄 自动安装/升级 Agent-Reach 到最新版
34
+ 4. ✅ Smoke test 验证可用性
35
+
36
+ ---
37
+
17
38
  ## 是什么
18
39
 
19
40
  Agent-Reach 让你的 AI Agent 拥有"互联网之眼"。读取和搜索 Twitter、Reddit、YouTube、GitHub、Bilibili、小红书 — 一个 CLI,零 API 费用。
20
41
 
21
- | 平台 | 功能 |
22
- |------|------|
23
- | 🌐 网页 | Jina Reader 读取任意网页 |
24
- | 📺 YouTube | 字幕提取 + 视频搜索 |
25
- | 🐦 Twitter/X | 读取推文、搜索 |
26
- | 📖 Reddit | 搜索、读取帖子评论 |
27
- | 📦 GitHub | 读取公开仓库、搜索 |
28
- | 📺 Bilibili | 字幕提取 + 搜索 |
29
- | 📕 小红书 | 搜索、阅读 |
30
- | 🔍 全网搜索 | Exa AI 语义搜索 |
42
+ | 平台 | 功能 | 状态 |
43
+ |------|------|------|
44
+ | 🌐 网页 | Jina Reader 读取任意网页 | ✅ 开箱即用 |
45
+ | 📺 YouTube | 字幕提取 + 视频搜索 | ✅ 开箱即用 |
46
+ | 📡 RSS | 读取任意 RSS/Atom | 开箱即用 |
47
+ | 🐦 Twitter/X | 读取推文、搜索 | ⚙️ 需配置 bird CLI |
48
+ | 📖 Reddit | 搜索、读取帖子评论 | ⚙️ 需配置代理 |
49
+ | 📦 GitHub | 读取公开仓库、搜索 | ⚙️ 需安装 gh CLI |
50
+ | 📺 Bilibili | 字幕提取 + 搜索 | ⚙️ 需配置代理 |
51
+ | 📕 小红书 | 搜索、阅读 | ⚙️ 需配置 mcporter |
52
+ | 🔍 全网搜索 | Exa AI 语义搜索 | ⚙️ 需配置 mcporter |
53
+
54
+ ---
31
55
 
32
56
  ## 5 个核心工具(必须实现)
33
57
 
34
58
  | 工具 | 说明 |
35
59
  |------|------|
36
- | `reach_ensure` | ✅ 准备环境 + 升级到最新 |
37
- | `reach_doctor` | ✅ 诊断所有平台渠道状态 |
60
+ | `reach_ensure` | ✅ 准备环境 + 升级到最新(幂等)|
61
+ | `reach_doctor` | ✅ 诊断所有平台渠道状态 + nextSteps |
38
62
  | `reach_exec` | ✅ 万能入口 - 完美复刻所有功能 |
39
63
  | `reach_list_commands` | ✅ 能力自发现 - 列出所有子命令 |
40
- | `reach_version` | ✅ 输出版本信息 |
64
+ | `reach_version` | ✅ 输出版本信息 + bootstrap 状态 |
65
+
66
+ ---
41
67
 
42
68
  ## 完整工具列表
43
69
 
@@ -46,29 +72,29 @@ Agent-Reach 让你的 AI Agent 拥有"互联网之眼"。读取和搜索 Twitter
46
72
  | 工具 | 说明 |
47
73
  |------|------|
48
74
  | `reach_ensure` | 确保 venv 存在并升级到最新 Agent-Reach |
49
- | `reach_doctor` | 诊断所有平台渠道状态 |
50
- | `reach_version` | 显示 MCP + Agent-Reach 版本 |
75
+ | `reach_doctor` | 诊断所有平台渠道状态,输出 nextSteps |
76
+ | `reach_version` | 显示 MCP + Agent-Reach 版本 + bootstrap 状态 |
51
77
  | `reach_check_update` | 检查 GitHub 是否有新版本 |
52
- | `reach_watch` | 快速健康检查(适合定时任务) |
78
+ | `reach_watch` | 快速健康检查(适合定时任务)|
53
79
  | `reach_list_commands` | 列出所有可用子命令 |
54
80
 
55
81
  ### 安装与配置
56
82
 
57
83
  | 工具 | 说明 |
58
84
  |------|------|
59
- | `reach_install` | 安装系统依赖(gh CLI, Node.js, bird, mcporter) |
60
- | `reach_configure` | 设置配置(proxy, token, cookies) |
85
+ | `reach_install` | 安装系统依赖(gh CLI, Node.js, bird, mcporter)|
86
+ | `reach_configure` | 设置配置(proxy, token, cookies)|
61
87
  | `reach_setup` | 交互式配置向导 |
62
88
 
63
89
  ### 读取与搜索
64
90
 
65
91
  | 工具 | 说明 |
66
92
  |------|------|
67
- | `reach_read` | 读取任意 URL |
68
- | `reach_search_twitter` | 搜索 Twitter |
69
- | `reach_search_xhs` | 搜索小红书 |
70
- | `reach_search_web` | 全网搜索(Exa) |
71
- | `reach_search_github` | 搜索 GitHub |
93
+ | `reach_read` | 读取任意 URL(Jina Reader)|
94
+ | `reach_search_twitter` | 搜索 Twitter(需 bird CLI)|
95
+ | `reach_search_xhs` | 搜索小红书(需 mcporter)|
96
+ | `reach_search_web` | 全网搜索(Exa)|
97
+ | `reach_search_github` | 搜索 GitHub(需 gh CLI)|
72
98
 
73
99
  ### 高级
74
100
 
@@ -76,41 +102,57 @@ Agent-Reach 让你的 AI Agent 拥有"互联网之眼"。读取和搜索 Twitter
76
102
  |------|------|
77
103
  | `reach_exec` | 🔧 万能入口 - 执行任意子命令 |
78
104
 
105
+ ---
106
+
79
107
  ## 使用示例
80
108
 
81
- ### 首次安装
109
+ ### 首次使用(自动完成)
110
+
111
+ 启用 MCP 后,会自动执行 bootstrap 确保。也可手动触发:
82
112
 
83
113
  ```json
84
114
  {
85
- "name": "reach_install",
86
- "arguments": { "env": "auto" }
115
+ "name": "reach_ensure"
87
116
  }
88
117
  ```
89
118
 
90
- ### 配置 Twitter Cookie
119
+ **输出示例**:
120
+ ```
121
+ # reach_ensure 结果
91
122
 
92
- ```json
93
- {
94
- "name": "reach_configure",
95
- "arguments": {
96
- "key": "twitter-cookies",
97
- "value": "auth_token=xxx; ct0=yyy"
98
- }
99
- }
123
+ 状态: ✅ 成功
124
+
125
+ ## 执行日志
126
+ - venv_check: OK (0ms)
127
+ - upgrade_pip: OK (2341ms)
128
+ - install_agent_reach: OK (5678ms)
129
+
130
+ 版本: 1.2.0
100
131
  ```
101
132
 
102
- ### 配置代理
133
+ ### 诊断
103
134
 
104
135
  ```json
105
136
  {
106
- "name": "reach_configure",
107
- "arguments": {
108
- "key": "proxy",
109
- "value": "http://user:pass@ip:port"
110
- }
137
+ "name": "reach_doctor"
111
138
  }
112
139
  ```
113
140
 
141
+ **输出示例**:
142
+ ```
143
+ # reach_doctor 诊断报告
144
+
145
+ 👁️ Agent Reach 状态
146
+ ========================================
147
+ ✅ YouTube 视频和字幕 — 可提取视频信息和字幕
148
+ ✅ RSS/Atom 订阅源 — 可读取 RSS/Atom 源
149
+ ❌ Twitter/X 推文 — bird CLI 未安装
150
+
151
+ ## Next Steps
152
+ - Install bird CLI: npm install -g @steipete/bird
153
+ - Configure cookies: reach_configure with twitter-cookies
154
+ ```
155
+
114
156
  ### 读取网页
115
157
 
116
158
  ```json
@@ -129,93 +171,288 @@ Agent-Reach 让你的 AI Agent 拥有"互联网之眼"。读取和搜索 Twitter
129
171
  }
130
172
  ```
131
173
 
132
- ### 搜索 GitHub
174
+ **未安装 bird CLI 时的输出**:
175
+ ```
176
+ ❌ bird CLI 未安装
177
+
178
+ ## Next Steps
179
+ - Install: npm install -g @steipete/bird
180
+ - Configure cookies: reach_configure with twitter-cookies
181
+ - Or use reach_search_web for Exa search instead
182
+ ```
183
+
184
+ ### 使用万能入口
133
185
 
134
186
  ```json
135
187
  {
136
- "name": "reach_search_github",
137
- "arguments": { "query": "LLM framework", "limit": 10 }
188
+ "name": "reach_exec",
189
+ "arguments": {
190
+ "subcommand": "doctor",
191
+ "skipUpdate": false
192
+ }
138
193
  }
139
194
  ```
140
195
 
141
- ### 使用万能入口
196
+ ### 能力自发现
142
197
 
143
198
  ```json
144
199
  {
145
- "name": "reach_exec",
200
+ "name": "reach_list_commands"
201
+ }
202
+ ```
203
+
204
+ ### 配置 Twitter Cookie
205
+
206
+ ```json
207
+ {
208
+ "name": "reach_configure",
209
+ "arguments": {
210
+ "key": "twitter-cookies",
211
+ "value": "auth_token=xxx; ct0=yyy"
212
+ }
213
+ }
214
+ ```
215
+
216
+ ### 配置代理
217
+
218
+ ```json
219
+ {
220
+ "name": "reach_configure",
146
221
  "arguments": {
147
- "subcommand": "doctor"
222
+ "key": "proxy",
223
+ "value": "http://user:pass@ip:port"
148
224
  }
149
225
  }
150
226
  ```
151
227
 
228
+ ---
229
+
152
230
  ## 自动更新策略
153
231
 
154
- 每次工具调用前自动执行:
232
+ **默认**: 每次工具调用前执行轻量 `ensureLatest()`
233
+
234
+ ### 支持的环境变量
235
+
236
+ | 变量 | 默认值 | 说明 |
237
+ |------|--------|------|
238
+ | `ALWAYS_LATEST` | `1` | 是否自动更新 |
239
+ | `UPDATE_STRATEGY` | `simple` | 更新策略(simple/atomic)|
240
+ | `NETWORK_REQUIRED` | `1` | 是否需要网络 |
241
+ | `CACHE_DIR` | 系统缓存目录 | 缓存位置 |
242
+ | `RUNTIME_DIR` | 系统缓存目录/runtime | 运行时目录 |
243
+ | `LOG_LEVEL` | `info` | 日志级别(error/info/debug)|
155
244
 
156
- 1. 创建/复用 Python venv
157
- 2. 执行 `pip install -U https://github.com/Panniantong/agent-reach/archive/main.zip`
158
- 3. 然后运行目标命令
245
+ ### 更新流程
159
246
 
160
- **版本信息:** `reach_version` 显示当前 MCP 版本、Agent-Reach 版本、更新时间。
247
+ 1. 检查 venv 是否存在
248
+ 2. 检查 bootstrap 时间戳
249
+ 3. 执行 `pip install -U https://github.com/Panniantong/agent-reach/archive/main.zip`
250
+ 4. 运行 smoke test 验证
251
+ 5. 记录 bootstrap 时间戳
252
+
253
+ **失败处理**: 更新失败不会破坏现有可用版本,返回 nextSteps 修复建议。
254
+
255
+ ---
161
256
 
162
257
  ## 环境要求
163
258
 
164
- - Node.js >= 18
165
- - Python 3.10+(在 PATH 中)
166
- - 能访问 GitHub
259
+ ### 启动时自动检测
167
260
 
168
- ### Venv 位置
261
+ - OS / CPU 架构
262
+ - Python 版本(需要 3.10+)
263
+ - Node.js 版本
264
+ - 网络可达性
265
+ - 磁盘空间
169
266
 
170
- - Windows: `%LOCALAPPDATA%\agent-reach-mcp\runtime\venv`
171
- - macOS: `~/Library/Caches/agent-reach-mcp/runtime/venv`
172
- - Linux: `~/.cache/agent-reach-mcp/runtime/venv`
267
+ ### 运行时目录
268
+
269
+ | 平台 | 目录 |
270
+ |------|------|
271
+ | Windows | `%LOCALAPPDATA%\agent-reach-mcp\` |
272
+ | macOS | `~/Library/Caches/agent-reach-mcp/` |
273
+ | Linux | `~/.cache/agent-reach-mcp/` |
173
274
 
174
- ## 平台要求
275
+ ### 平台特定要求
175
276
 
176
277
  | 平台 | 要求 |
177
278
  |------|------|
178
279
  | Twitter | bird CLI + twitter-cookies |
179
- | 小红书 | mcporter + docker xiaohongshu-mcp |
180
- | Reddit | 代理(服务器 IP 被封) |
181
- | Bilibili | 代理(服务器 IP 被封) |
182
- | 全网搜索 | 配置 Exa MCP |
183
- | GitHub | gh CLI(可选,提高速率限制) |
280
+ | 小红书 | mcporter + xiaohongshu-mcp Docker |
281
+ | Reddit | 代理(服务器 IP 被封)|
282
+ | Bilibili | 代理(服务器 IP 被封)|
283
+ | GitHub | gh CLI(提高速率限制)|
284
+ | 全网搜索 | mcporter + Exa MCP |
285
+
286
+ ---
184
287
 
185
288
  ## 推荐工作流
186
289
 
187
- 1. **首次安装**: `reach_install` 安装依赖
188
- 2. **配置**: `reach_configure` 配置 Twitter cookies、代理等
189
- 3. **诊断**: `reach_doctor` 检查渠道状态
190
- 4. **发现**: `reach_list_commands` 查看可用命令
191
- 5. **使用**: 使用搜索/读取工具或 `reach_exec`
290
+ 1. **启用 MCP** → 自动 bootstrap
291
+ 2. **诊断**: `reach_doctor` 查看渠道状态
292
+ 3. **发现**: `reach_list_commands` 查看可用命令
293
+ 4. **配置**: `reach_configure` 配置 cookies/代理
294
+ 5. **使用**: 搜索/读取工具 `reach_exec`
295
+
296
+ ---
297
+
298
+ ## 验证矩阵
299
+
300
+ ### A. 一键部署验证 ✅
192
301
 
193
- ## 验证计划
302
+ **目标**: 只需启用 MCP,全自动收集并安装依赖
194
303
 
195
- ### A. 一键部署验证
304
+ **验证步骤**:
305
+ ```bash
306
+ # 1. 清空缓存
307
+ rm -rf ~/Library/Caches/agent-reach-mcp # macOS
308
+ rd /s /q %LOCALAPPDATA%\agent-reach-mcp # Windows
196
309
 
197
- - [ ] 清空本地缓存(或换一台机器)
198
- - [ ] 仅通过 CC-Switch 启用 MCP
199
- - [ ] 重启 OpenCode
200
- - [ ] 直接调用 `reach_ensure` 成功
201
- - [ ] 不需要手动安装任何依赖
310
+ # 2. 重启 MCP
202
311
 
203
- ### B. 完美复刻验证
312
+ # 3. 调用版本检查
313
+ reach_version
314
+ ```
204
315
 
205
- - [ ] `reach_exec` 能执行至少 5 个核心功能
206
- - [ ] `reach_list_commands` 输出与原工具 `--help` 一致
207
- - [ ] 新增功能无需改 MCP 即可通过 exec 使用
316
+ **预期输出(成功)**:
317
+ ```
318
+ === Agent-Reach MCP Version Info ===
208
319
 
209
- ### C. 稳定健全验证
320
+ MCP Version: 1.0.0
321
+ Agent-Reach Version: 1.2.0
322
+ Bootstrap Status: ✅ OK
323
+ Update Strategy: simple (alwaysLatest: true)
324
+ Runtime Dir: /Users/xxx/Library/Caches/agent-reach-mcp/runtime
325
+ ```
210
326
 
211
- - [ ] `reach_doctor` 能定位常见问题
212
- - [ ] 调用失败返回清晰错误
213
- - [ ] 超时机制有效
327
+ **预期输出(失败 - Python)**:
328
+ ```
329
+ ⚠️ MCP 未完全就绪
330
+
331
+ Bootstrap 失败,部分功能可能不可用。
332
+ 错误类型: python_missing
333
+
334
+ Next Steps:
335
+ - Install Python 3.10+ from https://www.python.org/downloads/
336
+ - Ensure Python is added to PATH during installation
337
+ ```
338
+
339
+ ### B. 完美复刻验证 ✅
340
+
341
+ **目标**: 封装后能力不缩水,新增命令自动支持
342
+
343
+ **验证命令**:
344
+ ```json
345
+ {"name": "reach_exec", "arguments": {"subcommand": "version"}}
346
+ {"name": "reach_exec", "arguments": {"subcommand": "doctor"}}
347
+ {"name": "reach_exec", "arguments": {"subcommand": "check-update", "skipUpdate": true}}
348
+ {"name": "reach_exec", "arguments": {"subcommand": "watch"}}
349
+ {"name": "reach_exec", "arguments": {"subcommand": "setup"}}
350
+ ```
351
+
352
+ **判定标准**: 所有命令执行成功,输出与原 CLI 一致
353
+
354
+ ### C. 稳定健全验证 ✅
355
+
356
+ **目标**: 自检 / 自愈 / 清晰错误 / 可观测日志
357
+
358
+ **验证步骤**:
359
+ 1. 调用 `reach_doctor` → 检查输出包含 nextSteps
360
+ 2. 破坏 venv → 调用 `reach_ensure` → 确认修复
361
+ 3. 调用不存在的命令 → 检查错误输出
362
+
363
+ **预期输出(doctor)**:
364
+ ```
365
+ # reach_doctor 诊断报告
366
+ ...
367
+ ## Next Steps
368
+ - Install bird CLI: npm install -g @steipete/bird
369
+ ```
214
370
 
215
- ### D. 自动更新验证
371
+ ### D. 自动更新验证
216
372
 
217
- - [ ] 每次调用前执行 ensureLatest
218
- - [ ] `reach_version` 能反映 latest 状态
373
+ **目标**: 每次调用前升级到最新版本
374
+
375
+ **验证步骤**:
376
+ 1. 调用 `reach_version` 记录版本
377
+ 2. 等待上游更新
378
+ 3. 再次调用任意工具
379
+ 4. 检查 `reach_version` 是否更新
380
+
381
+ ### E. 部署即用验证 ✅
382
+
383
+ **目标**: 重启 Agent 后自动恢复
384
+
385
+ **验证步骤**:
386
+ 1. 启用 MCP
387
+ 2. 重启 Agent
388
+ 3. 调用任意工具
389
+ 4. 确认无需手动操作
390
+
391
+ ### F. 失败场景验证
392
+
393
+ | 场景 | 触发方式 | 预期 nextSteps |
394
+ |------|---------|----------------|
395
+ | 断网 | 关闭网络 | 检查网络连接 |
396
+ | 无 Python | 移除 PATH | 安装 Python 3.10+ |
397
+ | venv 损坏 | 删除 venv 目录 | reach_ensure 会自动重建 |
398
+ | bird 未安装 | reach_search_twitter | npm install -g @steipete/bird |
399
+
400
+ ---
401
+
402
+ ## 常见错误与排障
403
+
404
+ ### `python_missing`
405
+
406
+ **原因**: 系统未安装 Python
407
+
408
+ **修复**:
409
+ - 安装 Python 3.10+: https://www.python.org/downloads/
410
+ - 确保勾选 "Add Python to PATH"
411
+
412
+ ### `network_error`
413
+
414
+ **原因**: 无法访问 GitHub
415
+
416
+ **修复**:
417
+ - 检查网络连接
418
+ - 配置代理: `HTTP_PROXY`, `HTTPS_PROXY`
419
+ - 或设置 `NETWORK_REQUIRED=0`
420
+
421
+ ### `venv_failed`
422
+
423
+ **原因**: Python venv 模块不可用
424
+
425
+ **修复**:
426
+ - 确保安装了完整的 Python(非精简版)
427
+ - Linux: `sudo apt install python3-venv`
428
+
429
+ ### Bootstrap 未完成的工具调用
430
+
431
+ **错误信息**:
432
+ ```
433
+ ⚠️ MCP 未完全就绪
434
+
435
+ Bootstrap 失败,部分功能可能不可用。
436
+ ```
437
+
438
+ **修复**: 调用 `reach_ensure` 进行修复
439
+
440
+ ---
441
+
442
+ ## 合规声明
443
+
444
+ ### 许可证
445
+
446
+ | 项目 | 许可证 |
447
+ |------|--------|
448
+ | 本项目 (agent-reach-mcp) | MIT License |
449
+ | 上游 Agent-Reach | MIT License |
450
+
451
+ ### 第三方声明
452
+
453
+ 详见 [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md)
454
+
455
+ ---
219
456
 
220
457
  ## 本地开发
221
458
 
@@ -224,10 +461,16 @@ npm install
224
461
  node index.js
225
462
  ```
226
463
 
464
+ ---
465
+
227
466
  ## License
228
467
 
229
468
  MIT
230
469
 
470
+ ---
471
+
231
472
  ## Links
232
473
 
233
474
  - [Agent-Reach GitHub](https://github.com/Panniantong/Agent-Reach)
475
+ - [Agent-Reach 文档](https://github.com/Panniantong/Agent-Reach#readme)
476
+ - [MCP 协议](https://modelcontextprotocol.io/)