XiaoHongShu MCP
by mook-wenyu
Browser automation MCP server for Xiaohongshu (Little Red Book) — multi-account isolation, atomic page actions, and content extraction via Playwright.
What it does
XiaoHongShu MCP connects AI agents to Xiaohongshu (Little Red Book), China's leading lifestyle social platform. Using RoxyBrowser for persistent multi-account context isolation and Playwright CDP for stable browser automation, it exposes a minimal set of atomic tools so agents can navigate, search, extract notes, interact with content, and manage browser sessions — all from a standard MCP stdio interface.
Tools
browser_open/browser_close— open or close a browser window (eachdirIdmaps to a persistent BrowserContext)page_create/page_list/page_close— manage pages within a contextpage_navigate— navigate to a URLpage_click/page_hover/page_scroll/page_type/page_input_clear— interact with page elements using semantic locators (role/name/label/text/selector) with optional human-like motionpage_screenshot— capture a screenshot; returns file path by default, or raw PNG data withreturnImage=truepage_snapshot— returns an accessibility (a11y) tree with url, title, and interaction statsxhs_session_check— verify the current Xiaohongshu session is authenticatedxhs_navigate_home/xhs_navigate_discover— navigate to Xiaohongshu sectionsxhs_search_keyword— perform in-app keyword search with humanized inputxhs_collect_search_results— collect the first N note cards from search resultsxhs_select_note— match and click a note card by keywords on the current pagexhs_note_extract_content— extract full note content (title, body, tags, author, interaction stats) using API intercept with DOM fallbackxhs_note_like/xhs_note_unlike/xhs_note_collect/xhs_note_uncollect— engage with a notexhs_user_follow/xhs_user_unfollow— follow or unfollow a note's authorxhs_comment_post— post a comment on the current noteresources_listArtifacts/resources_readArtifact— read screenshots and snapshots from the artifacts storeroxy_workspaces_list/roxy_windows_list/roxy_window_create— manage RoxyBrowser workspaces and windows
Installation
Requires Node.js ≥ 18, a running RoxyBrowser instance, and a valid ROXY_API_TOKEN.
# Clone and install
git clone https://github.com/mook-wenyu/XiaoHongShuMCP
cd XiaoHongShuMCP
npm install # also installs Playwright Chromium via postinstall
# Configure
cp .env.example .env
# Set ROXY_API_TOKEN and ROXY_API_BASEURL in .env
# Start the MCP server (stdio)
npm run mcp
claude_desktop_config.json:
{
"mcpServers": {
"xiaohongshu": {
"command": "node",
"args": ["/path/to/XiaoHongShuMCP/dist/mcp/server.js"],
"env": {
"ROXY_API_TOKEN": "your-token",
"ROXY_API_BASEURL": "http://localhost:PORT"
}
}
}
}
Supported hosts
Confirmed for stdio MCP clients. Claude Desktop is the primary reference host.