Labsco
MCP SERVER

Xhs MCP Tool

by Lozzi1910

Search, read and publish Xiaohongshu notes from your assistant, driving a real logged-in browser session.

Social Media Accounts & Posting
Summary
Full read-and-publish access to Xiaohongshu, at the cost of a browser and a scan.

Because it drives a real session rather than an API, you get the publish path that key-based integrations do not have — but you also inherit a browser to keep alive and a login that expires, which is why the login-check tool matters more here than it would elsewhere. Licensing is split: AGPL-3.0 for personal use, with the author listing a paid tier at ¥499 for one commercial project and ¥2999 for unlimited projects.

What it is

A Python MCP server that automates Xiaohongshu through a Playwright-controlled Chromium session: it searches notes, opens them, and publishes image-and-text posts under your own logged-in account.

What you get
  • `xhs_search` — search notes by keyword with a limit, returning titles and links
  • `xhs_get_note` — open one note by URL and read the body and comments
  • `xhs_publish` — publish an image-and-text note with a title, body and images
  • `xhs_login_qrcode` — fetch a QR code to scan from the Xiaohongshu app
  • `xhs_check_login` — confirm the session is still authenticated before a run
  • A Docker path that keeps cookies and QR codes in a mounted data directory, so the login survives restarts
Requirements

`pip install xhs-mcp-tool` followed by `playwright install chromium`, on Python 3.10+. Authentication is a phone scan: call the QR-code tool, scan it in the app, then confirm with the login check. The Docker path publishes on port 6789 and mounts a data volume for the session.

Setup effort

One command — pip install xhs-mcp-tool