xhs-mcp
Provides tools for searching notes, retrieving note content, fetching comments, and posting comments on Xiaohongshu (Little Red Book).
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-mcp search for 'summer outfit ideas' and list top 5 results"
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.
小红书MCP服务
特点
采用js逆向出x-s,x-t,直接请求http接口,无须笨重的playwright
搜索笔记
获取笔记内容
获取笔记的评论
发表评论

Related MCP server: Xiaohongshu API MCP Server
快速开始
1. 环境
node
python 3.12
uv (pip install uv)
2. 安装依赖
git clone git@github.com:jobsonlook/xhs-mcp.git
cd xhs-mcp
uv sync
3. 获取小红书的cookie
打开web小红书
登录后,获取cookie,将cookie配置到第4步的 XHS_COOKIE 环境变量中

4. 配置mcp server
{
"mcpServers": {
"xhs-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/xxx/xhs-mcp",
"run",
"main.py"
],
"env": {
"XHS_COOKIE": "xxxx"
}
}
}
}免责声明
本项目仅用于学习交流,禁止用于其他用途,任何涉及商业盈利目的均不得使用,否则风险自负。
Available Tools
6 toolscheck_cookieBInspect
检测cookie是否失效
Inputs: no named parameters.
get_note_commentsCInspect
获取笔记评论,参数url要带上xsec_token
Args:
url: 笔记 urlInputs: url (required).
get_note_contentAInspect
获取笔记内容,参数url要带上xsec_token
Args:
url: 笔记 url
Inputs: url (required).
post_commentAInspect
发布评论到指定笔记
Args:
note_id: 笔记 note_id
comment: 要发布的评论内容
Inputs: comment (required), note_id (required).
search_notesCInspect
根据关键词搜索笔记
Args:
keywords: 搜索关键词
Inputs: keywords (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource and action: comments retrieval, comment posting, cookie validation, feed browsing, note search, and note content retrieval. No two tools overlap in purpose.
Names follow a consistent verb_noun pattern: get_note_comments, post_comment, check_cookie, search_notes, get_note_content. home_feed is the only slight deviation but still reads as a noun phrase and is predictable.
Six tools is well-scoped for a XiaoHongShu focused server, covering browsing, searching, reading content, and commenting without unnecessary bloat.
The core workflows are covered: read notes, search notes, view comments, post comments, and check session validity. Minor gap: no ability to update or delete comments, but this is not essential for typical consumption use cases.
Maintenance
Related MCP Connectors
RedNote (Xiaohongshu, 小红书) note search, full notes, comment threads and creator profiles.
XHS search/details, PGY, comments/replies, users/ID resolution/posts, transcript
RedNote (Xiaohongshu 小红书) trending notes, no login: full text, images, video, tags, likes, saves.
Public data from 20+ platforms, including Douyin, Xiaohongshu, Weibo and TikTok, as structured JSON
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that enables access to Xiaohongshu (Little Red Book) content, allowing users to search for notes and retrieve content via URLs with authentication management and cookie persistence.121 npm7MIT
- FlicenseNot gradedqualityDmaintenanceA microservice that wraps Xiaohongshu (Little Red Book) API into a RESTful API server, enabling users to perform various operations on the platform such as retrieving notes, searching users and content, and accessing user information.18-
- 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.458-
- FlicenseNot gradedqualityDmaintenanceEnables automated interaction with Xiaohongshu (Little Red Book) to search for notes, retrieve content or comments, and post targeted smart comments. It utilizes Playwright to manage browser-based tasks such as secure login and automated engagement.131-