
Xiaohongshu (Little Red Book) MCP Server
io.github.shanyang-me由 GitHub 帳號 shanyang-me 發布v0.1.1更新於 Oct 24, 2026
Publish, search, and manage Xiaohongshu (Little Red Book) content via MCP tools.
概覽
在本機執行的 MCP 伺服器,讓 AI 助理透過無頭瀏覽器工作階段在小紅書上發布、搜尋與管理內容。
- 可以做什麼
- 以 QR 碼登入小紅書、檢查登入狀態、輪詢掃碼狀態,並從磁碟重新載入已儲存的 Cookie。發布含標題、內文、圖片與標籤的圖文筆記。依關鍵字搜尋筆記並取得筆記完整詳情。查詢使用者個人檔案資訊。
- 適用情境
- 適合讓助理草擬並發布小紅書筆記、研究某個主題下的內容,或在不手動開啟應用程式的情況下查看帳號與筆記詳情。
- 執行需求
- 以 Python 套件形式在本機執行(需 Python 3.12+),支援 stdio 或 HTTP 傳輸;需透過 Playwright 安裝 Chromium。需要小紅書帳號,以掃描 QR 碼登入,工作階段 Cookie 會存成本機檔案。產生 QR 碼圖片需額外選用套件。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Xiaohongshu (Little Red Book) MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
xiaohongshu-mcp-server
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
Installation
For QR code image generation (optional):
Quick Start
1. Start the server
HTTP mode (for Claude Code, Cursor, etc.):
stdio mode (for Claude Desktop):
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:
Claude Code
Then start the server: xhs-mcp
As a LaunchAgent (macOS auto-start)
Create ~/Library/LaunchAgents/com.xhs-mcp.plist:
Example: Publish a Note
Requirements
- Python 3.12+
- Chromium (installed via
playwright install chromium) - A Xiaohongshu account
License
MIT
來源:README.md,提交 e4fb862
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分