Xiaohongshu MCP: The Complete Guide to AI-Powered Content Management for Little Red Book

Xiaohongshu (小红书, also known as "Little Red Book" or RED) is China's dominant lifestyle and social commerce platform with over 300 million monthly active users. For content creators and marketers operating on this platform, managing posts, engagement, and analytics can be overwhelming. Xiaohongshu MCP solves this by providing a Model Context Protocol (MCP) server that enables AI assistants like Claude, ChatGPT, and Cursor to directly interact with your Xiaohongshu account — publishing content, searching posts, managing comments, and tracking engagement, all through natural language commands.
With 11,200+ GitHub stars, 1,678 forks, 90 releases, and a thriving community, this project by xpzouying has become the most popular social media MCP server on GitHub. Built in Go and powered by browser automation, it operates through the user's own authenticated session — no unofficial API hacking involved.
What Is Xiaohongshu MCP?
Xiaohongshu MCP is an open-source MCP server written in Go that bridges AI assistants with the Xiaohongshu platform. Using the standardized Model Context Protocol — often described as the "USB port for AI tools" — it exposes a set of tools that any MCP-compatible AI client can call to perform actions on your Xiaohongshu account.
The server uses Playwright-based browser automation to interact with the official Xiaohongshu web interface through the user's own login session (via QR code authentication). This means it operates within the platform's normal usage patterns — no reverse engineering, no unofficial APIs.
Key Stats
| Metric | Value |
|---|---|
| GitHub Stars | 11,200+ |
| Forks | 1,678 |
| Releases | 90 |
| Language | Go |
| Created | August 2025 |
| Last Updated | March 2026 (daily) |
| Homepage | haha.ai/xiaohongshu-mcp |
| Topics | mcp, mcp-server, xiaohongshu-mcp |
| Docker | xpzouying/xiaohongshu-mcp |
Core Features
1. Content Publishing
Publish image, text, and video content directly to Xiaohongshu through your AI assistant.
Image + Text Posts (publish_content):
- Title (required, max 20 characters per XHS rules)
- Content (required, max 1,000 characters)
- Images (required, at least 1) — supports HTTP URLs and local file paths (local recommended)
- Tags (optional) — adds hashtags for discoverability
- Schedule (optional) — ISO8601 format, 1 hour to 14 days ahead
- Visibility — public, self-only, or mutual-follow friends only
- Products — product keyword tagging for e-commerce integration
- Original declaration (optional)
Video Posts (publish_with_video):
- Local video file path (MP4, max ~1GB recommended)
- Same metadata options as image posts
- Auto-waits for video processing before publishing
2. Content Discovery
search_feeds— Keyword search with advanced filters:- Sort by: relevance, newest, most liked, most commented, most bookmarked
- Note type: all, video only, image+text only
- Time range: all, 24h, 1 week, 6 months
- Scope: all, viewed, unviewed, followed accounts
- Location: all, same city, nearby
list_feeds— Get personalized homepage recommendationsget_feed_detail— Full post details with engagement data, comments, and sub-replies
3. Engagement Management
post_comment_to_feed— Auto-comment on postsreply_comment_in_feed— Reply to specific comments (by comment_id or user_id)like_feed/favorite_feed— Like/unlike, bookmark/unbookmark with smart duplicate detection
4. User Intelligence
user_profile— Retrieve user profiles including:- Basic info (nickname, bio, avatar, verification)
- Stats (followers, following, likes, post count)
- Published content list
5. Session Management
check_login_status— Verify current login stateget_login_qrcode— Get login QR code (returns Base64 image)delete_cookies— Reset session for re-login
Getting Started
Option A: Pre-compiled Binaries (Simplest)
Download from GitHub Releases — available for macOS (ARM/Intel), Windows, and Linux.
# 1. Run login tool (first time)
chmod +x xiaohongshu-login-darwin-arm64
./xiaohongshu-login-darwin-arm64
# 2. Start MCP server
chmod +x xiaohongshu-mcp-darwin-arm64
./xiaohongshu-mcp-darwin-arm64
Option B: Docker (Recommended for Production)
# Pull from Docker Hub
docker pull xpzouying/xiaohongshu-mcp
# Or use docker-compose
wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
docker compose up -d
Docker auto-configures Chrome, Chinese fonts, cookie storage, and exposes port 18060.
Option C: Build from Source
git clone https://github.com/xpzouying/xiaohongshu-mcp.git
cd xiaohongshu-mcp
# Build and run
go run cmd/login/main.go # Login first
go run . # Start MCP server
Option D: Browser Extension (Zero Config)
For non-technical users: x-mcp — a browser extension (Chrome/Edge) that works without Docker or server setup.
MCP Client Integration
Supported Clients
The server works with any MCP-compatible client:
| Client | Status |
|---|---|
| Claude Desktop | ✅ Fully supported |
| Claude Code | ✅ Fully supported |
| Cursor | ✅ Fully supported |
| Windsurf | ✅ Supported |
| Cherry Studio | ✅ Supported |
| Trae | ✅ Supported |
| n8n | ✅ Supported |
| Spring AI | ✅ Supported |
| LangChain | ✅ Supported |
Configuration Example
{
"mcpServers": {
"xiaohongshu-mcp": {
"command": "./xiaohongshu-mcp-darwin-arm64",
"args": []
}
}
}
For remote/Docker setups, use SSE transport:
{
"mcpServers": {
"xiaohongshu-mcp": {
"url": "http://localhost:18060/sse"
}
}
}
Ecosystem & Integrations
OpenClaw Integration
The project offers deep integration with OpenClaw (the AI agent framework):
- xiaohongshu-mcp-skills — For users who already have xiaohongshu-mcp deployed
- xiaohongshu-skills — Out-of-the-box version requiring no prior setup
Community & Support
- Feishu (Lark) group for mutual help
- WeChat groups for community discussion
- Active GitHub Discussions
- Contributing Guide
Real-World Results
The author shares verified results from production use:
- Day 1: 999+ likes and bookmarks on published content
- 1 week: Significant engagement growth with AI-automated content operations
- Stable operation: Over 1 year of stable running on the author's own account, with no bans — only occasional cookie expirations requiring re-login
- The author uses Claude Code for fully automated content operations
Operational Tips from the Author
- Titles must be ≤ 20 characters — Xiaohongshu enforces this strictly
- Content body ≤ 1,000 characters
- Image+text posts outperform video and pure text for recommendations
- Tags increase discoverability — use relevant hashtags
- Daily post limit: ~50 posts per day per account
- Single session only: Don't log into the web version elsewhere while MCP is running
- Avoid prohibited words — use third-party tools to check before posting
- Never do引流 (traffic diversion) or pure reposts — Xiaohongshu actively penalizes this
Security & Privacy
- Local credentials: Cookies and Bearer tokens stored locally in
auth.json— never committed to Git - Session-based: Uses the user's own authenticated web session
- No unofficial APIs: Interacts through the official web interface
- Rate limit aware: Web APIs have natural rate limits; not suitable for high-frequency bulk operations
- Proxy support:
XHS_PROXYenvironment variable for HTTP/HTTPS/SOCKS5 proxies
Xiaohongshu MCP vs Alternatives
This is an MCP server for social media automation. Here's how it compares:
| Feature | Xiaohongshu MCP | OpenTweet MCP | Ayrshare MCP | Postiz MCP | Xpoz MCP |
|---|---|---|---|---|---|
| Stars | 11.2K | 1K+ | N/A (SaaS) | 2K+ | N/A (SaaS) |
| Platform | Xiaohongshu | Twitter/X | 13+ platforms | Multi-platform | Multi-platform |
| Publishing | ✅ Image+Video | ✅ Tweets | ✅ All formats | ✅ Scheduling | ❌ Read-only |
| Search | ✅ Advanced filters | ✅ Basic | ❌ | ❌ | ✅ Intelligence |
| Comments | ✅ Post+Reply | ❌ | ❌ | ❌ | ❌ |
| Like/Bookmark | ✅ Smart toggle | ❌ | ❌ | ❌ | ❌ |
| User Profiles | ✅ Full data | ❌ | ❌ | ❌ | ✅ |
| Self-hosted | ✅ Go/Docker | ✅ | ❌ SaaS | ✅ | ❌ SaaS |
| Open Source | ✅ | ✅ | ❌ | ✅ | ❌ |
| Chinese Platform | ✅ Native | ❌ | ❌ | ❌ | ❌ |
When to Choose Each
- Xiaohongshu MCP: The only option for Xiaohongshu automation. Unmatched engagement features (comments, likes, bookmarks) and deep Chinese platform integration.
- OpenTweet MCP: Best for Twitter/X-focused automation with scheduling and analytics.
- Ayrshare MCP: Best for enterprises needing a single SaaS to post across 13+ Western platforms.
- Postiz MCP: Best open-source alternative for multi-platform scheduling (Western platforms).
- Xpoz MCP: Best for social media intelligence and research across Twitter, Instagram, TikTok, Reddit.
Frequently Asked Questions
Will my account get banned?
The author reports over 1 year of stable operation with no bans. New accounts without identity verification may trigger verification prompts (standard behavior, not a ban).
Which AI client should I use?
Claude Code provides the best experience for automated operations. Claude Desktop and Cursor are also fully supported.
How do I handle cookie expiration?
Sessions expire periodically. Use delete_cookies to clear the session, then re-login via QR code.
Can I use this in production?
Yes. The author runs it in production. Use Docker for the most stable deployment. Respect Xiaohongshu's daily post limits (~50/day).
Conclusion
Xiaohongshu MCP is the most comprehensive social media MCP server available on GitHub. With 11,200+ stars, 90 releases, and a feature set that covers the full lifecycle of content operations — publishing, discovery, engagement, and user intelligence — it sets the standard for what AI-powered social media management can look like.
For anyone operating on Xiaohongshu — whether managing a personal brand, running an e-commerce storefront, or producing content at scale — this tool transforms your AI assistant into a full-featured social media operations platform.
