xhs-mcp
Provides tools for searching notes, retrieving note details, fetching user profiles and notes, and exploring trending/recommended content on Xiaohongshu (Little Red Book), China's lifestyle platform.
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 trending skincare products"
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
Lightweight MCP server for Xiaohongshu (Little Red Book / RED) — China's #1 lifestyle platform with 300M+ monthly active users.
No Docker. No Chromium. Just npx.
npx xhs-mcp-serverWhy this exists
Xiaohongshu (小红书) is where Chinese consumers discover products, share reviews, and follow trends. If you're building for the Chinese market — or just want to understand what's trending there — you need data from this platform.
Existing solutions require Docker + Chromium (heavy, fragile). This server uses direct HTTP APIs, so it starts in <1 second and works anywhere Node.js runs.
Related MCP server: xiaohongshu-skill
What you can do
Tool | Description |
| Search notes by keyword with sorting and filtering |
| Get full content, images, and metrics for any note |
| Get creator profiles with follower/engagement stats |
| List all notes from a specific creator |
| Get the current trending/recommended feed |
Quick start
1. Get your cookie
Log in to xiaohongshu.com in Chrome, then:
Open DevTools (
F12)Go to Application tab → Cookies →
https://www.xiaohongshu.comCopy the entire cookie string (or use a browser extension like "EditThisCookie" to export)
2. Add to your AI tool
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"xhs": {
"command": "npx",
"args": ["-y", "xhs-mcp-server"],
"env": {
"XHS_COOKIE": "your_cookie_string_here"
}
}
}
}Cursor (.cursor/mcp.json):
{
"mcpServers": {
"xhs": {
"command": "npx",
"args": ["-y", "xhs-mcp-server"],
"env": {
"XHS_COOKIE": "your_cookie_string_here"
}
}
}
}Claude Code:
claude mcp add xhs -- npx -y xhs-mcp-server
# Then set XHS_COOKIE in your environment3. Use it
Ask your AI assistant:
"Search Xiaohongshu for skincare trends"
"Find the top creators posting about coffee in Shanghai"
"What's trending on Xiaohongshu right now?"
"Analyze this Xiaohongshu creator's content strategy"
Use cases
For cross-border brands:
Monitor brand mentions and competitor activity on China's top discovery platform
Understand what products Chinese consumers are excited about
Find potential KOL/KOC partners by analyzing creator profiles and engagement
For market researchers:
Track trending topics and consumer sentiment in China
Analyze content strategies that work on Xiaohongshu
Discover emerging product categories before they hit Western markets
For developers:
Build Chinese market intelligence into your AI agents
Create automated competitor monitoring dashboards
Integrate Xiaohongshu data into your workflow
How it compares
Feature | xhs-mcp (this) | xpzouying/xiaohongshu-mcp |
Language | TypeScript/Node | Go |
Install |
| Docker + Chromium (minutes) |
Dependencies | None | Docker, Chromium, ~500MB |
Search | Yes | Yes |
Read notes | Yes | Yes |
User profiles | Yes | Yes |
Publish content | Not yet | Yes |
Login (QR code) | Not yet | Yes |
Auth method | Cookie (manual) | Browser automation |
This server is read-only by design. It focuses on research and analysis. If you need to publish content, use xpzouying/xiaohongshu-mcp — it's excellent for that.
Cookie notes
Cookies typically last 7-30 days before expiring
If you get
401ornot_logged_inerrors, refresh your cookieThe server will warn you at startup if
XHS_COOKIEis not setNever commit your cookie to version control
Roadmap
Creator analytics (engagement rate calculation, posting frequency)
Comment analysis (sentiment, themes)
Trend detection (rising keywords over time)
Content translation (Chinese → English summaries)
Cookie refresh helper
Publish support (opt-in, with rate limiting)
Contributing
PRs welcome. This project is MIT licensed.
About
Built by Tristin — building AI tools for cross-border commerce, in public.
Xiaohongshu is a trademark of Xingyin Information Technology Co., Ltd. This project is not affiliated with or endorsed by Xiaohongshu.
Available Tools
5 toolsxhs_exploreA
Get the current trending/explore feed from Xiaohongshu homepage. Shows what content is currently popular on the platform. Great for trend spotting and understanding what resonates with Chinese consumers.
Inputs: category.
xhs_note_detailA
Get full detail of a specific Xiaohongshu note by ID. Returns the complete content, all images, engagement metrics, author info, and tags. Use note IDs from xhs_search results.
Inputs: note_id (required).
xhs_searchA
Search notes on Xiaohongshu (Little Red Book). Returns titles, engagement metrics (likes/collects/comments), author info, and direct URLs. Useful for market research, trend analysis, and competitor monitoring on China's leading lifestyle platform.
Inputs: keyword (required), page, sort, note_type.
xhs_user_notesA
Get all published notes from a specific Xiaohongshu user. Returns their content portfolio with engagement metrics. Useful for analyzing a creator's content strategy.
Inputs: user_id (required), cursor.
xhs_user_profileA
Get a Xiaohongshu user's profile including follower count, total likes, number of notes, and bio. Useful for influencer research and competitive analysis.
Inputs: user_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 5 tools
Each tool targets a distinct resource and action: search notes, get note details, get user profile, get user notes, and explore trending feed. There is no overlap in their purposes, so an agent can easily choose the right tool.
All tool names use a consistent 'xhs_' prefix and snake_case. However, there is a slight mix between verb-based names (xhs_search, xhs_explore) and noun-based names (xhs_note_detail, xhs_user_profile, xhs_user_notes), deviating from a uniform verb_noun pattern.
Five tools is well within the ideal range for a focused server. Each tool meaningfully contributes to the apparent purpose of Xiaohongshu research and trend analysis without being padded or insufficient.
The server covers the core read-only workflows (search, detail, user portfolio, trends) for market research. Minor gaps exist, such as no user search or comment-level detail, but they do not severely hinder typical use cases.
Maintenance
Related MCP Connectors
MCP server for real-time Chinese internet hot-search and trending boards across major platforms.
MCP server aggregating hot-search boards from 8 Chinese platforms (Weibo, Zhihu, Bilibili, Douyin).
Hosted MCP server for DataLikers — Instagram & TikTok data API. 51 tools: Instagram user search by demographics (gender/age/race/country/city), profiles, bulk lookup, engagement, posts & reels, comments, hashtags, locations, stories, highlights, music, business accounts, top users; TikTok users, videos, comments, hashtags, playlists and top charts. Streamable HTTP, Bearer API key. Free tier: 100 requests on signup at https://datalikers.com/p/1by27bwg
Reddit MCP server: search posts, subreddit feeds, comments & user profiles as JSON. No API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA locally-run MCP server that enables downloading images, videos, and LivePhotos from Xiaohongshu (RedNote) and retrieving detailed work information through URL-based queries.8GPL 3.0
- AlicenseNot gradedqualityCmaintenanceMCP server for automating Xiaohongshu (RED Note). Publish posts, search content, comment, like, and analyze creator data on China's largest lifestyle social platform.31MIT
- AlicenseNot gradedqualityCmaintenance一个用于小红书API的MCP服务器,支持搜索笔记、获取内容、查看评论和发表评论等功能。23 PyPI520MIT
- FlicenseAqualityDmaintenanceA lightweight MCP server that lets AI assistants publish notes to Xiaohongshu (Little Red Book) via browser automation. Supports login, image-text note publishing with up to 9 images, and search.41-