docs: update all remaining files for v1.4.0 upstream migrations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
AgentReach — installer, doctor, and configuration tool.
|
||||
|
||||
Agent Reach helps AI agents install and configure upstream platform tools
|
||||
(bird CLI, yt-dlp, mcporter, gh CLI, etc.). After installation, agents
|
||||
(twitter-cli, yt-dlp, mcporter, gh CLI, etc.). After installation, agents
|
||||
call the upstream tools directly — no wrapper layer needed.
|
||||
|
||||
Usage:
|
||||
|
||||
@@ -4,42 +4,51 @@
|
||||
|
||||
Reddit 封锁了几乎所有非浏览器的直接访问(包括数据中心和 ISP 代理 IP),JSON API 返回 403。
|
||||
|
||||
Agent Reach 通过 **Exa** 实现 Reddit 的搜索和阅读功能:
|
||||
- **搜索**:`web_search_exa` + `includeDomains: ["reddit.com"]`
|
||||
- **阅读完整帖子+评论**:`crawling_exa` 读取 Reddit URL 的缓存内容
|
||||
Agent Reach 通过 **rdt-cli** 实现 Reddit 的搜索和阅读功能:
|
||||
- **搜索**:`rdt search "关键词"`
|
||||
- **阅读完整帖子+评论**:`rdt read POST_ID`
|
||||
|
||||
免费,无需代理,无需 API Key。
|
||||
免费,无需代理,无需 API Key,无需登录。
|
||||
|
||||
## Agent 可自动完成的步骤
|
||||
|
||||
1. 检查 Exa 是否可用:
|
||||
1. 检查 rdt-cli 是否可用:
|
||||
```bash
|
||||
agent-reach doctor | grep -E "Reddit|Exa"
|
||||
which rdt && echo "installed" || echo "not installed"
|
||||
```
|
||||
|
||||
2. 如果 Exa 未安装,自动安装:
|
||||
2. 如果未安装,自动安装:
|
||||
```bash
|
||||
npm install -g mcporter
|
||||
mcporter config add exa https://mcp.exa.ai/mcp
|
||||
pipx install rdt-cli
|
||||
```
|
||||
|
||||
或一键安装:
|
||||
```bash
|
||||
agent-reach install --env=auto
|
||||
agent-reach install --env=auto --channels=reddit
|
||||
```
|
||||
|
||||
## 使用示例
|
||||
|
||||
搜索 Reddit 内容:
|
||||
```bash
|
||||
mcporter call 'exa.web_search_exa(query: "python best practices", numResults: 5, includeDomains: ["reddit.com"])'
|
||||
rdt search "python best practices" -n 5
|
||||
```
|
||||
|
||||
阅读完整帖子和评论:
|
||||
```bash
|
||||
mcporter call 'exa.crawling_exa(urls: ["https://www.reddit.com/r/python/comments/xxx/"], maxCharacters: 10000)'
|
||||
rdt read POST_ID
|
||||
```
|
||||
|
||||
## 需要用户手动做的步骤
|
||||
|
||||
无。Exa 通过 `agent-reach install --env=auto` 自动配置。
|
||||
无。rdt-cli 通过 `agent-reach install --env=auto` 自动安装。
|
||||
|
||||
## Fallback:Exa 搜索
|
||||
|
||||
如果你已经配置了 Exa(通过 mcporter),也可以通过 Exa 搜索 Reddit 内容:
|
||||
|
||||
```bash
|
||||
mcporter call 'exa.web_search_exa(query: "python best practices", numResults: 5, includeDomains: ["reddit.com"])'
|
||||
```
|
||||
|
||||
rdt-cli 是当前推荐方案,无需额外配置即可使用。
|
||||
|
||||
@@ -1,35 +1,34 @@
|
||||
# Twitter 高级功能配置指南(bird CLI)
|
||||
# Twitter 高级功能配置指南(twitter-cli)
|
||||
|
||||
Twitter 基础阅读通过 Jina Reader 免费可用,无需配置。
|
||||
|
||||
高级功能需要 bird CLI(@steipete/bird):
|
||||
高级功能需要 twitter-cli(@public-clis/twitter-cli):
|
||||
|
||||
- 搜索推文(`bird search`)
|
||||
- 读取完整推文和对话链(`bird read`、`bird thread`)
|
||||
- 用户时间线(`bird user-tweets`)
|
||||
- 搜索推文(`twitter search`)
|
||||
- 读取完整推文和对话链(`twitter tweet`、`twitter thread`)
|
||||
- 用户时间线(`twitter timeline`)
|
||||
- 长文阅读(`twitter article`)
|
||||
|
||||
bird 是免费开源工具(npm 包 @steipete/bird),但需要你的 Twitter 账号 cookie。
|
||||
twitter-cli 是免费开源工具(pipx 安装),但需要你的 Twitter 账号 cookie。
|
||||
|
||||
## 快速配置
|
||||
|
||||
1. 检查 bird 是否安装:
|
||||
1. 检查 twitter-cli 是否安装:
|
||||
|
||||
```bash
|
||||
which bird && echo "installed" || echo "not installed"
|
||||
which twitter && echo "installed" || echo "not installed"
|
||||
```
|
||||
|
||||
2. 安装 bird:
|
||||
2. 安装 twitter-cli:
|
||||
|
||||
```bash
|
||||
npm install -g @steipete/bird
|
||||
pipx install twitter-cli
|
||||
```
|
||||
|
||||
> 备选包:`npm install -g @connormartin/bird`
|
||||
|
||||
3. 测试是否配置好:
|
||||
|
||||
```bash
|
||||
AUTH_TOKEN="xxx" CT0="yyy" bird search "test" -n 1
|
||||
twitter search "test" -n 1
|
||||
```
|
||||
|
||||
## 获取 Cookie(Cookie-Editor 方式,推荐)
|
||||
@@ -49,7 +48,7 @@ agent-reach configure twitter-cookies "粘贴的 cookie JSON"
|
||||
|
||||
如果你已经知道 `auth_token` 和 `ct0`:
|
||||
|
||||
1. 安装 bird(如果没装):`npm install -g @steipete/bird`
|
||||
1. 安装 twitter-cli(如果没装):`pipx install twitter-cli`
|
||||
|
||||
2. 设置环境变量:
|
||||
|
||||
@@ -61,21 +60,25 @@ export CT0="你的ct0"
|
||||
3. 测试:
|
||||
|
||||
```bash
|
||||
bird search "test" -n 1
|
||||
twitter search "test" -n 1
|
||||
```
|
||||
|
||||
## 代理配置
|
||||
|
||||
> bird CLI 支持通过环境变量设置代理:
|
||||
> twitter-cli 支持通过环境变量设置代理:
|
||||
|
||||
```bash
|
||||
export HTTP_PROXY="http://user:pass@host:port"
|
||||
export HTTPS_PROXY="http://user:pass@host:port"
|
||||
bird search "test" -n 1
|
||||
twitter search "test" -n 1
|
||||
```
|
||||
|
||||
也可以使用全局代理工具:
|
||||
|
||||
```bash
|
||||
proxychains bird search "test" -n 1
|
||||
proxychains twitter search "test" -n 1
|
||||
```
|
||||
|
||||
## Fallback:bird CLI
|
||||
|
||||
如果你已经安装了 [bird CLI](https://www.npmjs.com/package/@steipete/bird)(`npm install -g @steipete/bird`),它也能正常工作。Agent Reach 会自动检测并使用已安装的 bird。两者功能类似,twitter-cli 是当前推荐方案。
|
||||
|
||||
@@ -1,51 +1,36 @@
|
||||
# 小红书配置指南
|
||||
|
||||
## 功能说明
|
||||
读取和搜索小红书笔记。通过 [xiaohongshu-mcp](https://github.com/xpzouying/xiaohongshu-mcp) 实现(⭐9K+,Go 语言,内置 Chrome 浏览器)。
|
||||
读取和搜索小红书笔记。通过 [xhs-cli](https://github.com/jackwener/xiaohongshu-cli)(⭐1.5K,pipx 一行安装)实现。
|
||||
|
||||
## 前置条件
|
||||
- Docker(用来运行 xiaohongshu-mcp 服务)
|
||||
- mcporter CLI(MCP 协议桥接工具)
|
||||
- Python 3.10+(pipx 安装)
|
||||
- 浏览器已登录 xiaohongshu.com(用于导出 Cookie)
|
||||
|
||||
## Agent 可自动完成的步骤
|
||||
|
||||
### 1. 安装 mcporter
|
||||
### 1. 安装 xhs-cli
|
||||
```bash
|
||||
npm install -g mcporter
|
||||
pipx install xiaohongshu-cli
|
||||
```
|
||||
|
||||
### 2. 启动 xiaohongshu-mcp 服务
|
||||
### 2. 登录(从浏览器提取 Cookie)
|
||||
```bash
|
||||
docker run -d \
|
||||
--name xiaohongshu-mcp \
|
||||
-p 18060:18060 \
|
||||
xpzouying/xiaohongshu-mcp
|
||||
xhs login
|
||||
```
|
||||
|
||||
> 如需代理(服务器部署推荐):
|
||||
> ```bash
|
||||
> docker run -d \
|
||||
> --name xiaohongshu-mcp \
|
||||
> -p 18060:18060 \
|
||||
> -e XHS_PROXY=http://user:pass@ip:port \
|
||||
> xpzouying/xiaohongshu-mcp
|
||||
> ```
|
||||
> 这会自动从浏览器提取 Cookie。如果自动提取失败,可以手动导入(见下方)。
|
||||
|
||||
### 3. 注册到 mcporter
|
||||
```bash
|
||||
mcporter config add xiaohongshu http://localhost:18060/mcp
|
||||
```
|
||||
|
||||
### 4. 验证
|
||||
### 3. 验证
|
||||
```bash
|
||||
agent-reach doctor
|
||||
```
|
||||
|
||||
应该看到小红书显示为 ✅ 或 ⚠️(MCP 已连接但未登录)。
|
||||
应该看到小红书显示为 ✅。
|
||||
|
||||
## 需要用户手动做的步骤
|
||||
|
||||
如果 doctor 显示"MCP 已连接但未登录",需要导入 cookies:
|
||||
如果 `xhs login` 自动提取失败,需要手动导入 cookies:
|
||||
|
||||
> **推荐方式:Cookie-Editor 浏览器导出(最可靠)**
|
||||
>
|
||||
@@ -54,43 +39,47 @@ agent-reach doctor
|
||||
> 3. 点击 Cookie-Editor 图标 → Export → Header String
|
||||
> 4. 把导出的字符串发给 Agent,运行:`agent-reach configure xhs-cookies "导出的cookie字符串"`
|
||||
>
|
||||
> **注意**:`http://localhost:18060` 根路径可能返回 404,这是正常的——MCP 服务在 `/mcp` 路径。
|
||||
> 不要依赖 QR 扫码登录,Docker 容器内的 QR 登录页面不一定可用,且 cookies 不会自动共享到 MCP 服务。
|
||||
> **注意**:不要依赖 QR 扫码登录,Cookie-Editor 导出方式最简单可靠。
|
||||
|
||||
## 使用示例
|
||||
|
||||
搜索笔记:
|
||||
```bash
|
||||
xhs search "关键词"
|
||||
```
|
||||
|
||||
阅读笔记详情:
|
||||
```bash
|
||||
xhs read NOTE_ID
|
||||
```
|
||||
|
||||
查看评论:
|
||||
```bash
|
||||
xhs comments NOTE_ID
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
|
||||
**Q: Docker 容器重启后 cookie 丢了?**
|
||||
A: 挂载数据卷持久化:
|
||||
**Q: Cookie 过期了?**
|
||||
A: 重新运行 `xhs login` 或通过 Cookie-Editor 重新导出。
|
||||
|
||||
**Q: 小红书提示 IP 风险?**
|
||||
A: 推荐使用住宅代理:`export HTTP_PROXY="http://user:pass@ip:port"`。
|
||||
|
||||
**Q: xhs-cli 不支持我的系统?**
|
||||
A: 确保 Python 3.10+ 和 pipx 已安装。运行 `pipx install xiaohongshu-cli` 即可。
|
||||
|
||||
## 备选方案:Docker MCP
|
||||
|
||||
如果你已经在使用 [xiaohongshu-mcp](https://github.com/xpzouying/xiaohongshu-mcp) Docker 方案,它也能正常工作:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name xiaohongshu-mcp \
|
||||
-p 18060:18060 \
|
||||
-v xhs-data:/app/data \
|
||||
xpzouying/xiaohongshu-mcp
|
||||
|
||||
mcporter config add xiaohongshu http://localhost:18060/mcp
|
||||
```
|
||||
|
||||
**Q: 服务器上小红书提示 IP 风险?**
|
||||
A: 加代理参数 `-e XHS_PROXY=http://user:pass@ip:port`,推荐住宅代理。
|
||||
|
||||
**Q: Docker 镜像不支持 ARM64 / Apple Silicon?**
|
||||
A: 上游镜像暂无 ARM64 版本,两种解决办法:
|
||||
|
||||
方法一:使用 Rosetta 模拟运行(推荐,最简单)
|
||||
```bash
|
||||
docker run -d \
|
||||
--name xiaohongshu-mcp \
|
||||
-p 18060:18060 \
|
||||
--platform linux/amd64 \
|
||||
xpzouying/xiaohongshu-mcp
|
||||
```
|
||||
|
||||
方法二:从源码编译原生 ARM64 版本
|
||||
```bash
|
||||
git clone https://github.com/xpzouying/xiaohongshu-mcp
|
||||
cd xiaohongshu-mcp
|
||||
docker build -t xiaohongshu-mcp .
|
||||
docker run -d --name xiaohongshu-mcp -p 18060:18060 xiaohongshu-mcp
|
||||
```
|
||||
|
||||
**Q: 我不想用 Docker?**
|
||||
A: 可以从源码编译:https://github.com/xpzouying/xiaohongshu-mcp
|
||||
xhs-cli 是当前推荐方案,不需要 Docker,安装更简单。
|
||||
|
||||
@@ -5,7 +5,7 @@ Agent Reach MCP Server — expose doctor/status as MCP tool.
|
||||
Run: python -m agent_reach.integrations.mcp_server
|
||||
|
||||
Agent Reach is an installer + doctor tool. For actual reading/searching,
|
||||
agents should call upstream tools directly (bird, yt-dlp, mcporter, etc.).
|
||||
agents should call upstream tools directly (twitter-cli, yt-dlp, mcporter, etc.).
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
||||
Reference in New Issue
Block a user