XHS CLI

•
58
•

Automate login, content publishing, search, discovery, and interaction tasks on Xiaohongshu.com.

XHS CLI provides a unified command-line interface and an integrated Model Context Protocol (MCP) server for automating various interactions with Xiaohongshu.com. Leveraging Puppeteer for browser automation, it enables programmatic control over account authentication (login, logout, status), content management (image and video publishing), and discovery features like browsing feeds, searching for notes, viewing details, and commenting. It offers flexible deployment options, including Stdio and HTTP modes, making it suitable for integration into diverse client applications, such as Cursor.

Key Features

01Puppeteer-driven automation with headless mode and cookie management
022 GitHub stars
03Account authentication (login, logout, status checks)
04Content publishing (image and video posts with title, content, tags)
05Discovery features (recommended feeds, search, note details)
06Interaction capabilities (commenting on notes)

Use Cases

01Programmatically publishing content to Xiaohongshu
02Automating data collection from Xiaohongshu, such as trending feeds or search results
03Integrating Xiaohongshu automation capabilities into AI agents or other applications via MCP