xhs-studio
Publishes image-text notes to Xiaohongshu (小红书) via a local MCP server. Supports text, images, tags, visibility settings, and scheduled publishing. Also supports searching trending content. Use when user asks to "post to XHS", "发小红书", "publish to Xiaohongshu", or "搜索小红书热点".
install
source · Clone the upstream repo
git clone https://github.com/waynefu2020/xhs-studio
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/waynefu2020/xhs-studio ~/.claude/skills/waynefu2020-xhs-studio-xhs-studio
manifest:
SKILL.mdsource content
Post to Xiaohongshu (小红书)
Publish image-text notes to Xiaohongshu via a local MCP server (
xiaohongshu-mcp). Supports images, tags, visibility control, and scheduled posts.
Prerequisites
- Download
binary from xiaohongshu-mcp releasesxiaohongshu-mcp - Place the binary at a known path (e.g.
)~/xiaohongshu-mcp/xiaohongshu-mcp-darwin-arm64 - Configure the path in EXTEND.md (see Preferences below)
- Run login once to save cookies:
python3 ${SKILL_DIR}/scripts/login.py
Preferences (EXTEND.md)
Check EXTEND.md (priority: project → user):
test -f .baoyu-skills/xhs-studio/EXTEND.md && echo "project" test -f "$HOME/.baoyu-skills/xhs-studio/EXTEND.md" && echo "user"
| Path | Location |
|---|---|
| Project directory |
| User home |
EXTEND.md schema:
mcp_bin: /path/to/xiaohongshu-mcp-darwin-arm64 # required mcp_port: 18060 # optional, default 18060
If EXTEND.md not found → ask user for
mcp_bin path, save EXTEND.md, then continue.
Script Directory
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.py
| Script | Purpose |
|---|---|
| Publish image-text note |
| Search trending content |
| QR code login |
Publishing a Note
python3 ${SKILL_DIR}/scripts/publish.py \ --title "标题(≤20字)" \ --content "正文内容" \ --images /path/to/image1.png /path/to/image2.png \ --tags "AI工具" "效率神器" \ --visibility "公开可见"
Parameters:
| Parameter | Required | Description |
|---|---|---|
| ✅ | 标题,最多 20 个中文字 |
| ✅ | 正文内容(支持换行) |
| ✅ | 图片路径列表(本地绝对路径 或 https:// 链接,最多 18 张) |
| optional | 话题标签,如 |
| optional | (默认)/ / |
| optional | 定时发布,ISO8601 格式: |
Searching Trending Content
python3 ${SKILL_DIR}/scripts/search.py "关键词"
Returns top notes with title, author, and like count. Use this for topic research before writing.
Login / Re-login
python3 ${SKILL_DIR}/scripts/login.py
Opens a QR code image. Scan with Xiaohongshu app. Session is saved automatically to
cookies.json next to the MCP binary.
Notes
- The MCP server starts automatically if not already running
- Requests to
must bypass any system proxy (localhost
is set automatically)NO_PROXY=localhost - Title limit: 20 Chinese characters or equivalent
- Image limit: 18 images per post
- Scheduled posts: 1 hour to 14 days from now