Skip to main content
Glama

📕 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-core

2️⃣ 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!!

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • 搜索笔记、浏览首页推荐、查看笔记内容与评论,并发表你的评论。直接在工作流中与小红书内容互动,高效跟进话题。

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

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HUliangwei/xhs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server