home / mcp / xiaohongshu mcp server

Xiaohongshu MCP Server

Provides MCP-based access to Xiaohongshu login, publishing, data collection and AI-driven analysis

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aki66938-xhs-toolkit": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/xhs-toolkit",
        "run",
        "python",
        "-m",
        "src.server.mcp_server",
        "--stdio"
      ],
      "env": {
        "PYTHONPATH": "/path/to/xhs-toolkit"
      }
    }
  }
}

You can run an MCP server that lets you control Xiaohongshu actions through AI clients. This server enables login, content publishing, data collection and AI-assisted analysis via the MCP protocol, so you can automate tasks like posting notes, gathering analytics, and coordinating with AI tooling without leaking into manual workflows.

How to use

You will connect your MCP client (such as Claude Desktop or CherryStudio) to the Xiaohongshu MCP server to perform actions through natural language prompts. Use the intelligent login, publishing, data collection and analysis tools to automate workflows. The server exposes a set of MCP endpoints you can invoke from your AI client, and it supports both local (stdio) and remote (http) configurations depending on how you prefer to run it.

How to install

Prerequisites you need before starting: Python and your chosen MCP client installed on your machine. You also need a compatible environment for running the MCP server and for the client integration.

Step-by-step setup to run the MCP server locally using the provided stdio configuration examples:

Additional setup and configuration

Configure the client to connect to the MCP server. You will typically specify the server as a local stdio process so the client communicates via standard input/output, or point to a remote HTTP endpoint if you host the server elsewhere.

Available tools

test_connection

Test the MCP connection to ensure the server is reachable from the MCP client.

smart_publish_note

Publish Xiaohongshu notes with title, content, images or videos, and optional topics.

check_task_status

Check the status of an ongoing publish task by its task_id.

get_task_result

Retrieve the result of a completed publish task.

login_xiaohongshu

Perform an automated login to Xiaohongshu via MCP without manual interaction.

get_creator_data_analysis

Fetch creator data for AI-based analysis and insights.