Xiaohongshu Publisher

v1.0.0Communicationstable

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.

mcpxhsxhs-mcpxhs-mcp-serverxiaohongshu
Share:
481
Stars
0
Downloads
0
Weekly
0/5

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

Automatically publish photo notes to Xiaohongshu with AI-generated content.
Maintain persistent login for seamless automated posting.
FrancoSbaffi

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx xhs

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 chromium
2

Run 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.py
3

Note 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.

pwd
4

Add 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"]
    }
  }
}
5

Restart Claude Desktop

Quit and relaunch Claude Desktop. The xiaohongshu server should appear in the connected tools list.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "xhs": { "command": "npx", "args": ["-y", "xhs"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides