# xiaohongshu-mcp
[](#contributors-)
MCP for RedNote (Xiaohongshu) platform.
- My blog article: [haha.ai/xiaohongshu-mcp](https://www.haha.ai/xiaohongshu-mcp)
## Star History
[](https://www.star-history.com/#xpzouying/xiaohongshu-mcp&Timeline)
**Main Features**
> 💡 **Tip:** Click on the feature titles below to expand and view video demonstrations
1. Login and Check Login Status
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
2. Publish Image and Text Content
Supports publishing image and text content to RedNote, including title, content description, and images. More publishing features will be supported later.
**Image Support Methods:**
Supports two image input methods:
1. **HTTP/HTTPS Image Links**
```
["https://example.com/image1.jpg", "https://example.com/image2.png"]
```
2. **Local Image Absolute Paths** (Recommended)
```
["/Users/username/Pictures/image1.jpg", "/home/user/images/image2.png"]
```
**Why Local Paths are Recommended:**
- ✅ Better stability, not dependent on network
- ✅ Faster upload speed
- ✅ Avoid image link expiration issues
- ✅ Support more image formats
**Publish Image-Text Post Demo:**
https://github.com/user-attachments/assets/8aee0814-eb96-40af-b871-e66e6bbb6b06
3. Search Content
Search RedNote content by keywords.
**Search Posts Demo:**
https://github.com/user-attachments/assets/03c5077d-6160-4b18-b629-2e40933a1fd3
4. Get Recommendation List
Get RedNote homepage recommendation content list.
**Get Recommendation List Demo:**
https://github.com/user-attachments/assets/110fc15d-46f2-4cca-bdad-9de5b5b8cc28
5. Get Post Details (Including Interaction Data and Comments)
Get complete details of RedNote posts, including:
- Post content (title, description, images, etc.)
- User information
- Interaction data (likes, favorites, shares, comment count)
- Comment list and sub-comments
**⚠️ Important Note:**
- Both post ID and xsec_token are required (both parameters are essential)
- These two parameters can be obtained from Feed list or search results
- Must login first to use this feature
**Get Post Details Demo:**
https://github.com/user-attachments/assets/76a26130-a216-4371-a6b3-937b8fda092a
6. Post Comments to Posts
Supports automatically posting comments to RedNote posts.
**Feature Description:**
- Automatically locate comment input box
- Input comment content and publish
- Supports HTTP API and MCP tool calls
**⚠️ Important Note:**
- Must login first to use this feature
- Need to provide post ID, xsec_token, and comment content
- These parameters can be obtained from Feed list or search results
**Post Comment Demo:**
https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
7. Get User Profile
Get RedNote user's personal profile information, including basic user information and note content.
**Feature Description:**
- Get user basic information (nickname, bio, avatar, etc.)
- Get follower count, following count, likes count statistics
- Get user's published note content list
- Supports HTTP API and MCP tool calls
**⚠️ Important Note:**
- Must login first to use this feature
- Need to provide user ID and xsec_token
- These parameters can be obtained from Feed list or search results
**Returned Information Includes:**
- User basic info: nickname, bio, avatar, verification status
- Statistics: following count, follower count, likes count, note count
- Note list: all public notes published by the user
Results after about a week
## 1. Usage Tutorial
### 1.1. Quick Start (Recommended)
**Method 1: Download Pre-compiled Binaries**
Download pre-compiled binaries for your platform directly from [GitHub Releases](https://github.com/xpzouying/xiaohongshu-mcp/releases):
**Main Program (MCP Service):**
- **macOS Apple Silicon**: `xiaohongshu-mcp-darwin-arm64`
- **macOS Intel**: `xiaohongshu-mcp-darwin-amd64`
- **Windows x64**: `xiaohongshu-mcp-windows-amd64.exe`
- **Linux x64**: `xiaohongshu-mcp-linux-amd64`
**Login Tool:**
- **macOS Apple Silicon**: `xiaohongshu-login-darwin-arm64`
- **macOS Intel**: `xiaohongshu-login-darwin-amd64`
- **Windows x64**: `xiaohongshu-login-windows-amd64.exe`
- **Linux x64**: `xiaohongshu-login-linux-amd64`
Usage Steps:
```bash
# 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**
Build from Source Details
Requires Golang environment. For installation instructions, please refer to [Golang Official Documentation](https://go.dev/doc/install).
Set Go domestic proxy source:
```bash
# 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
```
Docker Deployment Details
Using Docker deployment is the simplest method, requiring no development environment installation.
**1. Build Image**
```bash
# Run in project root directory
docker build -t xpzouying/xiaohongshu-mcp .
```
**2. Start with Docker Compose**
```bash
# Enter docker directory
cd docker
# Start service
docker compose up -d
# View logs
docker compose logs -f
# Stop service
docker compose stop
```
**3. Configuration Notes**
The Docker version automatically:
- Configures Chrome browser and Chinese fonts
- Mounts `./data` for storing cookies
- Mounts `./images` for storing publish images
- Exposes port 18060 for MCP connection
For detailed instructions, please refer to: [Docker Deployment Guide](./docker/README.md)
Claude Code CLI
Official command line tool, already shown in the quick start section above:
```bash
# Add HTTP MCP server
claude mcp add --transport http xiaohongshu-mcp http://localhost:18060/mcp
```
Cursor
#### Configuration File Method
Create or edit MCP configuration file:
**Project-level configuration** (recommended):
Create `.cursor/mcp.json` in project root directory:
```json
{
"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).
#### Usage Steps
1. Ensure RedNote MCP service is running
2. Save configuration file and restart Cursor
3. In Cursor chat, tools should be automatically available
4. You can view connected MCP tools through "Available Tools" in the chat interface
**Demo**
Plugin MCP integration:

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

VSCode
#### Method 1: Configure using Command Palette
1. Press `Ctrl/Cmd + Shift + P` to open command palette
2. Run `MCP: Add Server` command
3. Select `HTTP` method.
4. Enter address: `http://localhost:18060/mcp`, or modify to corresponding Server address.
5. Enter MCP name: `xiaohongshu-mcp`.
#### Method 2: Direct Configuration File Edit
**Workspace configuration** (recommended):
Create `.vscode/mcp.json` in project root directory:
```json
{
"servers": {
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"type": "http"
}
},
"inputs": []
}
```
**View Configuration**:

1. Confirm running status.
2. Check if `tools` are correctly detected.
**Demo**
Using search post content as example:

Google Gemini CLI
Configure in `~/.gemini/settings.json` or project directory `.gemini/settings.json`:
```json
{
"mcpServers": {
"xiaohongshu": {
"httpUrl": "http://localhost:18060/mcp",
"timeout": 30000
}
}
}
```
For more information, please refer to [Gemini CLI MCP Documentation](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html)
MCP Inspector
Debug tool for testing MCP connections:
```bash
# Start MCP Inspector
npx @modelcontextprotocol/inspector
# Connect in browser to: http://localhost:18060/mcp
```
Usage steps:
- Use MCP Inspector to test connection
- Test Ping Server functionality to verify connection
- Check if List Tools returns 6 tools
Cline
Cline is a powerful AI programming assistant that supports MCP protocol integration.
#### Configuration Method
Add the following configuration to Cline's MCP settings:
```json
{
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"type": "streamableHttp",
"autoApprove": [],
"disabled": false
}
}
```
#### Usage Steps
1. Ensure RedNote MCP service is running (`http://localhost:18060/mcp`)
2. Open MCP settings in Cline
3. Add the above configuration to the MCP server list
4. Save configuration and restart Cline
5. You can directly use RedNote-related features in conversations
#### Configuration Explanation
- `url`: MCP service address
- `type`: Use `streamableHttp` type for better performance
- `autoApprove`: Configurable auto-approve tool list (empty means manual approval)
- `disabled`: Set to `false` to enable this MCP service
#### Usage Examples
After 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
```
Other HTTP MCP Supporting Clients
Any client supporting HTTP MCP protocol can connect to: `http://localhost:18060/mcp`
Basic configuration template:
```json
{
"name": "xiaohongshu-mcp",
"url": "http://localhost:18060/mcp",
"type": "http"
}
```
## 3. 🌟 Community Showcases
> 💡 **Highly Recommended**: These are real-world use cases from community contributors, featuring detailed configuration steps and practical experiences!
### 📚 Complete Tutorial List
1. **[n8n Complete Integration Tutorial](./examples/n8n/README.md)** - Workflow automation platform integration
2. **[Cherry Studio Complete Configuration Tutorial](./examples/cherrystudio/README.md)** - Perfect AI client integration
> 🎯 **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!
## 4. RedNote MCP Community Group
Since the project has just started, there will be many issues. Let's create a group to discuss problems together and contribute to the open source project. ~~Scan my WeChat QR code to join the technical discussion group~~.
Due to too many people adding WeChat, WeChat banned my account for being "in an unsafe network environment." (Not sure if it's because of too many people, possibly triggering WeChat's telecom fraud safety detection. Tried: 1. Real-name verification; 2. Bank card binding; 3. Manual appeal; none worked.)
Switched to Feishu group, scan QR code to join directly
【Feishu Group 1】Full

【WeChat Group 1】Full
【WeChat Group 2】Full
|
|
## 🙏 Thanks to Contributors ✨
Thanks to all friends who have contributed to this project! (In no particular order)
zy 💻 🤔 📖 🎨 🚧 🚇 👀 |
clearwater 💻 |
Zhongpeng 💻 |
Duong Tran 💻 |
Angiin 💻 |
Henan Mu 💻 |