Xiaohongshu Publisher
Enables AI agents to automatically publish photo notes to Xiaohongshu (RedNote) using Playwright browser automation. It supports title, body, and image uploads while maintaining persistent login sessions for seamless automated posting.
What is Xiaohongshu Publisher?
Xiaohongshu Publisher is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai agents to automatically publish photo notes to xiaohongshu (rednote) using playwright browser automation. it supports title, body, and image uploads while maintaining persistent login sessi...
Enables AI agents to automatically publish photo notes to Xiaohongshu (RedNote) using Playwright browser automation. It supports title, body, and image uploads while maintaining persistent login sessions for seamless automated posting.
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables AI agents to automatically publish photo notes to Xi
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx xhsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Xiaohongshu Publisher
The Xiaohongshu (RedNote/XHS) MCP server lets AI assistants automatically publish photo notes to the popular Chinese social platform through Playwright browser automation. It exposes a single post_note tool that accepts a title, body text, and image path, then drives a persistent Chromium session to log in once and post on subsequent calls without requiring platform credentials in every request.
Prerequisites
- Python 3.11 or later installed
- pip and a Xiaohongshu (RedNote/小红书) account
- Playwright and Chromium: install with pip install playwright && playwright install chromium
- Claude Desktop or another MCP client configured to run local Python servers
- The xhs-mcp repository cloned locally
Clone the repository and install dependencies
Clone the xhs-mcp project, then install the Python requirements including Playwright.
git clone https://github.com/FrancoSbaffi/xhs-mcp.git
cd xhs-mcp
pip install -r requirements.txt
python -m playwright install chromiumRun the initial login flow
Run the post.py script once to open a browser window, log in to Xiaohongshu manually, and save your session. The session is persisted to session/auth.json so future automated calls do not need to log in again.
python post.pyNote the absolute path to server.py
You will need the full absolute path to server.py when configuring Claude Desktop. Use pwd to find it.
pwdAdd the server to Claude Desktop configuration
Open ~/Library/Application Support/Claude/claude_desktop_config.json and add the entry below, replacing the path with your actual absolute path to server.py.
{
"mcpServers": {
"xiaohongshu": {
"command": "python3.11",
"args": ["/absolute/path/to/xhs-mcp/server.py"]
}
}
}Restart Claude Desktop
Quit and relaunch Claude Desktop. The xiaohongshu server should appear in the connected tools list.
Prepare your image file
The post_note tool requires an absolute path to a JPG or PNG image. Ensure the image exists and you have its full path before asking Claude to post.
Xiaohongshu Publisher Examples
Client configuration
Claude Desktop configuration for the Xiaohongshu MCP server using local Python.
{
"mcpServers": {
"xiaohongshu": {
"command": "python3.11",
"args": ["/Users/alice/projects/xhs-mcp/server.py"]
}
}
}Prompts to try
Example instructions you can give Claude once the server is running.
- "Post this to my Xiaohongshu: title 'Spring Recipe', body 'Try this easy pasta dish for a quick weeknight dinner', image at /Users/alice/photos/pasta.jpg"
- "Publish a Xiaohongshu note with the title 'Travel Tips' and body 'Top 5 things to pack for a city trip', using the image /tmp/travel.png"
- "Create a photo note on RedNote with title 'Morning Routine' and the image at /Users/alice/Desktop/routine.jpg"Troubleshooting Xiaohongshu Publisher
Playwright cannot find Chromium or crashes on launch
Run 'python -m playwright install chromium' inside your project's virtual environment to ensure the browser binary is installed for the correct Python interpreter.
Session expires and the server asks for login again
Delete session/auth.json and run 'python post.py' again to complete a fresh manual login. The new session will be saved automatically.
post_note fails with an image path error
The tool requires an absolute file path (e.g. /Users/alice/photo.jpg), not a relative one. Use 'realpath yourfile.jpg' in the terminal to get the absolute path.
Frequently Asked Questions about Xiaohongshu Publisher
What is Xiaohongshu Publisher?
Xiaohongshu Publisher is a Model Context Protocol (MCP) server that enables ai agents to automatically publish photo notes to xiaohongshu (rednote) using playwright browser automation. it supports title, body, and image uploads while maintaining persistent login sessions for seamless automated posting. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Xiaohongshu Publisher?
Follow the installation instructions on the Xiaohongshu Publisher GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Xiaohongshu Publisher?
Xiaohongshu Publisher works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Xiaohongshu Publisher free to use?
Yes, Xiaohongshu Publisher is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Xiaohongshu Publisher Alternatives — Similar Communication Servers
Looking for alternatives to Xiaohongshu Publisher? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up Xiaohongshu Publisher in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Xiaohongshu Publisher?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.