Content
# Xiaohongshu MCP
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[](./DONATIONS.md)
[](./DONATIONS.md)
[](https://hub.docker.com/r/xpzouying/xiaohongshu-mcp)
MCP for Xiaohongshu / xiaohongshu.com. Let your AI assistant access Xiaohongshu data directly.
### 🚀 Quick Start: Choose Your Best Option
> [!IMPORTANT]
> #### 🔥 Option A: Openclaw Deep Integration (Recommended for Developers)
> - **Openclaw is very popular 🔥🔥🔥 , and we have added Openclaw support in two ways, please choose according to your needs:**
> - [xiaohongshu-mcp-skills](https://github.com/autoclaw-cc/xiaohongshu-mcp-skills)(For users who have already deployed this project)
> - [xiaohongshu-skills](https://github.com/autoclaw-cc/xiaohongshu-skills)(Ready-to-use version)
> [!TIP]
> #### ✨ Option B: x-mcp Browser Plugin (Recommended for Non-Tech Users / Minimalist Users)
> - **No need to bother with Docker or deployment environment? Try: [xpzouying/x-mcp](https://github.com/xpzouying/x-mcp)**
> - **Zero configuration**: Install and use, no code, proxy or complex environment configuration required.
> - **Safe and stable**: Run directly in the commonly used browser (Chrome/Edge) and local network, no server IP risk, and can solve 90% of deployment errors.
### 📖 Related Resources
- **My blog post**: [haha.ai/xiaohongshu-mcp](https://www.haha.ai/xiaohongshu-mcp)
- **Contribution Guide**: [Contributing Guide](./CONTRIBUTING.md)
### 🛠️ Troubleshooting
If you encounter problems when deploying the traditional Docker version, **please make sure to check: [Various troubleshooting (Issues #56)](https://github.com/xpzouying/xiaohongshu-mcp/issues/56)**.
> *Hint: If environment troubleshooting is too time-consuming, switching to [x-mcp plugin version](https://github.com/xpzouying/x-mcp) is usually a more efficient choice.*
## Star History
[](https://www.star-history.com/#xpzouying/xiaohongshu-mcp&Timeline)
## Donations
All donations from this project will be used for charitable donations. For all charitable donation records, please refer to [DONATIONS.md](./DONATIONS.md).
**When donating, please note MCP and your name.**
If you need to correct or withdraw your name, please open an issue or contact us via email.
**Alipay (no QR code displayed):**
Donate to **xpzouying@gmail.com** via Alipay.
**WeChat:**
<img src="donate/wechat@2x.png" alt="WeChat Pay QR" width="260" />
## Project Overview
**Main Features**
> 💡 **Tip:** Click on the feature title below to expand and view the video demo
<details>
<summary><b>1. Login and Check Login Status</b></summary>
The first step is necessary, and Xiaohongshu requires login. You can check the 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
</details>
<details>
<summary><b>2. Publish Graphic Content</b></summary>
Supports publishing graphic content to Xiaohongshu, including title, content description, and images.
**Image Support Methods:**
Supports two image input methods:
1. **HTTP/HTTPS Image Link**
```
["https://example.com/image1.jpg", "https://example.com/image2.png"]
```
2. **Local Image Absolute Path** (Recommended)
```
["/Users/username/Pictures/image1.jpg", "/home/user/images/image2.png"]
```
**Why Local Path is Recommended:**
- ✅ Better stability, no dependency on the network
- ✅ Faster upload speed
- ✅ Avoid image link expiration issues
- ✅ Supports more image formats
**Publish Graphic Post Demo:**
https://github.com/user-attachments/assets/8aee0814-eb96-40af-b871-e66e6bbb6b06
</details>
<details>
<summary><b>3. Publish Video Content</b></summary>
Supports publishing video content to Xiaohongshu, including title, content description, and local video files.
**Video Support Methods:**
Only supports local video file absolute path:
```
"/Users/username/Videos/video.mp4"
```
**Feature Characteristics:**
- ✅ Supports local video file upload
- ✅ Automatic video format conversion
- ✅ Supports title, content description, and tags
- ✅ Automatically publishes after video processing is complete
**Precautions:**
- Only supports local video files, not HTTP links
- Video processing takes longer, please be patient
- It is recommended that the video file size does not exceed 1GB
</details>
<details>
<summary><b>4. Search Content</b></summary>
Searches Xiaohongshu content based on keywords.
**Search Post Demo:**
https://github.com/user-attachments/assets/03c5077d-6160-4b18-b629-2e40933a1fd3
</details>
<details>
<summary><b>5. Get Recommended List</b></summary>
Gets the Xiaohongshu homepage recommended content list.
**Get Recommended List Demo:**
https://github.com/user-attachments/assets/110fc15d-46f2-4cca-bdad-9de5b5b8cc28
</details>
<details>
<summary><b>6. Get Post Details (Including Interaction Data and Comments)</b></summary>
Gets the complete details of a Xiaohongshu post, including:
- Post content (title, description, images, etc.)
- User information
- Interaction data (likes, favorites, shares, comments)
- Comment list and sub-comments
**⚠️ Important Tip:**
- Needs to provide post ID and xsec_token (both parameters are required)
- These two parameters can be obtained from the Feed list or search results
- Must log in first to use this feature
**Get Post Details Demo:**
https://github.com/user-attachments/assets/76a26130-a216-4371-a6b3-937b8fda092a
</details>
<details>
<summary><b>7. Publish Comments to Posts</b></summary>
Supports automatically publishing comments to Xiaohongshu posts.
**Feature Description:**
- Automatically positions the comment input box
- Inputs comment content and publishes
- Supports HTTP API and MCP tool calls
**⚠️ Important Tip:**
- Needs to log in first to use this feature
- Needs to provide post ID, xsec_token, and comment content
- These parameters can be obtained from the Feed list or search results
**Publish Comment Demo:**
https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
</details>
<details>
<summary><b>8. Get User Personal Homepage</b></summary>
Gets a Xiaohongshu user's personal homepage information, including user basic information and note content.
**Feature Description:**
- Gets user basic information (nickname, introduction, avatar, etc.)
- Gets follow, fan, and like counts
- Gets the user's published note content list
- Supports HTTP API and MCP tool calls
**⚠️ Important Tip:**
- Needs to log in first to use this feature
- Needs to provide user ID and xsec_token
- These parameters can be obtained from the Feed list or search results
**Returned Information Includes:**
- User basic information: nickname, introduction, avatar, certification status
- Statistical data: follow, fan, like, and note counts
- Note list: all publicly published notes by the user
</details>
<details>
<summary><b>9. Reply to Comments</b></summary>
Replies to specified comments under notes, supporting precise replies to specific user comments.
**Feature Description:**
- Replies to specific comments under specified notes
- Supports locating target comments through comment ID or user ID
- Needs to provide feed_id, xsec_token, comment_id/user_id, and reply content
**⚠️ Important Tip:**
- Needs to log in first to use this feature
- At least one of comment_id and user_id is required
- These parameters can be obtained from the comment list in post details
</details>
<details>
<summary><b>10. Like/Unlike</b></summary>
Likes or unlikes notes, intelligently detecting current status to avoid duplicate operations.
**Feature Description:**
- Likes or unlikes specified notes
- Intelligent detection: skips liking if already liked, skips unliking if not liked
- Needs to provide feed_id and xsec_token
**⚠️ Important Tip:**
- Needs to log in first to use this feature
- Defaults to liking, set unlike=true to unlike
</details>
<details>
<summary><b>11. Favorite/Unfavorite</b></summary>
Favorites or unfavorites notes, intelligently detecting current status to avoid duplicate operations.
**Feature Description:**
- Favorites or unfavorites specified notes
- Intelligent detection: skips favoriting if already favorited, skips unfavoriting if not favorited
- Needs to provide feed_id and xsec_token
**⚠️ Important Tip:**
- Needs to log in first to use this feature
- Defaults to favoriting, set unfavorite=true to unfavorite
</details>
**Xiaohongshu Basic Operation Knowledge**
- **Title: (very important) Xiaohongshu requires titles to be no more than 20 characters**
- **Body: (very important) The body cannot exceed 1000 characters**
- Currently supports graphic and video sending: from a recommended perspective, graphic traffic is better than video and pure text.
- (Low priority) Pure text support can be considered. 1. Personally, pure text will greatly increase operational complexity; 2. The value of pure text in my usage scenarios is low.
- Tags: Currently supported. Adding suitable tags can bring more traffic.
- According to personal practice, the daily posting volume on Xiaohongshu should be **50 posts**.
- **(very important) Xiaohongshu does not allow the same account to log in on multiple web pages**, if you log in with this xiaohongshu-mcp, do not log in on other web pages, otherwise, it will log out the current MCP account. You can use the mobile app to view the current account information.
- If exposure is low, first check if there are any prohibited words in the content, and search for many third-party free tools.
- Do not appear to have drainage, pure forwarding, which is a key target for official strikes.
**Risk Description**
1. This project was open-sourced based on another project, and the original project has been running stably for over a year without any account bans, only requiring re-login due to expired cookies.
2. I used Claude Code to access and verify that it worked stably for several weeks before open-sourcing it.
3. If the account is not verified, especially for new accounts, it will generally trigger a **real-name authentication** reminder (see below). ⚠️ This is not an account ban, and you will not be required to use MCP for real-name authentication. After real-name authentication, the account will be normal. It is recommended to use this project after real-name authentication.
The project is based on learning purposes and prohibits all illegal activities.
**Practical Results**
On the first day, likes and favorites reached 999+,
<img width="386" height="278" alt="CleanShot 2025-09-05 at 01 31 55@2x" src="https://github.com/user-attachments/assets/4b5a283b-bd38-45b8-b608-8f818997366c" />
<img width="350" height="280" alt="CleanShot 2025-09-05 at 01 32 49@2x" src="https://github.com/user-attachments/assets/4481e1e7-3ef6-4bbd-8483-dcee8f77a8f2" />
Results after about a week
<img width="1840" height="582" alt="CleanShot 2025-09-05 at 01 33 13@2x" src="https://github.com/user-attachments/assets/fb367944-dc48-4bbd-8ece-934caa86323e" />
## 1. Usage Tutorial
### 1.1. Quick Start (Recommended)
**Method 1: Download Precompiled Binary Files**
Directly download the corresponding platform's binary files 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. Run the login tool first
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 Tip**: The first run will automatically download the headless browser (about 150MB), please ensure the network connection is normal. Subsequent runs do not require repeated downloads.
**Method 2: Compile from Source**
<details>
<summary>Compile and Install Details</summary>
Depend on the Golang environment, installation methods can refer to the [Golang official documentation](https://go.dev/doc/install).
Set up a domestic proxy for Go,
```bash
# Configure GOPROXY environment variable, choose one of the following
# 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
```
</details>
**Method 3: Use Docker Container (Simplest)**
<details>
<summary>Docker Deployment Details</summary>
Using Docker deployment is the simplest way, no need to install any development environment.
**1. Pull the Image from Docker Hub (Recommended)**
We provide pre-built Docker images, which can be directly pulled from Docker Hub:
```bash
# Pull the latest image
docker pull xpzouying/xiaohongshu-mcp
```
Docker Hub address: [https://hub.docker.com/r/xpzouying/xiaohongshu-mcp](https://hub.docker.com/r/xpzouying/xiaohongshu-mcp)
**2. Use Docker Compose to Start (Recommended)**
We provide a configured `docker-compose.yml` file, which can be directly used:
```bash
# Download docker-compose.yml
wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
# Or if the project has already been cloned, enter the docker directory
cd docker
# Start the service
docker compose up -d
# View logs
docker compose logs -f
# Stop the service
docker compose stop
```
**3. Build Your Own Image (Optional)**
```bash
# Run in the project root directory
docker build -t xpzouying/xiaohongshu-mcp .
```
**4. Configuration Description**
The Docker version will automatically:
- Configure the Chrome browser and Chinese font
- Mount `./data` for storing cookies
- Mount `./images` for storing published images
- Expose port 18060 for MCP connection
For detailed usage instructions, please refer to: [Docker Deployment Guide](./docker/README.md)
</details>
Windows encounter problems, first look here: [Windows Installation Guide](./docs/windows_guide.md)
### 1.2. Login
The first time you need to log in manually, you need to save the Xiaohongshu login state.
**Using Binary Files**:
```bash
# Run the login tool for the corresponding platform
./xiaohongshu-login-darwin-arm64
```
**Using Source Code**:
```bash
go run cmd/login/main.go
```
### 1.3. Start MCP Service
Start the xiaohongshu-mcp service.
**Using Binary File**:
```bash
# 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**:
```bash
# Default: Headless mode, no browser interface
go run .
# Non-headless mode, with browser interface
go run . -headless=false
```
**Configure Proxy (Optional)**:
If you need to access through a proxy, you can set the `XHS_PROXY` environment variable:
```bash
# Start with proxy set
XHS_PROXY=http://user:pass@proxy:port ./xiaohongshu-mcp-darwin-arm64
# Or using source code
XHS_PROXY=http://proxy:port go run .
```
Supports HTTP/HTTPS/SOCKS5 proxies, and proxy authentication information will be automatically hidden in the logs.
## 1.4. Verify MCP
```bash
npx @modelcontextprotocol/inspector
```

After running, open the link marked in red, configure MCP inspector, input `http://localhost:18060/mcp`, and click the `Connect` button.
<img width="915" height="659" alt="bf9532dd0b7ba423491accf511a467de" src="https://github.com/user-attachments/assets/08bc3cef-73e7-42d2-b923-7ba9e6c8af30" />
**Note:** Ensure the options in the left border are correct.
After configuring MCP inspector, click the `List Tools` button to view all tools.
## 1.5. Publish Using MCP
### Check Login Status

### Publish Content with Images
The example uses a random image from https://unsplash.com/ for testing.

### Search Content
Use the search function to search for content on Xiaohongshu based on keywords:

## 2. MCP Client Integration
This service supports the standard Model Context Protocol (MCP) and can integrate with various AI clients that support MCP.
### 2.1. Quick Start
#### Start MCP Service
```bash
# Start service (default headless mode)
go run .
# Or use the GUI mode
go run . -headless=false
```
The service will run at: `http://localhost:18060/mcp`
#### Verify Service Status
```bash
# Test MCP connection
curl -X POST http://localhost:18060/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}'
```
#### Claude Code CLI Integration
```bash
# Add HTTP MCP server
claude mcp add --transport http xiaohongshu-mcp http://localhost:18060/mcp
# Check if MCP is added successfully (ensure MCP is running)
claude mcp list
```
### 2.2. Supported Clients
<details>
<summary><b>Claude Code CLI</b></summary>
Official command-line tool, demonstrated in the quick start section:
```bash
# Add HTTP MCP server
claude mcp add --transport http xiaohongshu-mcp http://localhost:18060/mcp
# Check if MCP is added successfully (ensure MCP is running)
claude mcp list
```
</details>
<details>
<summary><b>Open Code CLI</b></summary>
Use interactive commands to add MCP Server:
```bash
opencode mcp add
```
Example of adding `xiaohongshu-mcp`:
```
┌ Add MCP server
│
◇ Enter MCP server name
│ xiaohongshu-mcp
│
◇ Select MCP server type
│ Remote
│
◇ Enter MCP server URL
│ http://localhost:18060/mcp
│
◇ Does this server require OAuth authentication?
│ No
│
◆ MCP server "xiaohongshu-mcp" added to C:\Users\admin\.config\opencode\opencode.json
│
└ MCP server added successfully
```
Verify if added successfully (ensure MCP is running):
```bash
opencode mcp list
```
```
┌ MCP Servers
│
● ✓ xiaohongshu-mcp connected
```
</details>
<details>
<summary><b>Cursor</b></summary>
#### Configuration File Method
Create or edit the MCP configuration file:
**Project-level configuration** (recommended):
Create `.cursor/mcp.json` in the project root directory:
```json
{
"mcpServers": {
"xiaohongshu-mcp": {
"url": "http://localhost:18060/mcp",
"description": "Xiaohongshu Content Publishing Service - MCP Streamable HTTP"
}
}
}
```
**Global configuration**:
Create `~/.cursor/mcp.json` (with the same content).
#### Steps
1. Ensure the Xiaohongshu MCP service is running
2. Save the configuration file and restart Cursor
3. In the Cursor chat, the tool should be automatically available
4. You can view the connected MCP tools through the chat interface's "Available Tools"
**Demo**
MCP integration plugin:

Calling MCP tool (example: checking login status):

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

1. Confirm the running status
2. View if `tools` are correctly detected
**Demo**
Example of searching for post content:

</details>
<details>
<summary><b>Google Gemini CLI</b></summary>
Configure in `~/.gemini/settings.json` or project directory `.gemini/settings.json`:
```json
{
"mcpServers": {
"xiaohongshu": {
"httpUrl": "http://localhost:18060/mcp",
"timeout": 30000
}
}
}
```
For more information, refer to [Gemini CLI MCP documentation](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html)
</details>
<details>
<summary><b>MCP Inspector</b></summary>
Debugging tool for testing MCP connections:
```bash
# Start MCP Inspector
npx @modelcontextprotocol/inspector
# Connect to http://localhost:18060/mcp in the browser
```
Steps:
- Use MCP Inspector to test connections
- Test Ping Server functionality to verify connections
- Check if List Tools returns 13 tools
</details>
<details>
<summary><b>Cline</b></summary>
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
}
}
```
#### Steps
1. Ensure the Xiaohongshu 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. Directly use Xiaohongshu-related functions in conversations
#### Configuration Description
- `url`: MCP service address
- `type`: Use `streamableHttp` type for better performance
- `autoApprove`: Configurable auto-approval tool list (leave blank for manual approval)
- `disabled`: Set to `false` to enable this MCP service
#### Usage Example
After configuration, you can directly use natural language to operate Xiaohongshu in Cline:
```
Help me check the Xiaohongshu login status
```
```
Help me publish a graphic post about spring on Xiaohongshu, using this image: /path/to/spring.jpg
```
```
Search for content about "food" on Xiaohongshu
```
</details>
<details>
<summary><b>OpenClaw (via MCPorter)</b></summary>
> Before use, ensure xiaohongshu-mcp has completed local deployment. **Do not** directly provide the GitHub link to OpenClaw for deployment.
Since OpenClaw does not natively support MCP, it is recommended to use **MCPorter** to call MCP services.
> 💡 **Tip:** MCPorter is not the best solution for calling MCP, and some compatibility issues may occur during use.
#### Installation and Configuration Steps
Directly provide the following three commands to OpenClaw (can be through Control UI, Telegram, Feishu, etc.), and OpenClaw will deploy MCPorter.
```
npm i -g mcporter
npx mcporter config add xiaohongshu-mcp http://localhost:18060/mcp
npx mcporter list xiaohongshu-mcp
```
After completing the above steps, you can call all functions of xiaohongshu-mcp in OpenClaw.
</details>
<details>
<summary><b>Other Clients Supporting HTTP MCP</b></summary>
Any client supporting the HTTP MCP protocol can connect to: `http://localhost:18060/mcp`
Basic configuration template:
```json
{
"name": "xiaohongshu-mcp",
"url": "http://localhost:18060/mcp",
"type": "http"
}
```
</details>
### 2.3. Available MCP Tools
After successful connection, you can use the following MCP tools:
- `check_login_status` - Check Xiaohongshu login status (no parameters)
- `get_login_qrcode` - Get login QR code, return Base64 image and timeout (no parameters)
- `delete_cookies` - Delete cookies file, reset login status, and delete after re-login (no parameters)
- `publish_content` - Publish graphic content to Xiaohongshu (required: title, content, images)
- `images`: List of image paths (at least 1 image), support HTTP links or local absolute paths, recommend using local paths
- `tags`: List of topic tags (optional), such as `["food", "travel", "life"]`
- `schedule_at`: Scheduled publication time (optional), ISO8601 format, support 1 hour to 14 days
- `is_original`: Whether to declare original (optional), default not declared
- `visibility`: Visible range (optional), support `publicly visible` (default), `only visible to self`, `only visible to mutual followers`
- `products`: List of product keywords (optional), used to bind goods. Fill in the product name or product ID, and the system will automatically search and select the first matching result. The account needs to have opened the goods function. Example: [mask, sunscreen SPF50]
- `publish_with_video` - Publish video content to Xiaohongshu (required: title, content, video)
- `video`: Local video file absolute path (support single video file only)
- `tags`: List of topic tags (optional), such as `["food", "travel", "life"]`
- `schedule_at`: Scheduled publication time (optional), ISO8601 format, support 1 hour to 14 days
- `visibility`: Visible range (optional), support `publicly visible` (default), `only visible to self`, `only visible to mutual followers`
- `products`: List of product keywords (optional), used to bind goods. Fill in the product name or product ID, and the system will automatically search and select the first matching result. The account needs to have opened the goods function. Example: [mask, sunscreen SPF50]
- `list_feeds` - Get Xiaohongshu homepage recommended list (no parameters)
- `search_feeds` - Search Xiaohongshu content (required: keyword)
- `filters`: Screening options (optional)
- `sort_by`: Sorting basis - `comprehensive` (default) | `latest` | `most liked` | `most commented` | `most collected`
- `note_type`: Note type - `unlimited` (default) | `video` | `graphic`
- `publish_time`: Publication time - `unlimited` (default) | `within one day` | `within one week` | `within half a year`
- `search_scope`: Search scope - `unlimited` (default) | `seen` | `unseen` | `followed`
- `location`: Location distance - `unlimited` (default) | `same city` | `nearby`
- `get_feed_detail` - Get post details, including interaction data and comments (required: feed_id, xsec_token)
- `load_all_comments`: Whether to load all comments (optional), default false only returns the first 10 level 1 comments
- `limit`: Limit the number of loaded level 1 comments (optional), only when load_all_comments=true, default 20
- `click_more_replies`: Whether to expand level 2 replies (optional), only when load_all_comments=true, default false
- `reply_limit`: Skip replies with too many replies (optional), only when click_more_replies=true, default 10
- `scroll_speed`: Scrolling speed (optional), `slow` | `normal` | `fast`, only when load_all_comments=true
- `post_comment_to_feed` - Publish comments to Xiaohongshu post (required: feed_id, xsec_token, content)
- `reply_comment_in_feed` - Reply to the specified comment under the Xiaohongshu note (required: feed_id, xsec_token, content, and comment_id or user_id at least one)
- `like_feed` - Like/cancel like (required: feed_id, xsec_token)
- `unlike`: Whether to cancel like (optional), true to cancel like, default like
- `favorite_feed` - Collect/cancel collect (required: feed_id, xsec_token)
- `unfavorite`: Whether to cancel collect (optional), true to cancel collect, default collect
- `user_profile` - Get user homepage information (required: user_id, xsec_token)
### 2.4. Usage Examples
Using Claude Code to publish content to Xiaohongshu:
**Example 1: Using HTTP image link**
```
Help me write a post and publish it on Xiaohongshu,
with images: https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
The image is: "New Zealand's Ngātoroirangi bay Maori rock carving (© Joppi/Getty Images)"
Use xiaohongshu-mcp for publishing.
```
**Example 2: Using local image path (recommended)**
```
Help me write a post about spring and publish it on Xiaohongshu,
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 about food making and publish it on Xiaohongshu,
using this local video file:
- /Users/username/Videos/cooking_tutorial.mp4
Use xiaohongshu-mcp's video publishing function.
```

**Publishing result:**
<img src="./assets/publish_result.jpeg" alt="xiaohongshu-mcp publishing result" width="300">
### 2.5. 💬 MCP Use Common FAQs
> ⚠️ Here are known risks when using OpenClaw + MCPorter. Please fully understand them before use:
- OpenClaw's AI automatic deployment behavior is not within the maintenance scope of this project, and deployment results cannot be guaranteed.
- MCPorter as an intermediate layer may introduce additional compatibility issues, unrelated to xiaohongshu-mcp itself.
- If you encounter connection failures, tool call exceptions, etc., please troubleshoot MCPorter's configuration first, rather than submitting an issue.
- Before asking questions in the community or group, please confirm if the issue can be reproduced **without using OpenClaw**.
If you don't have a strong need for OpenClaw, it's strongly recommended to use [Claude Code CLI](#claude-code-cli), [Cursor](#cursor), or [Cline](#cline) and other native HTTP MCP clients for a more stable experience.
**Q:** Why does the login username show `xiaghgngshu-mcp`?
**A:** The username is hardcoded.
**Q:** It shows publication success, but it doesn't actually appear?
**A:** Troubleshooting steps are as follows:
1. Republish in **non-headless mode**.
2. Try republishing with **different content**.
3. Log in to the web version of Xiaohongshu and check if the account is **restricted from publishing on the web version**.
4. Check if the **image size** is too large.
5. Confirm that there are **no Chinese characters in the image path**.
6. If using a network image address, ensure the **image link is accessible**.
**Q:** How to solve the MCP program crashing on the device?
**A:**
1. It's recommended to **install from source**.
2. Alternatively, use **Docker to install xiaohongshu-mcp**. For tutorials, refer to:
- [Install xiaohongshu-mcp using Docker](https://github.com/xpzouying/xiaohongshu-mcp#:~:text=%E6%96%B9%E5%BC%8F%E4%B8%89%EF%BC%9A%E4%BD%BF%E7%94%A8%20Docker%20%E5%AE%B9%E5%99%A8%EF%BC%88%E6%9C%80%E7%AE%80%E5%8D%95%EF%BC%89)
- [X-MCP Project Page](https://github.com/xpzouying/x-mcp/)
**Q:** Using `http://localhost:18060/mcp` for MCP verification prompts a connection failure?
**A:**
- In a **Docker environment**, use
👉 [http://host.docker.internal:18060/mcp](http://host.docker.internal:18060/mcp)
- In a **non-Docker environment**, use the **local IPv4 address** to access.
## 3. 🌟 Community Showcases
> 💡 **Highly recommended to view**: These are real use cases from community contributors, including 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)** - AI client perfect access
3. **[Claude Code + Kimi K2 Access Tutorial](./examples/claude-code/claude-code-kimi-k2.md)** - Claude Code threshold is too high, then access Kimi's domestic large model~
4. **[AnythingLLM Complete Guide](./examples/anythingLLM/readme.md)** - AnythingLLM is an all-in-one multimodal AI client, supporting workflow definition, multiple large models, and plugin extensions.
> 🎯 **Tip**: Click the above link to view detailed graphic tutorials and quickly get started with various integration solutions!
>
> 📢 **Welcome to contribute**: If you have new integration cases, feel free to submit a PR to share with the community!
## 4. Xiaohongshu MCP Mutual Assistance Group
**Important: Before asking questions in the group, please make sure to read the README document and check the Issues.**
### WeChat Groups
| WeChat Group 21 | WeChat Group 22 |
| :------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------: |
| <img src="https://github.com/user-attachments/assets/ff02e60c-e850-4931-87de-c10e32919a74" alt="WechatIMG119" width="300"> | <img src="https://github.com/user-attachments/assets/7a923529-425d-4005-bad8-64a3ecb5a819" alt="WechatIMG119" width="300">|
### Feishu Groups
| Feishu Group 1 | Feishu Group 2 | Feishu Group 3 | Feishu Group 4 |
| :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: |
| <img src="https://github.com/user-attachments/assets/65579771-3543-4661-9b48-def48eed609b" alt="qr-feishu01" width="260"> | <img src="https://github.com/user-attachments/assets/4983ea42-ce5b-4e26-a8c0-33889093b579" alt="qr-feishu02" width="260"> | <img src="https://github.com/user-attachments/assets/c77b45da-6028-4d3a-b421-ccc6c7210695" alt="qr-feishu03" width="260"> | <img src="https://github.com/user-attachments/assets/c42f5595-71cd-4d9b-b7f8-0c333bd25e2b" alt="qr-feishu04" width="260"> |
> **Note:**
>
> 1. The WeChat group QR codes have a time limit and may expire. Please wait for updates or submit an issue to request an update.
> 2. For Feishu groups, if some groups are full, try scanning another group. There are always available spots.
## 🙏 Acknowledgements ✨
Thanks to all contributors who have made contributions to this project! (No ranking)
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://haha.ai"><img src="https://avatars.githubusercontent.com/u/3946563?v=4?s=100" width="100px;" alt="zy"/><br /><sub><b>zy</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=xpzouying" title="Code">💻</a> <a href="#ideas-xpzouying" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=xpzouying" title="Documentation">📖</a> <a href="#design-xpzouying" title="Design">🎨</a> <a href="#maintenance-xpzouying" title="Maintenance">🚧</a> <a href="#infra-xpzouying" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/pulls?q=is%3Apr+reviewed-by%3Axpzouying" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.hwbuluo.com"><img src="https://avatars.githubusercontent.com/u/1271815?v=4?s=100" width="100px;" alt="clearwater"/><br /><sub><b>clearwater</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=esperyong" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/laryzhong"><img src="https://avatars.githubusercontent.com/u/47939471?v=4?s=100" width="100px;" alt="Zhongpeng"/><br /><sub><b>Zhongpeng</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=laryzhong" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DTDucas"><img src="https://avatars.githubusercontent.com/u/105262836?v=4?s=100" width="100px;" alt="Duong Tran"/><br /><sub><b>Duong Tran</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=DTDucas" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Angiin"><img src="https://avatars.githubusercontent.com/u/17389304?v=4?s=100" width="100px;" alt="Angiin"/><br /><sub><b>Angiin</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=Angiin" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/muhenan"><img src="https://avatars.githubusercontent.com/u/43441941?v=4?s=100" width="100px;" alt="Henan Mu"/><br /><sub><b>Henan Mu</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=muhenan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chengazhen"><img src="https://avatars.githubusercontent.com/u/52627267?v=4?s=100" width="100px;" alt="Journey"/><br /><sub><b>Journey</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=chengazhen" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/eveyuyi"><img src="https://avatars.githubusercontent.com/u/69026872?v=4?s=100" width="100px;" alt="Eve Yu"/><br /><sub><b>Eve Yu</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=eveyuyi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CooperGuo"><img src="https://avatars.githubusercontent.com/u/183056602?v=4?s=100" width="100px;" alt="CooperGuo"/><br /><sub><b>CooperGuo</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=CooperGuo" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://biboyqg.github.io/"><img src="https://avatars.githubusercontent.com/u/125724218?v=4?s=100" width="100px;" alt="Banghao Chi"/><br /><sub><b>Banghao Chi</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=BiboyQG" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/varz1"><img src="https://avatars.githubusercontent.com/u/60377372?v=4?s=100" width="100px;" alt="varz1"/><br /><sub><b>varz1</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=varz1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://google.meloguan.site"><img src="https://avatars.githubusercontent.com/u/62586556?v=4?s=100" width="100px;" alt="Melo Y Guan"/><br /><sub><b>Melo Y Guan</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=Meloyg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lmxdawn"><img src="https://avatars.githubusercontent.com/u/21293193?v=4?s=100" width="100px;" alt="lmxdawn"/><br /><sub><b>lmxdawn</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=lmxdawn" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/haikow"><img src="https://avatars.githubusercontent.com/u/22428382?v=4?s=100" width="100px;" alt="haikow"/><br /><sub><b>haikow</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=haikow" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://carlo-blog.aiju.fun/"><img src="https://avatars.githubusercontent.com/u/18513362?v=4?s=100" width="100px;" alt="Carlo"/><br /><sub><b>Carlo</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=a67793581" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hrz394943230"><img src="https://avatars.githubusercontent.com/u/28583005?v=4?s=100" width="100px;" alt="hrz"/><br /><sub><b>hrz</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=hrz394943230" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ctrlz526"><img src="https://avatars.githubusercontent.com/u/143257420?v=4?s=100" width="100px;" alt="Ctrlz"/><br /><sub><b>Ctrlz</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=ctrlz526" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/flippancy"><img src="https://avatars.githubusercontent.com/u/6467703?v=4?s=100" width="100px;" alt="flippancy"/><br /><sub><b>flippancy</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=flippancy" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Infinityay"><img src="https://avatars.githubusercontent.com/u/103165980?v=4?s=100" width="100px;" alt="Yuhang Lu"/><br /><sub><b>Yuhang Lu</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=Infinityay" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://triepod.ai"><img src="https://avatars.githubusercontent.com/u/199543909?v=4?s=100" width="100px;" alt="Bryan Thompson"/><br /><sub><b>Bryan Thompson</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=triepod-ai" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.megvii.com"><img src="https://avatars.githubusercontent.com/u/7806992?v=4?s=100" width="100px;" alt="tan jun"/><br /><sub><b>tan jun</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=tanxxjun321" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/coldmountein"><img src="https://avatars.githubusercontent.com/u/95873096?v=4?s=100" width="100px;" alt="coldmountain"/><br /><sub><b>coldmountain</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=coldmountein" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.litpp.com/"><img src="https://avatars.githubusercontent.com/u/44826388?v=4?s=100" width="100px;" alt="mamage"/><br /><sub><b>mamage</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=yqdaddy" title="Code">💻</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=yqdaddy" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<td align="center" valign="top" width="14.28%"><a href="https://runyang.vercel.app/"><img src="https://avatars.githubusercontent.com/u/54588936?v=4?s=100" width="100px;" alt="Runyang YOU"/><br /><sub><b>Runyang YOU</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=YRYangang" title="Code">💻</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=YRYangang" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.hnfnu.edu.cn/"><img src="https://avatars.githubusercontent.com/u/134906805?v=4?s=100" width="100px;" alt="e0_7"/><br /><sub><b>e0_7</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=Daily-AC" title="Code">💻</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=Daily-AC" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/prehisle"><img src="https://avatars.githubusercontent.com/u/2081344?v=4?s=100" width="100px;" alt="prehisle"/><br /><sub><b>prehisle</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=prehisle" title="Code">💻</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=prehisle" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/blablabiu"><img src="https://avatars.githubusercontent.com/u/123888078?v=4?s=100" width="100px;" alt="Xinhao Chen"/><br /><sub><b>Xinhao Chen</b></sub></a><br /><a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=blablabiu" title="Code">💻</a> <a href="https://github.com/xpzouying/xiaohongshu-mcp/commits?author=blablabiu" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
### ✨ Special Thanks
<table>
<tbody>
<tr>
<td align="center" valign="top" width="20%"><a href="https://github.com/wanpengxie"><img src="https://avatars.githubusercontent.com/wanpengxie" width="130px;" alt="wanpengxie"/><br /><sub><b>@wanpengxie</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/tanxxjun321"><img src="https://avatars.githubusercontent.com/u/7806992?v=4" width="130px;" alt="tanxxjun321"/><br /><sub><b>@tanxxjun321</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/Angiin"><img src="https://avatars.githubusercontent.com/u/17389304?v=4" width="130px;" alt="Angiin"/><br /><sub><b>@Angiin</b></sub></a></td>
</tr>
</tbody>
</table>
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
Skill_Seekers
Skill Seekers is a Python project for skill assessment, integrated with MCP.
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.