xiaohongshu-mcp
Self-hosted MCP server for xiaohongshu: publish notes and videos, search, read feeds, comment, like and favorite from an agent
High risk
We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.
Why this level
- Publishes content and acts on behalf of a real social network account
- Unofficial browser automation with saved cookies, with a risk of account restrictions or a ban
Install
Manual install
wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
docker compose up -dRuns via Docker Compose, mounts data and images and exposes port 18060. Complete the login once before publishing. Prebuilt binaries from GitHub Releases and a Go source build are also available.
This is third-party code. Review the repository files before installing.
What it does
xiaohongshu-mcp is a local MCP server that gives an agent access to a xiaohongshu account through a controlled browser. After a one-time manual login it publishes image and video notes with a title, body and tags, searches content by keyword, reads the recommendation feed, fetches post details with stats and comments, opens user profiles, posts and replies to comments, likes and unlikes, and adds to favorites. The server runs locally and exposes an HTTP MCP endpoint that Claude Code, OpenCode and other MCP clients connect to. It ships as prebuilt binaries, a Docker image or a Go source build. The project interface and docs are in Chinese.
Who it is for. For SMM specialists and creators who run a xiaohongshu account and want to automate posting and engagement through an agent.
Good fit when
- You need to publish notes and videos to xiaohongshu from an agent
- You need to search content, read the feed and open post details with comments
- You need to automate likes, favorites and comment replies
Not a fit when
- You have no xiaohongshu account or cannot complete the manual login
- You need an official platform API with guarantees rather than unofficial browser automation
Example request
Publish a xiaohongshu note with a title and three photos from a folder and add tagsLimitations
This is unofficial automation through a controlled browser, not an official API; platform rules and anti-spam apply and the account carries the risk. A one-time manual login is required, and the cookie can expire and need a re-login. The same account must not be kept in other web sessions at once, or the MCP session is kicked out. The first run downloads a headless browser of about 150 MB. Prebuilt binaries exist only for macOS Apple Silicon, Windows x64 and Linux x64; macOS Intel and Linux ARM64 need a source build or Docker. Many read actions need a post id and xsec_token taken from the feed or search. The interface and docs are in Chinese.
How to disable. Stop the server (docker compose stop or kill the process) and remove it from the MCP client, for example claude mcp remove xiaohongshu-mcp.
MCP
- Transport
- http
- Authentication
- not required
| Environment variables | |
|---|---|
| AUTH_TOKEN secret | Optional token to protect the MCP endpoint, off by default. When enabled, clients send an Authorization: Bearer header. |
| XHS_PROXY | Optional proxy for outbound access, supports HTTP, HTTPS and SOCKS5. |
Security check
- Publishes content and acts on behalf of a real social network account
- Unofficial browser automation with saved cookies, with a risk of account restrictions or a ban
README in short
The Chinese README describes an MCP server for xiaohongshu that gives an agent access to account data. It lists login and status check, publishing notes and videos, search, the recommendation feed, post details with comments, profiles, comments and replies, likes and favorites. Installation follows three paths: prebuilt binaries from GitHub Releases, a Go source build and Docker with docker compose, and the service listens on port 18060 at the /mcp path. It also covers a proxy via XHS_PROXY, optional protection via AUTH_TOKEN and connecting the Claude Code and OpenCode clients. There are operational notes and account risk warnings. Apache 2.0 licensed.
FAQ
Is this an official API?
No, it is unofficial automation through a controlled browser; follow platform rules, and the account bears the risk of restrictions.
Do I need an access token?
By default you log in through manual authorization, and access to the server is optionally protected by the AUTH_TOKEN variable, after which clients send an Authorization: Bearer header.
Related
A skill that strips AI writing tells from text using Wikipedia's list, without adding invented facts
Marketing Skills for AI agents
Marketing Skills for AI Agents
About fifty skills for CRO, copywriting, SEO, analytics, ads and launches, built for coding agents
SendPulse MCP server
SendPulse MCP
SendPulse's official remote MCP server: statistics, campaigns and user data through an agent chat
Yandex Direct MCP generated from a machine-readable schema
yandex-direct-mcp
An MCP server and CLI covering all 113 Yandex Direct API v5 methods generated from WSDL, exposing 9 read tools by default and writes only on demand