小红书自动化运营工具-支持:搜索笔记、查看笔记详情及评论、浏览推荐流、发布图文笔记。 当用户提及 xiaohongshu、小红书、RedNote,或需要在该平台进行内容调研/发布时使用。
Scanned 9/11/2026
Install to Claude Code
npx -y skills add lxyeternal/MalSkillBench --skill xhs-cn --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Xhs Cn?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/lxyeternal-xhs-cn)More formats (shields.io, HTML) on the badges page.
---
name: xiaohongshu
description: >
小红书自动化运营工具-支持:搜索笔记、查看笔记详情及评论、浏览推荐流、发布图文笔记。
当用户提及 xiaohongshu、小红书、RedNote,或需要在该平台进行内容调研/发布时使用。
---
# 小红书 MCP
通过内置的 Python 客户端与本地 [xpzouying/xiaohongshu-mcp](https://github.com/xpzouying/xiaohongshu-mcp) 服务器通信,自动化小红书操作。
**前置条件**:`pip install requests` 并确保 MCP 服务器正在运行。首次安装请参阅 [SETUP.md](SETUP.md)。
## 快速参考
```bash
python scripts/xhs_client.py status
python scripts/xhs_client.py search "美食推荐"
python scripts/xhs_client.py search "美食" --sort "最多点赞" --type "图文" --time "一周内"
python scripts/xhs_client.py detail <feed_id> <xsec_token> --comments
python scripts/xhs_client.py feeds
python scripts/xhs_client.py publish "标题" "正文内容" "图片链接1,图片链接2" --tags "标签1,标签2"
```
所有命令均支持 `--json` 参数以输出原始 JSON 数据。
## 工作流:市场调研
```
进度:
- [ ] 第 1 步:验证服务器连接
- [ ] 第 2 步:搜索目标关键词
- [ ] 第 3 步:获取笔记详情
- [ ] 第 4 步:分析调研结果
```
**第 1 步:验证服务器连接**
```bash
python scripts/xhs_client.py status
```
如果未连接,请参阅 [SETUP.md](SETUP.md)。在状态显示已登录之前,请勿继续后续步骤。
**第 2 步:搜索目标关键词**
```bash
python scripts/xhs_client.py search "户外电源" --sort "最多点赞" --json
```
筛选参数:`--sort`(综合/最新/最多点赞/最多评论/最多收藏)、`--type`(不限/视频/图文)、`--time`(不限/一天内/一周内/半年内)。
**第 3 步:获取笔记详情**
使用搜索结果中的 `feed_id` 和 `xsec_token`:
```bash
python scripts/xhs_client.py detail "<feed_id>" "<xsec_token>" --comments --json
```
**第 4 步:分析调研结果**
查看笔记内容、互动数据(点赞、收藏、评论)以及评论区情感倾向。
## 工作流:发布内容
```
进度:
- [ ] 第 1 步:验证服务器连接
- [ ] 第 2 步:准备图片和文案
- [ ] 第 3 步:发布笔记
- [ ] 第 4 步:验证发布结果
```
**第 1 步:验证服务器连接**
```bash
python scripts/xhs_client.py status
```
**第 2 步:准备图片和文案**
确保图片链接可公开访问。准备标题(建议不超过 20 个字符)、正文内容和可选标签。
**第 3 步:发布笔记**
```bash
python scripts/xhs_client.py publish "标题" "正文内容" "https://img1.jpg,https://img2.jpg" --tags "标签1,标签2"
```
**第 4 步:验证发布结果**
搜索已发布的笔记以确认上线:
```bash
python scripts/xhs_client.py search "标题" --sort "最新"
```
## 注意事项
- **会话失效**:MCP 服务器运行期间,请勿在其他任何网页浏览器中登录同一小红书账号。
- **服务器必须运行**:所有命令都需要 MCP 服务器在 `http://localhost:18060` 上运行。
- **频率限制**:请适当控制请求间隔,避免触发反自动化机制。
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!