xhs-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xhs-mcpsearch Xiaohongshu for skincare routine tips"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
📕 xhs-mcp — Turn Xiaohongshu into your MCP tool
Runs locally · Chrome-driven · Alt-account safe — Xiaohongshu ⇌ any MCP host (DSH first)
A lightweight MCP Server that lets you operate Xiaohongshu from hosts like DSH / Claude / Cursor via private chat / tool calls: login, search notes! (Posting capability reserved, requires explicit owner authorization)
✨ Features
Capability | Description | Status |
🔐 Independent login state | Independent Chrome profile, scan once for permanent login | ✅ |
🔍 Search notes | Keyword search, returns title + link | ✅ |
🛡️ Anti-detection | Real Chrome + real UA + removes webdriver flag | ✅ |
👤 Alt-account isolation | Independent profile, doesn't touch owner's daily account | ✅ |
📝 Posting | Interface reserved (requires explicit owner authorization) | 🚧 |
🖥️ Multi-host | stdio MCP, works with DSH/Claude/Cursor | ✅ |
Related MCP server: Xiaohongshu (RedBook) MCP Server
🚀 Quick Start (DSH first)
Prerequisites
Node.js ≥ 20
Google Chrome installed (or specify a path)
1️⃣ Download
git clone https://github.com/HUliangwei/xhs-mcp.git
cd xhs-mcp
npm install # 安装 playwright-core2️⃣ Configure
cp .env.example .env
# 按需改 XHS_PROFILE(多账号用不同名)3️⃣ Register with DSH
Copy dsh-bundle/ into your profile bundles, and add ./bundles/xhs-mcp to dsh.profile.bundles in the profile's package.json:
{ "dsh": { "profile": { "bundles": [ "./bundles/xhs-mcp" ] } } }Restart DSH → the xhs_* tool group becomes available.
4️⃣ Other hosts
{ "mcpServers": { "xhs": { "command": "node", "args": ["<路径>/xhs-mcp-server.mjs"] } } }🛠️ Tools
Tool | Description |
xhs_login | Opens real Chrome, scan-code login (180s, persistent) |
xhs_search | Search notes: { keyword, count } → title + link |
xhs_status | Login status check |
🛡️ Security Design
Private chat / tool calls only: no group chat broadcast
Alt-account only: independent profile, isolated login state, doesn't touch owner's main account
Read-only first: currently read-only + search; posting requires explicit owner authorization, low-frequency compliance
Runs locally: no remote server, data never leaves the machine
Not in git: profiles/ (login state), .env all ignored
📜 Open Source
Apache-2.0 · GitHub
Like it? ⭐ Star it!!
This server cannot be deployed
Maintenance
Related MCP Connectors
搜索笔记、浏览首页推荐、查看笔记内容与评论,并发表你的评论。直接在工作流中与小红书内容互动,高效跟进话题。
XHS hot search/suggestions、note/product search/details、PGY、comments/replies、users/posts、transcript
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables automated interaction with Xiaohongshu (Little Red Book) social media platform through browser automation. Supports login management, status checking, and publishing text content with images to Xiaohongshu accounts.33-
- FlicenseNot gradedqualityDmaintenanceEnables automated interaction with Xiaohongshu (Little Red Book) platform including searching posts, retrieving content and comments, and posting AI-generated comments with persistent login support.453-
- FlicenseNot gradedqualityDmaintenanceEnables automated searching and commenting on Xiaohongshu with AI-generated comments via MCP clients like Claude, supporting login persistence, note analysis, and four comment types.-
- AlicenseAqualityFmaintenanceEnables AI assistants to search, browse, and publish notes on Xiaohongshu (Little Red Book) via MCP tools.8AGPL 3.0