What blbl147-xhs-mcp does
The blbl147-xhs-mcp MCP server connects an MCP client to Xiaohongshu, also known as Little Red Book. Its documented functions cover searching notes, retrieving note content, reading comments attached to a note, and posting comments. The project description also identifies browsing homepage recommendations as a supported interaction.
This makes the server suitable for workflows that need to locate Xiaohongshu posts, inspect their text and discussion, or submit a comment. It is focused on Xiaohongshu content rather than providing a general social-media abstraction across multiple platforms.
How it works
The implementation uses JavaScript reverse engineering to obtain the x-s and x-t request values used by Xiaohongshu. It then sends requests directly to HTTP interfaces, avoiding the heavier Playwright-based browser approach described in the README.
An MCP-compatible client starts the server as a local process. In the supplied configuration, uv runs main.py from the project directory, while the server reads an authenticated Xiaohongshu cookie from its environment. Because the cookie comes from a logged-in web session, access depends on the account and session represented by that cookie.
Setup and configuration
The documented environment includes Node.js, Python 3.12, and uv. The setup flow is:
- Clone the repository.
- Change into the project directory.
- Run
uv sync to install the Python dependencies.
- Open Xiaohongshu in a browser, sign in, and obtain the site cookie.
- Set that cookie as
XHS_COOKIE in the MCP client configuration.
A stdio configuration invokes uv with --directory, the local project path, run, and main.py. Replace the example path with the directory on the host running the server. The blbl147-xhs-mcp MCP server cannot authenticate from the example configuration alone; it needs a valid cookie supplied through the environment.
Tools and capabilities
The documented operations include:
- Search Xiaohongshu notes.
- Browse homepage recommendations.
- Retrieve the contents of a note.
- Retrieve comments for a note.
- Publish a comment.
The material provided does not specify formal MCP tool names, argument schemas, return formats, pagination behavior, or support for other Xiaohongshu actions. Implementations should therefore inspect the server's exposed tool definitions before building a workflow around exact parameters.
Limitations and notes
The server requires a logged-in Xiaohongshu cookie, so session validity and account access can affect requests. Its request-signing approach depends on reverse-engineered x-s and x-t values and Xiaohongshu's HTTP interfaces; changes to those interfaces may require project updates.
The README states that the project is intended for learning and exchange, and prohibits other uses, including commercial profit-making use. Users should review those restrictions and their obligations regarding account access and posted content before deploying the blbl147-xhs-mcp MCP server.