xhs-mcp
A lightweight MCP server that provides read-only access to Xiaohongshu (Little Red Book) data, enabling search, note details, user profiles, and trending feeds via direct HTTP APIs.
README
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-server
Why 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.
What you can do
| Tool | Description |
|---|---|
xhs_search |
Search notes by keyword with sorting and filtering |
xhs_note_detail |
Get full content, images, and metrics for any note |
xhs_user_profile |
Get creator profiles with follower/engagement stats |
xhs_user_notes |
List all notes from a specific creator |
xhs_explore |
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.com - Copy 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 environment
3. 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 | npx (1 second) |
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 cookie - The server will warn you at startup if
XHS_COOKIEis not set - Never 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。