返回顶部
x

xiaohongshu-mcp-openclaw小红书MCP工具

当用户提到小红书/XHS/Rednote 并需要关键词搜笔记、看笔记详情、抓评论、统计点赞与评论数时使用。通过 xpzouying/xiaohongshu-mcp + mcporter 提供统一查询流程。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
191
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

xiaohongshu-mcp-openclaw

xiaohongshu-mcp-openclaw

通过本 skill 可统一完成:

  • - 关键词搜索笔记
  • 获取笔记详情和评论
  • 输出点赞数/评论数等归一化指标
  • 多笔记抓取并自动汇总

快速开始

初始化(安装服务端 + 启动 + 注册 + 冒烟 + 登录守卫):
bash
bash {baseDir}/scripts/quickstart.sh

分发前环境预检:
bash
bash {baseDir}/scripts/preflight.sh

已安装到 OpenClaw 后可用:
bash
bash {baseDir}/scripts/installtoopenclaw.sh
openclaw skills info xiaohongshu-mcp-openclaw

默认会同步到 ~/.agents/skills/xiaohongshu-mcp-openclaw-1.0.0;如不需要可加 XHSSYNCAGENTS_SKILL=0。

Agent 规则(关键)

  • - 用户提到登录/扫码/看不到二维码/fail to login/未登录时,必须先执行:
bash bash {baseDir}/scripts/login_qr.sh xiaohongshu-mcp
  • - 回复用户时必须带上脚本输出中的 qrfile 和 opencommand(若存在)。
  • 若返回 status=qrurlready,必须返回 qrurlhint(和 opencommand 若存在),不要只说请扫码。
  • 禁止直接调用 mcporter call xiaohongshu-mcp.getlogin_qrcode --output raw 后只给文字提示。

核心命令

登录守卫(已登录则直接返回):
bash
python3 {baseDir}/scripts/xhsmcpclient.py --server xiaohongshu-mcp ensure-login

二维码登录(推荐,落盘 PNG 并返回可打开路径):
bash
bash {baseDir}/scripts/login_qr.sh xiaohongshu-mcp

仅生成二维码文件,不自动打开:
bash
XHSQRAUTOOPEN=0 bash {baseDir}/scripts/loginqr.sh xiaohongshu-mcp

登录守卫精简模式(不返回完整二维码 base64):
bash
python3 {baseDir}/scripts/xhsmcpclient.py --server xiaohongshu-mcp ensure-login --strip-qr-image

登录专用流程(临时 headful,成功后自动切回 headless):
bash
bash {baseDir}/scripts/login_flow.sh xiaohongshu-mcp 120

关键词搜索:
bash
python3 {baseDir}/scripts/xhsmcpclient.py --server xiaohongshu-mcp search --keyword 防晒 --limit 5

详情 + 评论报告:
bash
python3 {baseDir}/scripts/xhsmcpclient.py --server xiaohongshu-mcp report --keyword 防晒 --search-limit 5 --comment-limit 3

多笔记总结:
bash
bash {baseDir}/scripts/multi_summary.sh 防晒 5 2

登录诊断:
bash
bash {baseDir}/scripts/login_doctor.sh xiaohongshu-mcp

生成可分享分发包:
bash
bash {baseDir}/scripts/build_distribution.sh

可选:安装系统级常驻服务(防止隔天 offline):
bash
bash {baseDir}/scripts/service_install.sh xiaohongshu-mcp
bash {baseDir}/scripts/service_status.sh xiaohongshu-mcp

注意事项

  • - 默认 headless=true,避免频繁弹浏览器页面。
  • 脚本主要面向 Linux/macOS shell;Windows 建议用 WSL/Git Bash。
  • 常驻服务支持:macOS launchd、Linux systemd --user。
  • 查询命令默认带登录预检(未登录会直接返回并提示 ensure-login)。
  • ensure-login 默认包含二维码图片数据,便于上层代理直接展示扫码图。
  • 登录场景优先使用 scripts/loginqr.sh,该脚本会把二维码保存到本地 PNG(默认 ~/.openclaw/workspace/xhs-login-qrcode.png),避免有扫码提示但看不到二维码图片。
  • xhsmcpclient.py/loginqr.sh 已兼容 mcporter 的非标准对象输出(JS object literal),不依赖 PyYAML 也可解析二维码。
  • 禁止直接调用 mcporter call xiaohongshu-mcp.getloginqrcode --output raw 并只回复文字;必须返回 qrfile(或 opencommand)给用户。
  • 若服务未启动,xhsmcpclient.py 会返回 errortype=serveroffline 和可直接执行的 nextcommands(先启动再重试),不要只回复离线。
  • detail/comments 建议传 xsectoken(可从 search 结果中取)。
  • 出现登录/验证码时,需用户手动完成校验后重试。
  • 返回 Sorry, This Page Isnt Available Right Now. 多为目标笔记当前账号不可见。
  • 新会话如果没有加载该 skill,可先执行 openclaw skills info xiaohongshu-mcp-openclaw;找不到时执行 bash {baseDir}/scripts/installtoopenclaw.sh 后再新开会话。

完整文档

详细使用说明见:

  • - README.md
  • references/field-mapping.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 xiaohongshu-mcp-openclaw-1776286990 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 xiaohongshu-mcp-openclaw-1776286990 技能

通过命令行安装

skillhub install xiaohongshu-mcp-openclaw-1776286990

下载

⬇ 下载 xiaohongshu-mcp-openclaw v1.0.0(免费)

文件大小: 35.89 KB | 发布时间: 2026-4-17 16:37

v1.0.0 最新 2026-4-17 16:37
Initial public release with robust QR login flow, login guidance, and distribution scripts.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部