Xiaohongshu (RedBook)

v1.0.0Communicationstable

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.

xiaohongshu-redbook-mcp-servermcpai-integration
Share:
423
Stars
0
Downloads
0
Weekly
0/5

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

Search and retrieve Xiaohongshu posts and content automatically.
Post AI-generated comments with persistent login support.
chenningling

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx xiaohongshu-redbook-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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    # Windows
2

Install 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 install
3

Configure 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"]
    }
  }
}
4

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.

5

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.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "xiaohongshu-redbook-mcp-server": { "command": "npx", "args": ["-y", "xiaohongshu-redbook-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides