Xiaohongshu (Little Red Book) MCP Server
内容与创意by shanyang-me
通过 MCP tools 发布、搜索并管理小红书内容,适合自动化运营与内容工作流集成。
什么是 Xiaohongshu (Little Red Book) MCP Server?
通过 MCP tools 发布、搜索并管理小红书内容,适合自动化运营与内容工作流集成。
README
xiaohongshu-mcp-server
<!-- mcp-name: io.github.shanyang-me/xiaohongshu-mcp -->A Model Context Protocol (MCP) server for Xiaohongshu (Little Red Book) - China's leading lifestyle social media platform.
Publish image notes, search content, view note details, and manage your account - all through MCP tools that AI assistants can use directly.
How It Works
Uses Playwright to run a headless Chromium browser that:
- Loads your XHS session cookies
- Generates authentic API signatures via the XHS web app's built-in signing function
- Makes API calls through the browser's network context (bypasses anti-bot detection)
- Uploads images directly to XHS CDN
No browser automation of UI elements - all interactions go through XHS's internal API.
Tools
| Tool | Description |
|---|---|
check_login_status | Check if you're logged in |
get_login_qrcode | Generate QR code for login |
check_qrcode_status | Poll QR scan status & save session |
reload_cookies | Reload cookies from disk |
publish_content | Publish an image note with title, text, images, and tags |
search_feeds | Search XHS notes by keyword |
get_feed_detail | Get full details of a note |
user_profile | Get user profile information |
Installation
pip install xiaohongshu-mcp-server
playwright install chromium
For QR code image generation (optional):
pip install "xiaohongshu-mcp[qrcode]"
Quick Start
1. Start the server
HTTP mode (for Claude Code, Cursor, etc.):
xhs-mcp --transport http --port 18060
stdio mode (for Claude Desktop):
xhs-mcp --transport stdio
2. Login
Call the get_login_qrcode tool, scan the QR code with the Xiaohongshu app, then call check_qrcode_status with the returned qr_id and code. Cookies are saved to ~/.xhs-mcp/cookies.json and persist across restarts.
3. Use
Ask your AI assistant to publish a note, search for content, etc.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"xhs-mcp": {
"command": "xhs-mcp",
"args": ["--transport", "stdio"]
}
}
}
Claude Code
claude mcp add xhs-mcp --transport http http://localhost:18060/mcp
Then start the server: xhs-mcp
As a LaunchAgent (macOS auto-start)
Create ~/Library/LaunchAgents/com.xhs-mcp.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.xhs-mcp</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/your/venv/bin/xhs-mcp</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/xhs-mcp.log</string>
<key>StandardErrorPath</key>
<string>/tmp/xhs-mcp.err</string>
</dict>
</plist>
launchctl load ~/Library/LaunchAgents/com.xhs-mcp.plist
Example: Publish a Note
# Via MCP tool call
publish_content(
title="Hello XHS!",
content="My first post published via MCP.",
images=["/path/to/photo.jpg"],
tags=["MCP", "AI"]
)
Requirements
- Python 3.12+
- Chromium (installed via
playwright install chromium) - A Xiaohongshu account
License
MIT
常见问题
Xiaohongshu (Little Red Book) MCP Server 是什么?
通过 MCP tools 发布、搜索并管理小红书内容,适合自动化运营与内容工作流集成。
相关 Skills
文档共著
by anthropics
围绕文档、提案、技术规格、决策记录等写作任务,按上下文收集、结构迭代、读者测试三步协作共创,减少信息遗漏,写出更清晰、经得起他人阅读的内容。
✎ 写文档、方案或技术规格时容易思路散、信息漏,它用结构化共著流程帮你高效传递上下文、反复打磨内容,还能从读者视角做验证。
内部沟通
by anthropics
按公司常用模板和语气快速起草内部沟通内容,覆盖 3P 更新、状态报告、领导汇报、项目进展、事故复盘、FAQ 与 newsletter,适合需要统一格式的团队沟通场景。
✎ 按公司偏好的模板快速产出状态汇报、领导更新和 FAQ,既省去反复改稿,也让内部沟通更统一、更专业。
平面设计
by anthropics
先生成视觉哲学,再落地成原创海报、艺术画面或其他静态设计,输出 .png/.pdf,强调构图、色彩与空间表达,适合需要高完成度视觉成品的场景。
✎ 做海报、插画或静态视觉稿时,用它能快速产出兼顾美感与版式的PNG/PDF成品,原创设计更省心,也更适合规避版权风险。
相关 MCP Server
by nirholas
免费的加密新闻聚合 MCP,汇集 Bitcoin、Ethereum、DeFi、Solana 与 altcoins 资讯源。
by alisaitteke
用于Adobe Photoshop自动化的MCP server,让AI assistants直接控制Photoshop。
by ProfessionalWiki
让 Large Language Model 客户端无缝连接任意 MediaWiki 站点,可创建、更新、搜索页面,并通过 OAuth 2.0 安全管理内容。