@bsbofmusic/agent-reach-mcp 0.2.0 → 0.2.1
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 +153 -368
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,368 +1,153 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
适用场景:
|
|
156
|
-
|
|
157
|
-
* 为什么某个平台读不到?
|
|
158
|
-
* 需要 cookie 吗?
|
|
159
|
-
* 需要代理吗?
|
|
160
|
-
* 需要 docker 吗?
|
|
161
|
-
|
|
162
|
-
doctor 是 Agent-Reach 官方推荐的“总检命令”。
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## 3) reach_read
|
|
167
|
-
|
|
168
|
-
用途:读一个链接(网页/视频/仓库等,交给 Agent-Reach 判断)。
|
|
169
|
-
|
|
170
|
-
它会执行:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
agent-reach read <url>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
输入:
|
|
177
|
-
|
|
178
|
-
```json
|
|
179
|
-
{ "url": "https://example.com" }
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### 常见例子
|
|
183
|
-
|
|
184
|
-
* 读普通网页:
|
|
185
|
-
|
|
186
|
-
```json
|
|
187
|
-
{ "url": "https://example.com" }
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
* 获取 YouTube 教程字幕/内容(Agent-Reach README 的示例就是 read YouTube):
|
|
191
|
-
|
|
192
|
-
```json
|
|
193
|
-
{ "url": "https://youtube.com/watch?v=xxx" }
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## 4) reach_exec ✅(全功能复刻关键)
|
|
199
|
-
|
|
200
|
-
这是“完整复刻”的核心。它可以透传执行任何 Agent-Reach 子命令:
|
|
201
|
-
|
|
202
|
-
等价于:
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
agent-reach <subcommand> ...args
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
输入格式:
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"subcommand": "doctor",
|
|
213
|
-
"args": [],
|
|
214
|
-
"timeoutMs": 600000
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 4.1 安装(对应 Agent-Reach README 的安装方式)
|
|
219
|
-
|
|
220
|
-
> 虽然 MCP 自己会安装 main.zip,但 Agent-Reach 还有 “install” 用来装系统依赖/配置渠道(很重要)
|
|
221
|
-
|
|
222
|
-
* 全自动安装(默认推荐):
|
|
223
|
-
|
|
224
|
-
```json
|
|
225
|
-
{ "subcommand": "install", "args": ["--env=auto"] }
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
* 安全模式(不自动改系统,只提示缺什么):
|
|
229
|
-
|
|
230
|
-
```json
|
|
231
|
-
{ "subcommand": "install", "args": ["--env=auto", "--safe"] }
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
* Dry Run(预览将做什么,不执行):
|
|
235
|
-
|
|
236
|
-
```json
|
|
237
|
-
{ "subcommand": "install", "args": ["--env=auto", "--dry-run"] }
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### 4.2 Twitter/X:配置 cookie + 搜索推文(来自官方 README FAQ)
|
|
241
|
-
|
|
242
|
-
* 配置 twitter cookie(你需要把 Cookie-Editor 导出的 cookie 字符串填进去):
|
|
243
|
-
|
|
244
|
-
```json
|
|
245
|
-
{
|
|
246
|
-
"subcommand": "configure",
|
|
247
|
-
"args": ["twitter-cookies", "your_cookies_here"]
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
* 搜索推文:
|
|
252
|
-
|
|
253
|
-
```json
|
|
254
|
-
{
|
|
255
|
-
"subcommand": "search-twitter",
|
|
256
|
-
"args": ["关键词"]
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 4.3 代理配置(解决 Reddit 数据中心 IP 403 等,来自官方 README FAQ)
|
|
261
|
-
|
|
262
|
-
```json
|
|
263
|
-
{
|
|
264
|
-
"subcommand": "configure",
|
|
265
|
-
"args": ["proxy", "http://user:pass@ip:port"]
|
|
266
|
-
}
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### 4.4 小红书:搜索(来自官方 README FAQ)
|
|
270
|
-
|
|
271
|
-
```json
|
|
272
|
-
{
|
|
273
|
-
"subcommand": "search-xhs",
|
|
274
|
-
"args": ["关键词"]
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
> 小红书往往需要 docker / MCP 服务配套,先跑 `reach_doctor` 看提示。
|
|
279
|
-
|
|
280
|
-
### 4.5 读任意链接(等价 reach_read,但更通用)
|
|
281
|
-
|
|
282
|
-
```json
|
|
283
|
-
{
|
|
284
|
-
"subcommand": "read",
|
|
285
|
-
"args": ["https://github.com/Panniantong/Agent-Reach"]
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
## 5) reach_list_commands(推荐让 OpenCode“自发现”能力)
|
|
292
|
-
|
|
293
|
-
用途:列出当前安装的 Agent-Reach 版本支持哪些子命令。
|
|
294
|
-
|
|
295
|
-
为什么需要它?
|
|
296
|
-
|
|
297
|
-
* Agent-Reach 在快速迭代
|
|
298
|
-
* 你坚持“永远最新”
|
|
299
|
-
* 所以命令集合可能随时变化
|
|
300
|
-
* `reach_list_commands` 能让 OpenCode 在**没有记忆**的情况下,仍然准确知道有哪些子命令
|
|
301
|
-
|
|
302
|
-
推荐用法:
|
|
303
|
-
|
|
304
|
-
1. 启用 MCP 后先跑一次 `reach_list_commands`
|
|
305
|
-
2. OpenCode 会得到一份命令列表
|
|
306
|
-
3. 后续就用 `reach_exec` 调用列表里的命令
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
# 推荐验证计划(你可以照抄给 OpenCode 执行)
|
|
311
|
-
|
|
312
|
-
## Phase 1:基础健康
|
|
313
|
-
|
|
314
|
-
1. `reach_ensure`
|
|
315
|
-
2. `reach_doctor`
|
|
316
|
-
3. `reach_read` 读一个普通网页
|
|
317
|
-
|
|
318
|
-
预期:能成功安装/更新 + doctor 输出渠道状态 + read 有返回内容
|
|
319
|
-
|
|
320
|
-
## Phase 2:全能力复刻
|
|
321
|
-
|
|
322
|
-
1. `reach_list_commands`
|
|
323
|
-
2. 从列表里挑 3 个子命令用 `reach_exec` 跑(例如 install / configure / search-* / read)
|
|
324
|
-
|
|
325
|
-
## Phase 3:按需补齐配置
|
|
326
|
-
|
|
327
|
-
* Twitter 需要 cookie:用 `configure twitter-cookies ...`
|
|
328
|
-
* 服务器访问 Reddit/B站可能需要代理:用 `configure proxy ...`
|
|
329
|
-
* 小红书可能需要 docker:按 doctor 指引
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
# 常见问题(FAQ)
|
|
334
|
-
|
|
335
|
-
## Q1: 为什么我明明启用了 MCP,但某个平台用不了?
|
|
336
|
-
|
|
337
|
-
A:平台能力取决于 Agent-Reach 的“渠道状态”,不是 MCP 本身。跑 `reach_doctor` 看缺什么(cookie、代理、docker、登录等)。
|
|
338
|
-
|
|
339
|
-
## Q2: 为什么每次调用都要更新?会不会慢?
|
|
340
|
-
|
|
341
|
-
A:这是你选择的策略:Always-Latest。首次或上游更新时会慢,但能保证永远最新。如果以后你要“快且稳”,可以改成“每日一次更新/或失败回滚”。
|
|
342
|
-
|
|
343
|
-
## Q3: 如何避免 OpenCode 重启后不知道有哪些命令?
|
|
344
|
-
|
|
345
|
-
A:用 `reach_list_commands`。这是为“无记忆模型”专门做的能力自发现入口。
|
|
346
|
-
|
|
347
|
-
## Q4: 我想要更友好的工具(比如 reach_search_twitter / reach_search_xhs)要不要做?
|
|
348
|
-
|
|
349
|
-
A:可以做,但不是必须。`reach_exec` 已经完整复刻;单独工具只是“更强的 schema 引导”。
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
|
-
# License
|
|
354
|
-
|
|
355
|
-
MIT
|
|
356
|
-
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
### 我对齐了哪些“真实命令名”(可核对)
|
|
362
|
-
这些命令名来自 Agent-Reach 最新 README 中的安装方式与 FAQ:`configure twitter-cookies`、`search-twitter`、`configure proxy`、`search-xhs`、`read`、`doctor`、`install --env=auto/--safe/--dry-run`。 :contentReference[oaicite:1]{index=1}
|
|
363
|
-
|
|
364
|
-
如果你愿意,我还可以再给你一个**更强的 README 增强版**:把 `reach_list_commands` 的输出示例也写进去,并给一份“OpenCode Prompt 模板”(让模型自动:list_commands → 选命令 → exec)。
|
|
365
|
-
::contentReference[oaicite:2]{index=2}
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
[1]: https://github.com/Panniantong/Agent-Reach "GitHub - Panniantong/Agent-Reach: Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees."
|
|
1
|
+
# Agent-Reach MCP
|
|
2
|
+
|
|
3
|
+
MCP (stdio) server that provides full access to Agent-Reach for OpenCode / CC-Switch.
|
|
4
|
+
|
|
5
|
+
## What is Agent-Reach?
|
|
6
|
+
|
|
7
|
+
Agent-Reach gives your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
|
|
8
|
+
|
|
9
|
+
**Key Features:**
|
|
10
|
+
- Web page reading (via Jina Reader)
|
|
11
|
+
- YouTube video/subtitle extraction
|
|
12
|
+
- Twitter/X reading and search
|
|
13
|
+
- Reddit search and reading
|
|
14
|
+
- GitHub repository access
|
|
15
|
+
- Bilibili video extraction
|
|
16
|
+
- XiaoHongShu (Little Red Book) search
|
|
17
|
+
- Full-text web search (via Exa)
|
|
18
|
+
- RSS feed parsing
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### Quick Start (CC-Switch / OpenCode)
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": ["-y", "@bsbofmusic/agent-reach-mcp@latest"],
|
|
28
|
+
"type": "stdio"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Local Development
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
node index.js
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available Tools
|
|
40
|
+
|
|
41
|
+
| Tool | Description |
|
|
42
|
+
|------|-------------|
|
|
43
|
+
| `reach_ensure` | Create/update Python venv and install latest Agent-Reach |
|
|
44
|
+
| `reach_doctor` | Run `agent-reach doctor` - diagnose all channels |
|
|
45
|
+
| `reach_read` | Read a URL (webpage/video/repo) |
|
|
46
|
+
| `reach_exec` | Execute any `agent-reach <subcommand>` command |
|
|
47
|
+
| `reach_list_commands` | List available subcommands from `agent-reach --help` |
|
|
48
|
+
|
|
49
|
+
## Usage Examples
|
|
50
|
+
|
|
51
|
+
### First Time Setup
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{ "subcommand": "install", "args": ["--env=auto"] }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Read a Webpage
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{ "url": "https://example.com" }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Read YouTube Video
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "url": "https://youtube.com/watch?v=xxx" }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Configure Twitter Cookies
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"subcommand": "configure",
|
|
74
|
+
"args": ["twitter-cookies", "your_cookie_string"]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Search Twitter
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"subcommand": "search-twitter",
|
|
83
|
+
"args": ["your search query"]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Configure Proxy
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"subcommand": "configure",
|
|
92
|
+
"args": ["proxy", "http://user:pass@ip:port"]
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Search XiaoHongShu
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"subcommand": "search-xhs",
|
|
101
|
+
"args": ["keywords"]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Environment Requirements
|
|
106
|
+
|
|
107
|
+
- Node.js >= 18
|
|
108
|
+
- Python 3 (in PATH, or `py` on Windows)
|
|
109
|
+
- Internet access to GitHub
|
|
110
|
+
|
|
111
|
+
## How It Works
|
|
112
|
+
|
|
113
|
+
Every tool call triggers:
|
|
114
|
+
|
|
115
|
+
1. Create/reuse Python venv in user cache directory
|
|
116
|
+
2. Run `pip install -U https://github.com/Panniantong/agent-reach/archive/main.zip`
|
|
117
|
+
3. Execute the requested `agent-reach ...` command
|
|
118
|
+
4. Return stdout/stderr to the AI
|
|
119
|
+
|
|
120
|
+
### Venv Location
|
|
121
|
+
|
|
122
|
+
- Windows: `%LOCALAPPDATA%\agent-reach-mcp\runtime\venv`
|
|
123
|
+
- macOS: `~/Library/Caches/agent-reach-mcp/runtime/venv`
|
|
124
|
+
- Linux: `~/.cache/agent-reach-mcp/runtime/venv`
|
|
125
|
+
|
|
126
|
+
## Recommended Workflow
|
|
127
|
+
|
|
128
|
+
1. **Initial Setup**: Run `reach_ensure` to install/update Agent-Reach
|
|
129
|
+
2. **Diagnosis**: Run `reach_doctor` to check channel status
|
|
130
|
+
3. **Discovery**: Run `reach_list_commands` to see available commands
|
|
131
|
+
4. **Usage**: Use `reach_exec` for any Agent-Reach command
|
|
132
|
+
|
|
133
|
+
## FAQ
|
|
134
|
+
|
|
135
|
+
**Q: Why can't I use a certain platform?**
|
|
136
|
+
|
|
137
|
+
A: Check with `reach_doctor` - you may need cookies, proxy, or docker configured.
|
|
138
|
+
|
|
139
|
+
**Q: Does it update every call?会不会慢?**
|
|
140
|
+
|
|
141
|
+
A: Yes, this is "Always-Latest" strategy. First call or upstream updates may be slow, but you'll always have the latest version.
|
|
142
|
+
|
|
143
|
+
**Q: How to discover available commands after restart?**
|
|
144
|
+
|
|
145
|
+
A: Run `reach_list_commands` - this enables "capability self-discovery" for memory-less models.
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT
|
|
150
|
+
|
|
151
|
+
## Links
|
|
152
|
+
|
|
153
|
+
- [Agent-Reach GitHub](https://github.com/Panniantong/Agent-Reach)
|