MCP for RedNote (Xiaohongshu) platform.
If you encounter any issues, be sure to check Common Issues and Solutions first.
After checking the Common Issues list, if you still can't resolve your deployment problems, we strongly recommend using another tool I've created: xpzouying/x-mcp. This tool doesn't require deployment - you only need a browser extension to drive your MCP, making it more user-friendly for non-technical users.
All donations received for this project will be used for charitable giving. For all charitable donation records, please refer to DONATIONS.md.
When donating, please note "MCP" and your name. If you need to correct/withdraw your name attribution, please open an Issue or contact via email.
Alipay (QR code not displayed):
Donate via Alipay to xpzouying@gmail.com.
WeChat:
Main Features
💡 Tip: Click on the feature titles below to expand and view video demonstrations
The first step is required - RedNote needs to be logged in. You can check current login status.
Login Demo:
https://github.com/user-attachments/assets/8b05eb42-d437-41b7-9235-e2143f19e8b7
Check Login Status Demo:
https://github.com/user-attachments/assets/bd9a9a4a-58cb-4421-b8f3-015f703ce1f9
Supports publishing image and text content to RedNote, including title, content description, and images.
Image Support Methods:
Supports two image input methods:
HTTP/HTTPS Image Links
["https://example.com/image1.jpg", "https://example.com/image2.png"]
Local Image Absolute Paths (Recommended)
["/Users/username/Pictures/image1.jpg", "/home/user/images/image2.png"]
Why Local Paths are Recommended:
Publish Image-Text Post Demo:
https://github.com/user-attachments/assets/8aee0814-eb96-40af-b871-e66e6bbb6b06
Supports publishing video content to RedNote, including title, content description, and local video files.
Video Support Methods:
Only supports local video file absolute paths:
"/Users/username/Videos/video.mp4"
Features:
Important Notes:
Search RedNote content by keywords.
Search Posts Demo:
https://github.com/user-attachments/assets/03c5077d-6160-4b18-b629-2e40933a1fd3
Get RedNote homepage recommendation content list.
Get Recommendation List Demo:
https://github.com/user-attachments/assets/110fc15d-46f2-4cca-bdad-9de5b5b8cc28
Get complete details of RedNote posts, including:
⚠️ Important Note:
Get Post Details Demo:
https://github.com/user-attachments/assets/76a26130-a216-4371-a6b3-937b8fda092a
Supports automatically posting comments to RedNote posts.
Feature Description:
⚠️ Important Note:
Post Comment Demo:
https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
Get RedNote user's personal profile information, including basic user information and note content.
Feature Description:
⚠️ Important Note:
Returned Information Includes:
RedNote Basic Operation Knowledge
Risk Explanation
This project is for learning purposes only. All illegal activities are prohibited.
Practical Results
First day likes/favorites reached 999+,
Results after about a week
Method 1: Download Pre-compiled Binaries
Download pre-compiled binaries for your platform directly from GitHub Releases:
Main Program (MCP Service):
xiaohongshu-mcp-darwin-arm64xiaohongshu-mcp-darwin-amd64xiaohongshu-mcp-windows-amd64.exexiaohongshu-mcp-linux-amd64Login Tool:
xiaohongshu-login-darwin-arm64xiaohongshu-login-darwin-amd64xiaohongshu-login-windows-amd64.exexiaohongshu-login-linux-amd64Usage Steps:
# 1. First run the login tool
chmod +x xiaohongshu-login-darwin-arm64
./xiaohongshu-login-darwin-arm64
# 2. Then start the MCP service
chmod +x xiaohongshu-mcp-darwin-arm64
./xiaohongshu-mcp-darwin-arm64
⚠️ Important Note: The headless browser will be automatically downloaded on first run (about 150MB), please ensure a stable network connection. Subsequent runs will not require re-downloading.
Method 2: Build from Source
Requires Golang environment. For installation instructions, please refer to Golang Official Documentation.
Set Go domestic proxy source:
# Configure GOPROXY environment variable, choose one of the following three
# 1. Qiniu CDN
go env -w GOPROXY=https://goproxy.cn,direct
# 2. Alibaba Cloud
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
# 3. Official
go env -w GOPROXY=https://goproxy.io,direct
Method 3: Using Docker Container (Simplest)
Using Docker deployment is the simplest method, requiring no development environment installation.
1. Pull Image from Docker Hub (Recommended)
We provide pre-built Docker images that can be directly pulled from Docker Hub:
# Pull the latest image
docker pull xpzouying/xiaohongshu-mcp
Docker Hub URL: https://hub.docker.com/r/xpzouying/xiaohongshu-mcp
2. Start with Docker Compose (Recommended)
We provide a pre-configured docker-compose.yml file that can be used directly:
# Download docker-compose.yml
wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
# Or if you've already cloned the project, enter the docker directory
cd docker
# Start service
docker compose up -d
# View logs
docker compose logs -f
# Stop service
docker compose stop
3. Build Image Yourself (Optional)
If you need to customize or modify the code, you can build the image yourself:
# Run in project root directory
docker build -t xpzouying/xiaohongshu-mcp .
4. Configuration Notes
The Docker version automatically:
./data for storing cookies./images for storing publish imagesFor detailed instructions, please refer to: Docker Deployment Guide
For Windows issues, check here first: Windows Installation Guide
First time requires manual login to save RedNote login status.
Using Binary Files:
# Run the login tool for your platform
./xiaohongshu-login-darwin-arm64
Using Source Code:
go run cmd/login/main.go
Start xiaohongshu-mcp service.
Using Binary Files:
# Default: Headless mode, no browser interface
./xiaohongshu-mcp-darwin-arm64
# Non-headless mode, with browser interface
./xiaohongshu-mcp-darwin-arm64 -headless=false
Using Source Code:
# Default: Headless mode, no browser interface
go run .
# Non-headless mode, with browser interface
go run . -headless=false
npx @modelcontextprotocol/inspector

After running, open the red-marked link, configure MCP inspector, enter http://localhost:18060/mcp, and click the Connect button.

After configuring MCP inspector as above, click the List Tools button to view all Tools.

The example uses a random image from https://unsplash.com/ for testing.

Use search functionality to search RedNote content by keywords:

This service supports the standard Model Context Protocol (MCP) and can integrate with various AI clients that support MCP.
# Start service (default headless mode)
go run .
# Or with interface mode
go run . -headless=false
Service will run at: http://localhost:18060/mcp
# Test MCP connection
curl -X POST http://localhost:18060/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}'
# Add HTTP MCP server
claude mcp add --transport http xiaohongshu-mcp http://localhost:18060/mcp
Official command line tool, already shown in the quick start section above:
# Add HTTP MCP server
claude mcp add --transport http xiaohongshu-mcp http://localhost:18060/mcp
Create or edit MCP configuration file:
Project-level configuration (recommended):
Create .cursor/mcp.json in project root directory:
{
"mcpServers": {
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"description": "RedNote content publishing service - MCP Streamable HTTP"
}
}
}
Global configuration:
Create ~/.cursor/mcp.json in user directory (same content).
Demo
Plugin MCP integration:

Call MCP tools: (using check login status as example)

Ctrl/Cmd + Shift + P to open command paletteMCP: Add Server commandHTTP method.http://localhost:18060/mcp, or modify to corresponding Server address.xiaohongshu-mcp.Workspace configuration (recommended):
Create .vscode/mcp.json in project root directory:
{
"servers": {
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"type": "http"
}
},
"inputs": []
}
View Configuration:

tools are correctly detected.Demo
Using search post content as example:

Configure in ~/.gemini/settings.json or project directory .gemini/settings.json:
{
"mcpServers": {
"xiaohongshu": {
"httpUrl": "http://localhost:18060/mcp",
"timeout": 30000
}
}
}
For more information, please refer to Gemini CLI MCP Documentation
Debug tool for testing MCP connections:
# Start MCP Inspector
npx @modelcontextprotocol/inspector
# Connect in browser to: http://localhost:18060/mcp
Usage steps:
Cline is a powerful AI programming assistant that supports MCP protocol integration.
Add the following configuration to Cline's MCP settings:
{
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"type": "streamableHttp",
"autoApprove": [],
"disabled": false
}
}
http://localhost:18060/mcp)url: MCP service addresstype: Use streamableHttp type for better performanceautoApprove: Configurable auto-approve tool list (empty means manual approval)disabled: Set to false to enable this MCP serviceAfter configuration, you can use natural language to operate RedNote directly in Cline:
Help me check RedNote login status
Help me publish a spring-themed image-text post to RedNote, using this image: /path/to/spring.jpg
Search for content about "food" on RedNote
Any client supporting HTTP MCP protocol can connect to: http://localhost:18060/mcp
Basic configuration template:
{
"name": "xiaohongshu-mcp",
"url": "http://localhost:18060/mcp",
"type": "http"
}
After successful connection, you can use the following MCP tools:
check_login_status - Check RedNote login status (no parameters)publish_content - Publish image-text content to RedNote (required: title, content, images)
images: Supports HTTP links or local absolute paths, local paths recommendedpublish_with_video - Publish video content to RedNote (required: title, content, video)
video: Only supports local video file absolute pathslist_feeds - Get RedNote homepage recommendation list (no parameters)search_feeds - Search RedNote content (required: keyword)get_feed_detail - Get post details (required: feed_id, xsec_token)post_comment_to_feed - Post comments to RedNote posts (required: feed_id, xsec_token, content)user_profile - Get user profile information (required: user_id, xsec_token)Using Claude Code to publish content to RedNote:
Example 1: Using HTTP Image Links
Help me write a post to publish on RedNote, with image: https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840 The image is: "Maori rock carving at Ngātoroirangi Mine Bay, Lake Taupo, New Zealand (© Joppi/Getty Images)" Use xiaohongshu-mcp for publishing.
Example 2: Using Local Image Paths (Recommended)
Help me write a post about spring to publish on RedNote, using these local images: - /Users/username/Pictures/spring_flowers.jpg - /Users/username/Pictures/cherry_blossom.jpg Use xiaohongshu-mcp for publishing.
Example 3: Publishing Video Content
Help me write a video post about cooking tutorials to publish on RedNote, using this local video file: - /Users/username/Videos/cooking_tutorial.mp4 Use xiaohongshu-mcp's video publishing feature.

Publishing Result:
💡 Highly Recommended: These are real-world use cases from community contributors, featuring detailed configuration steps and practical experiences!
🎯 Tip: Click the links above to view detailed step-by-step tutorials for quick setup of various integration solutions!
📢 Contributions Welcome: If you have new integration cases, feel free to submit a PR to share with the community!
Important: Before asking questions in the group, please make sure to read the README documentation thoroughly and check Issues first.
| 【Feishu Group 3】: Scan to join | 【WeChat Group 10】: Scan to join |
|---|---|
Thanks to all friends who have contributed to this project! (In no particular order)
zy 💻 🤔 📖 🎨 🚧 🚇 👀 | clearwater 💻 | Zhongpeng 💻 | Duong Tran 💻 | Angiin 💻 | Henan Mu 💻 | Journey 💻 |
Eve Yu 💻 | CooperGuo 💻 | Banghao Chi 💻 | varz1 💻 | Melo Y Guan 💻 | lmxdawn 💻 | haikow 💻 |
Carlo 💻 | hrz 💻 | Ctrlz 💻 |
| Contributors |
|---|
@wanpengxie |
This project follows the all-contributors specification. Contributions of any kind welcome!