Xiaohongshu (RedBook)
Enables automated interaction with Xiaohongshu (Little Red Book) platform including searching posts, retrieving content and comments, and posting AI-generated comments with persistent login support.
What is Xiaohongshu (RedBook)?
Xiaohongshu (RedBook) is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables automated interaction with xiaohongshu (little red book) platform including searching posts, retrieving content and comments, and posting ai-generated comments with persistent login support.
Enables automated interaction with Xiaohongshu (Little Red Book) platform including searching posts, retrieving content and comments, and posting AI-generated comments with persistent login support.
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables automated interaction with Xiaohongshu (Little Red B
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx xiaohongshu-redbook-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Xiaohongshu (RedBook)
The Xiaohongshu (RedBook) MCP Server automates interaction with the Xiaohongshu (Little Red Book) social media platform — one of China's most influential lifestyle and discovery apps — directly from an AI assistant. It supports QR-code-based login with persistent session storage, keyword-based note search, full content and comment retrieval, and AI-assisted comment generation and posting with four tone styles (traffic-driving, engagement, consultative, and authority). Social media managers, marketers, and brands targeting Chinese audiences use it to research trending content, analyse competitor notes, and publish context-aware comments at scale.
Prerequisites
- Python 3.10 or later
- A Xiaohongshu (Little Red Book) account with mobile app access for QR code login
- Playwright browser automation library installed ('pip install playwright' and 'playwright install')
- fastmcp library installed ('pip install fastmcp')
- An MCP-compatible client such as Claude Desktop configured to launch the Python script
Clone the repository and set up the environment
Clone the project, create a Python virtual environment, and activate it. Using a virtual environment is essential because the MCP client config must reference the interpreter inside it.
git clone https://github.com/chenningling/Redbook-Search-Comment-MCP2.0.git
cd Redbook-Search-Comment-MCP2.0
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # WindowsInstall dependencies and Playwright browsers
Install all Python dependencies from requirements.txt, then install the Playwright browser binaries that the server uses to drive the Xiaohongshu web interface.
pip install -r requirements.txt
pip install fastmcp
playwright installConfigure Claude Desktop
Add the server to claude_desktop_config.json using the absolute path to the Python interpreter inside your virtual environment and the absolute path to the main script. On Windows, escape backslashes and use 'python.exe'.
{
"mcpServers": {
"xiaohongshu": {
"command": "/absolute/path/to/venv/bin/python3",
"args": ["/absolute/path/to/Redbook-Search-Comment-MCP2.0/xiaohongshu_mcp.py"]
}
}
}Log in via QR code on first run
When the server starts for the first time, call the mcp0_login tool. A browser window will open displaying a Xiaohongshu QR code. Scan it with the Xiaohongshu mobile app. The session is persisted to disk so you do not need to repeat this step on subsequent runs.
Search notes and retrieve content
Use mcp0_search_notes to find posts by keyword and mcp0_get_note_content to read the full text, author, and timestamp of individual notes. Pass the note URL obtained from search results to the content and comment tools.
Generate and post comments
Call mcp0_post_smart_comment with a note URL and a comment_type (引流 for traffic, 点赞 for engagement, 咨询 for consultative, or 专业 for authority) to get an AI-analysed recommendation. Then call mcp0_post_comment with the final comment text to publish it.
Xiaohongshu (RedBook) Examples
Client configuration
Claude Desktop configuration using the absolute path to the venv Python interpreter. Replace the example paths with your actual absolute paths.
{
"mcpServers": {
"xiaohongshu": {
"command": "/Users/yourname/Redbook-Search-Comment-MCP2.0/venv/bin/python3",
"args": ["/Users/yourname/Redbook-Search-Comment-MCP2.0/xiaohongshu_mcp.py"]
}
}
}Prompts to try
Natural language prompts for searching content and managing comments on Xiaohongshu.
- "登录小红书 (Log in to Xiaohongshu)"
- "搜索小红书笔记,关键词:护肤 (Search Xiaohongshu notes with keyword: skincare)"
- "获取这篇笔记的内容和评论:[URL]"
- "为这篇笔记生成一条专业类型的评论:[URL]"
- "Search Xiaohongshu for travel notes about Chengdu and summarise the top 5 results"Troubleshooting Xiaohongshu (RedBook)
MCP server fails to start with 'python not found' or module import errors
The claude_desktop_config.json must reference the Python interpreter inside the virtual environment (e.g. /path/to/venv/bin/python3), not the system Python. Activate the venv and run 'which python3' to get the correct absolute path.
QR code login fails or the browser window does not open
Run 'playwright install' inside the active virtual environment to ensure the browser binaries are present. If a browser window opens but QR code scanning fails, make sure the Xiaohongshu mobile app is updated and try scanning within 60 seconds of the QR code appearing.
Comment posting fails or session is rejected
The saved session may have expired. Call mcp0_login again to re-authenticate and refresh the session. Xiaohongshu may also rate-limit rapid comment posting; add a delay between posting actions.
Frequently Asked Questions about Xiaohongshu (RedBook)
What is Xiaohongshu (RedBook)?
Xiaohongshu (RedBook) is a Model Context Protocol (MCP) server that enables automated interaction with xiaohongshu (little red book) platform including searching posts, retrieving content and comments, and posting ai-generated comments with persistent login support. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Xiaohongshu (RedBook)?
Follow the installation instructions on the Xiaohongshu (RedBook) GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Xiaohongshu (RedBook)?
Xiaohongshu (RedBook) works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Xiaohongshu (RedBook) free to use?
Yes, Xiaohongshu (RedBook) is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Xiaohongshu (RedBook) Alternatives — Similar Communication Servers
Looking for alternatives to Xiaohongshu (RedBook)? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
Browse More Communication MCP Servers
Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Xiaohongshu (RedBook) in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Xiaohongshu (RedBook)?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.