# Add to your Claude Code skills
git clone https://github.com/xpzouying/xiaohongshu-mcpGuides for using mcp servers skills like xiaohongshu-mcp.
Last scanned: 4/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-04-17T06:04:38.431Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}xiaohongshu-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by xpzouying. MCP for xiaohongshu.com. It has 14,621 GitHub stars.
Yes. xiaohongshu-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/xpzouying/xiaohongshu-mcp" and add it to your Claude Code skills directory (see the Installation section above).
xiaohongshu-mcp is primarily written in Go. It is open-source under xpzouying on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh xiaohongshu-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
MCP for 小红书 / xiaohongshu.com。让你的 AI 助手直接访问小红书数据。
[!IMPORTANT]
🔥 方案 A:Openclaw 深度集成 (推荐给开发者)
- Openclaw 太火啦 🔥🔥🔥 ,新增 Openclaw 支持,分为两种,请各位按需使用:
- xiaohongshu-mcp-skills(适用于已部署完本项目的用户)
- xiaohongshu-skills(开箱即用版)
[!TIP]
✨ 方案 B:x-mcp 浏览器插件版 (推荐给非技术同学 / 追求极简的用户)
- 不想折腾 Docker 或部署环境?试试:xpzouying/x-mcp
- 零配置:安装插件即用,无需任何代码、代理或复杂的环境配置。
- 安全稳定:直接在常用浏览器 (Chrome/Edge) 及本地网络运行,无服务器 IP 风险,且能解决 90% 的部署报错。
如果您在部署传统 Docker 版本时遇到问题,务必先查看:各种疑难杂症 (Issues #56)。
提示:如果环境排查太耗时,切换到 x-mcp 插件版 通常是更高效的选择。
本项目所有的赞赏都会用于慈善捐赠。所有的慈善捐赠记录,请参考 DONATIONS.md。
捐赠时,请备注 MCP 以及名字。 如需更正/撤回署名,请开 Issue 或通过邮箱联系。
支付宝(不展示二维码):
通过支付宝向 xpzouying@gmail.com 赞赏。
微信:
主要功能
💡 提示: 点击下方功能标题可展开查看视频演示
第一步必须,小红书需要进行登录。可以检查当前登录状态。
登录演示:
https://github.com/user-attachments/assets/8b05eb42-d437-41b7-9235-e2143f19e8b7
检查登录状态演示:
https://github.com/user-attachments/assets/bd9a9a4a-58cb-4421-b8f3-015f703ce1f9
支持发布图文内容到小红书,包括标题、内容描述和图片。
图片支持方式:
支持两种图片输入方式:
HTTP/HTTPS 图片链接
["https://example.com/image1.jpg", "https://example.com/image2.png"]
本地图片绝对路径(推荐)
["/Users/username/Pictures/image1.jpg", "/home/user/images/image2.png"]
为什么推荐使用本地路径:
发布图文帖子演示:
https://github.com/user-attachments/assets/8aee0814-eb96-40af-b871-e66e6bbb6b06
支持发布视频内容到小红书,包括标题、内容描述和本地视频文件。
视频支持方式:
仅支持本地视频文件绝对路径:
"/Users/username/Videos/video.mp4"
功能特点:
注意事项:
根据关键词搜索小红书内容。
搜索帖子演示:
https://github.com/user-attachments/assets/03c5077d-6160-4b18-b629-2e40933a1fd3
获取小红书首页推荐内容列表。
获取推荐列表演示:
https://github.com/user-attachments/assets/110fc15d-46f2-4cca-bdad-9de5b5b8cc28
获取小红书帖子的完整详情,包括:
⚠️ 重要提示:
获取帖子详情演示:
https://github.com/user-attachments/assets/76a26130-a216-4371-a6b3-937b8fda092a
支持自动发表评论到小红书帖子。
功能说明:
⚠️ 重要提示:
发表评论演示:
https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
获取小红书用户的个人主页信息,包括用户基本信息和笔记内容。
功能说明:
⚠️ 重要提示:
返回信息包括:
回复笔记下的指定评论,支持精准回复特定用户的评论。
功能说明:
⚠️ 重要提示:
为笔记点赞或取消点赞,智能检测当前状态避免重复操作。
功能说明:
⚠️ 重要提示:
收藏笔记或取消收藏,智能检测当前状态避免重复操作。
功能说明:
⚠️ 重要提示:
小红书基础运营知识
风险说明
该项目是基于学习的目的,禁止一切违法行为。
实操结果
第一天点赞/收藏数达到了 999+,
一周左右的成果
方式一:下载预编译二进制文件
直接从 GitHub Releases 下载对应平台的二进制文件:
主程序(MCP 服务):
xiaohongshu-mcp-darwin-arm64xiaohongshu-mcp-darwin-amd64xiaohongshu-mcp-windows-amd64.exexiaohongshu-mcp-linux-amd64登录工具:
xiaohongshu-login-darwin-arm64xiaohongshu-login-darwin-amd64xiaohongshu-login-windows-amd64.exexiaohongshu-login-linux-amd64使用步骤:
# 1. 首先运行登录工具
chmod +x xiaohongshu-login-darwin-arm64
./xiaohongshu-login-darwin-arm64
# 2. 然后启动 MCP 服务
chmod +x xiaohongshu-mcp-darwin-arm64
./xiaohongshu-mcp-darwin-arm64
⚠️ 重要提示:首次运行时会自动下载无头浏览器(约 150MB),请确保网络连接正常。后续运行无需重复下载。
方式二:源码编译
依赖 Golang 环境,安装方法请参考 Golang 官方文档。
设置 Go 国内源的代理,
# 配置 GOPROXY 环境变量,以下三选一
# 1. 七牛 CDN
go env -w GOPROXY=https://goproxy.cn,direct
# 2. 阿里云
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
# 3. 官方
go env -w GOPROXY=https://goproxy.io,direct
方式三:使用 Docker 容器(最简单)
使用 Docker 部署是最简单的方式,无需安装任何开发环境。
1. 从 Docker Hub 拉取镜像(推荐)
我们提供了预构建的 Docker 镜像,可以直接从 Docker Hub 拉取使用:
# 拉取最新镜像
docker pull xpzouying/xiaohongshu-mcp
Docker Hub 地址:https://hub.docker.com/r/xpzouying/xiaohongshu-mcp
2. 使用 Docker Compose 启动(推荐)
我们提供了配置好的 docker-compose.yml 文件,可以直接使用:
# 下载 docker-compose.yml
wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
# 或者如果已经克隆了项目,进入 docker 目录
cd docker
# 启动服务
docker compose up -d
# 查看日志
docker compose logs -f
# 停止服务
docker compose stop
3. 自己构建镜像(可选)
# 在项目根目录运行
docker build -t xpzouying/xiaohongshu-mcp .
4. 配置说明
Docker 版本会自动:
./data 用于存储 cookies 和运行数据目录./images 用于存储发布的图片详细使用说明请参考:Docker 部署指南
Windows 遇到问题首先看这里:Windows 安装指南
第一次需要手动登录,需要保存小红书的登录状态。
使用二进制文件:
# 运行对应平台的登录工具
./xiaohongshu-login-darwin-arm64
使用源码:
go run cmd/login/main.go
启动 xiaohongshu-mcp 服务。
使用二进制文件:
# 默认:无头模式,没有浏览器界面
./xiaohongshu-mcp-darwin-arm64
# 非无头模式,有浏览器界面
./xiaohongshu-mcp-darwin-arm64 -headless=false
使用源码:
# 默认:无头模式,没有浏览器界面
go run .
# 非无头模式,有浏览器界面
go run . -headless=false
配置代理(可选):
如果需要通过代理访问,可以设置 XHS_PROXY 环境变量:
# 设置代理后启动
XHS_PROXY=http://user:pass@proxy:port ./xiaohongshu-mcp-darwin-arm64
# 或使用源码
XHS_PROXY=http://proxy:port go run .
支持 HTTP/HTTPS/SOCKS5 代理,日志中会自动隐藏代理的认证信息。
npx @modelcontextprotocol/inspector

运行后,打开红色标记的链接,配置 MCP inspector,输入 http://localhost:18060/mcp ,点击 Connect 按钮。
注意: 左侧边框中的选项是否正确。
按照上面配置 MCP inspector 后,点击 List Tools 按钮,查看所有的 Tools。
![检查登录状态](./assets