AI/TLDR

xiaohongshu-mcp

MCP server that drives a logged-in Xiaohongshu session — publish, search, comment and read engagement data from an AI assistant

Workflow AutomationOpen source
Language
Go
License
Apache-2.0

Overview

xiaohongshu-mcp exposes Xiaohongshu (小红书 / RED) to an AI assistant as an MCP server. It drives a headless browser against a logged-in account, so anything the site lets a signed-in user do becomes a tool an agent can call: publishing image-and-text or video posts, searching by keyword, pulling the home recommendation feed, reading a post's full detail including likes, favourites, shares and comment threads, commenting and replying, liking, and favouriting.

The project is written in Go and ships as prebuilt binaries for macOS Apple Silicon, Windows x64 and Linux x64, alongside a Docker image on Docker Hub and a docker-compose file. It comes in two pieces: a login helper that opens a browser so you can authenticate once, and the MCP service itself. The first run downloads a headless browser of roughly 150 MB; after that it starts offline.

Publishing takes a title, a body and media. Images can be HTTP(S) URLs or absolute local paths — the project recommends local paths for speed and stability — while video publishing accepts local files only. Reading a post's details or acting on it requires both the post id and its xsec_token, which you obtain from the feed or search results, and every action requires a logged-in session. The maintainer notes that one Xiaohongshu account cannot be signed in on multiple web clients at once: logging in elsewhere will kick the MCP session out.

What it does

  • MCP tools plus an HTTP API for login, publishing, search, feed, post detail, comments, likes and favourites
  • Publishes image-and-text posts (local paths or HTTP image URLs) and video posts from local files, with titles, bodies and tags
  • Fetches full post detail — content, author, like/favourite/share/comment counts and nested comment threads
  • Reads a user profile: bio, follower and following counts, total likes and the user's public notes
  • Idempotent like/favourite tools that detect the current state instead of toggling blindly
  • Ships as prebuilt binaries for macOS/Windows/Linux, a Docker Hub image and a docker-compose deployment

Getting started

Run the login tool once to authenticate, then start the MCP service. Docker is the least fiddly route; prebuilt binaries cover macOS Apple Silicon, Windows x64 and Linux x64 (macOS Intel and Linux ARM64 are not built).

Download the binaries and log in

Grab the MCP service and the login helper for your platform from GitHub Releases, then run the login tool first. The first launch downloads a headless browser of about 150 MB.

bashbash
# 1. Run the login tool
chmod +x xiaohongshu-login-darwin-arm64
./xiaohongshu-login-darwin-arm64

# 2. Start the MCP service
chmod +x xiaohongshu-mcp-darwin-arm64
./xiaohongshu-mcp-darwin-arm64

Or run it with Docker

The published image bundles the browser and Chinese fonts, mounts ./data for cookies and runtime state and ./images for published pictures.

bashbash
docker pull xpzouying/xiaohongshu-mcp

wget https://raw.githubusercontent.com/xpzouying/xiaohongshu-mcp/main/docker/docker-compose.yml
docker compose up -d
docker compose logs -f

Build from source

Building needs a Go toolchain. If you are on a slow connection to proxy.golang.org, set a mirror first.

bashbash
go env -w GOPROXY=https://goproxy.cn,direct

Know the platform's limits before you automate

Titles are capped at 20 characters and bodies at 1000. Post detail, comment, like and favourite tools all need the post id AND its xsec_token, both of which come from the feed or search results. Keep the account signed out of other web clients while the MCP service is running, or the session is dropped. The project is published for learning purposes and forbids any unlawful use.

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Letting a coding agent or assistant draft and publish Xiaohongshu image or video posts from a local folder
  • Pulling search results, the recommendation feed or a specific post's comment thread into an agent's context
  • Automating routine engagement — replying to comments on your own notes, liking or favouriting — behind an agent's approval step
  • Reading a creator profile's public notes and follower statistics as structured data instead of scraping the page by hand

How xiaohongshu-mcp compares

xiaohongshu-mcp alongside other open-source workflow automation tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
n8n★ 205kA self-hostable workflow automation tool with a visual node editor that connects 400+ apps and APIs and adds native AI steps, letting technical teams build automations without writing most of the glue code.
Huginn★ 50kA self-hosted system of "agents" that watch websites, feeds, and events and take automated actions on your behalf, similar to a private IFTTT.
GitHub MCP Server★ 33.1kGitHub's official MCP server, hosted or self-run, that gives an agent scoped toolsets for repositories, issues, pull requests, Actions runs and code-security alerts.
gws (Google Workspace CLI)★ 31.1kA command-line tool for every Google Workspace API, built at runtime from Google’s Discovery Service, returning structured JSON and shipping 40+ agent skills. Not an officially supported Google product.
Kestra★ 28.2kAn event-driven orchestration platform that defines data, AI, and infrastructure pipelines as declarative YAML and runs them through a web UI.
Activepieces★ 24.6kAn open-source Zapier alternative where you build automations from reusable TypeScript "pieces", with support for AI agents and self-hosting.
n8n-MCP★ 22.9kAn MCP server that gives coding assistants structured access to n8n's node catalogue, schemas, docs and workflow templates so they can build and validate n8n workflows.
xiaohongshu-mcp★ 15.9kMCP server that drives a logged-in Xiaohongshu session — publish, search, comment and read engagement data from an AI assistant