Xiaohongshu Skill MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install redbook-cli
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add xiaohongshu-skill -- node "<FULL_PATH_TO_XIAOHONGSHU>/dist/index.js"

Replace <FULL_PATH_TO_XIAOHONGSHU>/dist/index.js with the actual folder you prepared in step 1.

README.md

Xiaohongshu (小红书/RED) CLI — search, publish, engage, and analyze.

📕 redbook-cli

Xiaohongshu (小红书/RED) CLI — search, publish, engage, and analyze.

Install • Quick Start • Commands • Features • License


Install

pip install redbook-cli

Or from source:

git clone https://github.com/Youhai020616/xiaohongshu.git
cd xiaohongshu && bash setup.sh

Quick Start

xhs init                                 # Guided setup (first time)
xhs search "美食"                         # Search → results cached
xhs read 1                               # Read 1st result (short index)
xhs like 1                               # Like 1st result
xhs fav 2                                # Favorite 2nd result
xhs comment 1 -c "好文!"                  # Comment on 1st result
xhs publish -t "标题" -c "内容" -i img.jpg  # Publish image post

Features

  • 🔍 Search — keyword search with sort/type/time filters, export to CSV/JSON
  • 📝 Publish — image & video posts with tags, scheduling, visibility control
  • 💬 Interact — like, favorite, comment, reply (short index support)
  • 📊 Analytics — creator dashboard data export (CDP)
  • 🔔 Notifications — mentions and interaction notifications
  • 👤 Profile — user info and post listing
  • 🔢 Short Indexxhs search → xhs read 1 → xhs like 1
  • 📦 Exportxhs search "AI" -o results.csv
  • 🔐 Login — MCP QR scan + CDP browser login
  • 👥 Multi-Account — isolated Chrome profiles per account
  • 🏗️ Dual Engine — MCP server (fast) + CDP scripts (full features)

Commands

Search & Read

xhs search "关键词"                        # Basic search
xhs search "旅行" --sort 最多点赞          # Sort by likes
xhs search "穿搭" --type 图文             # Filter by type
xhs search "AI" -o results.csv           # Export to CSV
xhs read 1                               # Read by short index
xhs detail FEED_ID -t TOKEN              # Read by ID + token

Publish

xhs publish -t "标题" -c "正文" -i photo.jpg                       # Image post
xhs publish -t "标题" -c "正文" -v video.mp4                       # Video post
xhs publish -t "标题" -c "正文" -i img.jpg --tags 旅行 --tags 美食  # With tags
xhs publish -t "测试" -c "内容" -i img.jpg --visibility 仅自己可见   # Private
xhs pub -t "标题" -c "正文" -i img.jpg --dry-run                    # Preview

Interact

xhs like 1                               # Like (short index)
xhs like FEED_ID -t TOKEN --unlike       # Unlike
xhs fav 1                                # Favorite
xhs comment 1 -c "写得好!"               # Comment
xhs reply 1 --comment-id X --user-id Y -c "回复"  # Reply

Analytics & Feed

xhs analytics                            # Creator dashboard
xhs analytics --csv data.csv             # Export CSV
xhs notifications                        # Messages
xhs feeds                                # Recommendation feed

Profile

xhs me                                   # My info
xhs profile USER_ID -t TOKEN             # User profile

Account & Config

xhs login                                # MCP QR scan
xhs login --cdp                          # CDP browser login
xhs status                               # Login status
xhs server start                         # Start MCP server
xhs server stop                          # Stop MCP server
xhs account list                         # List accounts
xhs config show                          # Show config
xhs config set mcp.proxy http://...      # Set proxy

Aliases

Short Command Short Command
xhs s search xhs r detail (read)
xhs pub publish xhs fav favorite
xhs cfg config xhs acc account
xhs srv server xhs noti notifications

Architecture

Engine Used for Technology
MCP Server Publish, search, like, comment, profile Go binary, JSON-RPC
CDP Scripts Analytics, notifications, advanced search Python, Chrome DevTools

MCP is the primary engine (always-on daemon). CDP is used for features MCP doesn't suppor

Tools (4)

searchSearch for content on Xiaohongshu with filters for sort, type, and time.
publishPublish image or video posts with tags, scheduling, and visibility control.
interactPerform social actions like like, favorite, comment, or reply to posts.
analyticsExport creator dashboard data and view account statistics.

Configuration

claude_desktop_config.json
{"mcpServers": {"xiaohongshu": {"command": "xhs", "args": ["server", "start"]}}}

Try it

Search for recent trending posts about 'AI technology' on Xiaohongshu.
Publish a new post with the title 'My Travel Diary' and the image at ./photo.jpg.
Like the first search result from my last query.
Export my creator dashboard analytics to a CSV file.
Comment 'Great post!' on the latest feed item.

Frequently Asked Questions

What are the key features of Xiaohongshu Skill?

Keyword-based search with sorting and filtering capabilities. Automated publishing of image and video posts with tag support. Social engagement tools including liking, favoriting, and commenting. Creator dashboard analytics and data export. Multi-account management using isolated Chrome profiles.

What can I use Xiaohongshu Skill for?

Automating content distribution across Xiaohongshu for social media managers. Aggregating and analyzing creator performance data for market research. Streamlining engagement workflows by interacting with feeds via CLI. Batch exporting search results for trend analysis and content planning.

How do I install Xiaohongshu Skill?

Install Xiaohongshu Skill by running: pip install redbook-cli

What MCP clients work with Xiaohongshu Skill?

Xiaohongshu Skill works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Xiaohongshu Skill docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare