Xiaohongshu MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xiaohongshu-mcp-server
A Model Context Protocol (MCP) server for Xiaohongshu (Little Red Book) - China's leading lifestyle social media platform.
Publish image notes, search content, view note details, and manage your account - all through MCP tools that AI assistants can use directly.
How It Works
Uses Playwright to run a headless Chromium browser that:
Loads your XHS session cookies
Generates authentic API signatures via the XHS web app's built-in signing function
Makes API calls through the browser's network context (bypasses anti-bot detection)
Uploads images directly to XHS CDN
No browser automation of UI elements - all interactions go through XHS's internal API.
Related MCP server: xiaohongshu-skill
Tools
Tool | Description |
| Check if you're logged in |
| Generate QR code for login |
| Poll QR scan status & save session |
| Reload cookies from disk |
| Publish an image note with title, text, images, and tags |
| Search XHS notes by keyword |
| Get full details of a note |
| Get user profile information |
Installation
pip install xiaohongshu-mcp-server
playwright install chromiumFor QR code image generation (optional):
pip install "xiaohongshu-mcp[qrcode]"Quick Start
1. Start the server
HTTP mode (for Claude Code, Cursor, etc.):
xhs-mcp --transport http --port 18060stdio mode (for Claude Desktop):
xhs-mcp --transport stdio2. Login
Call the get_login_qrcode tool, scan the QR code with the Xiaohongshu app, then call check_qrcode_status with the returned qr_id and code. Cookies are saved to ~/.xhs-mcp/cookies.json and persist across restarts.
3. Use
Ask your AI assistant to publish a note, search for content, etc.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"xhs-mcp": {
"command": "xhs-mcp",
"args": ["--transport", "stdio"]
}
}
}Claude Code
claude mcp add xhs-mcp --transport http http://localhost:18060/mcpThen start the server: xhs-mcp
As a LaunchAgent (macOS auto-start)
Create ~/Library/LaunchAgents/com.xhs-mcp.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.xhs-mcp</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/your/venv/bin/xhs-mcp</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/xhs-mcp.log</string>
<key>StandardErrorPath</key>
<string>/tmp/xhs-mcp.err</string>
</dict>
</plist>launchctl load ~/Library/LaunchAgents/com.xhs-mcp.plistExample: Publish a Note
# Via MCP tool call
publish_content(
title="Hello XHS!",
content="My first post published via MCP.",
images=["/path/to/photo.jpg"],
tags=["MCP", "AI"]
)Requirements
Python 3.12+
Chromium (installed via
playwright install chromium)A Xiaohongshu account
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Hosted MCP server for AI agents to post to LinkedIn profiles and X and upload to YouTube.
Hosted Instagram MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA Python implementation of an MCP server for Xiaohongshu that enables AI models to browse feeds, search content, and manage interactions like liking or commenting. It leverages Playwright for browser automation to support account management and content publishing features.1-
- AlicenseNot gradedqualityCmaintenanceMCP server for automating Xiaohongshu (RED Note). Publish posts, search content, comment, like, and analyze creator data on China's largest lifestyle social platform.31MIT
- AlicenseAqualityDmaintenanceMCP server enabling AI assistants to search, analyze, and generate content for Xiaohongshu (RedNote), China's leading lifestyle social media platform.69MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for Xiaohongshu automation, enabling feed browsing, search, note publishing, and interaction via Playwright and FastMCP.4-