Xiaohongshu

Provides automated Xiaohongshu login, search, content retrieval, and smart commenting via MCP
  • python

95

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jonafly-rednotemcp": {
      "command": "python",
      "args": [
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/xiaohongshu_mcp.py",
        "--stdio"
      ]
    }
  }
}

You have a Python-based MCP Server that automates searching, retrieving, and commenting on Xiaohongshu notes. It logs in, searches with keywords, fetches note content and comments, and can post smart comments to boost interaction. This server helps you integrate Xiaohongshu automation directly into your MCP Client workflows for streamlined, repeatable actions.

How to use

To use this MCP Server with your MCP Client, configure the client to load the server, then start the workflow you need. You can login once and reuse the session, search for notes by keywords, fetch note content and comments, and publish smart comments of various types to engage with posts.

How to install

Prerequisites: ensure Python 3.8 or newer is installed on your system.

Install Python if needed from the official Python website.

Acquire the project files by cloning or downloading the package to your local machine.

Install required dependencies from the project directory.

pip install -r requirements.txt

Additional sections

MCP Server configuration is provided as a stdio-based local server. You will run the server process locally and connect it to your MCP Client through the specified command and arguments.

The following configuration snippet demonstrates how to register this MCP Server with a MCP Client. Adjust the absolute path to the xiaohongshu_mcp.py file on your system.

"mcpServers": {
  "xiaohongshu MCP": {
    "command": "python",
    "args": [
      "/ABSOLUTE/PATH/TO/PARENT/FOLDER/xiaohongshu_mcp.py",
      "--stdio"
    ]
  }
}

Notes and tips

First-time login requires manual QR code scanning; after a successful login, the session is saved for subsequent uses.

The tool uses Playwright to automate the browser. It opens a real browser window in non-headless mode during operation.

To avoid account risks, comply with Xiaohongshu rules and avoid excessive automation, especially during login and content interactions.

Available tools

login

Automates login via manual QR code scanning on first run and preserves session for subsequent uses.

search_notes

Search notes using a keyword and return a specified number of results.

get_note_content

Fetch the detailed content of a Xiaohongshu note given its URL.

get_note_comments

Retrieve comments for a Xiaohongshu note given its URL.

post_smart_comment

Publish a smart comment on a note with a chosen type to drive engagement or convey expertise.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational