Xiaohongshu

v1.0.0Business Applicationsstable

xiaohongshu-mcp-python 是一个基于现代 Python 技术栈开发的小红书内容自动化发布工具,通过 Model Context Protocol(MCP)协议为 AI 客户端提供强大的小红书操作能力。项目核心功能包括小红书账户登录管理、图文内容发布、视频内容发布、内容搜索与获取、帖子详情查看以及评论互动等。支持多种图片格式(JPG、PNG、GIF)和视频格式(MP4、MOV、AVI),既可处理本地文件路径,也支持 HTTP/HTTPS 链接,为用户提供灵活的内容发布方案。 该

xiaohongshu-mcp-pythonmcpai-integration
Share:
112
Stars
0
Downloads
0
Weekly
0/5

What is Xiaohongshu?

Xiaohongshu is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to xiaohongshu-mcp-python 是一个基于现代 python 技术栈开发的小红书内容自动化发布工具,通过 model context protocol(mcp)协议为 ai 客户端提供强大的小红书操作能力。项目核心功能包括小红书账户登录管理、图文内容发布、视频内容发布、内容搜索与获取、帖子详情查看以及评论互动等。支持多种图片格式(jpg、png、gif)和视频格式(mp4、mov、a...

xiaohongshu-mcp-python 是一个基于现代 Python 技术栈开发的小红书内容自动化发布工具,通过 Model Context Protocol(MCP)协议为 AI 客户端提供强大的小红书操作能力。项目核心功能包括小红书账户登录管理、图文内容发布、视频内容发布、内容搜索与获取、帖子详情查看以及评论互动等。支持多种图片格式(JPG、PNG、GIF)和视频格式(MP4、MOV、AVI),既可处理本地文件路径,也支持 HTTP/HTTPS 链接,为用户提供灵活的内容发布方案。 该

This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • xiaohongshu-mcp-python 是一个基于现代 Python 技术栈开发的小红书内容自动化发布工具,通过

Use Cases

Automate content publishing to Xiaohongshu (Little Red Book) platform.
Upload and manage image and video content with flexible format support.
Automate social media workflow including search and comments.
luyike221

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx xiaohongshu-mcp-python

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Xiaohongshu

The Xiaohongshu MCP server is a comprehensive AI-driven social media automation platform for the Xiaohongshu (Little Red Book) platform, implemented in Python with FastMCP. It provides browser automation tools via Playwright to publish image and video posts, search content, read post details, manage account sessions, and interact through comments — all through the MCP protocol. Content creators and social media teams use it to automate their Xiaohongshu publishing workflow, letting AI agents handle content scheduling, image generation, and posting end-to-end.

Prerequisites

  • Python 3.11 or higher
  • A Xiaohongshu (Little Red Book) account with valid login credentials
  • Playwright browser automation library installed
  • An MCP-compatible AI client such as Claude Desktop
  • Optional: API keys for AI image generation services (e.g., Tongyi Wanxiang) if using the image generation modules
1

Clone the repository

Clone the xiaohongshu-mcp-python repository to your local machine. The project contains multiple sub-modules for content generation, browser automation, image generation, and video generation.

git clone https://github.com/luyike221/xiaohongshu-mcp-python.git
cd xiaohongshu-mcp-python
2

Set up a Python virtual environment

Create and activate a Python 3.11+ virtual environment, then install the required dependencies for the browser automation module.

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
cd xhs-browser-automation-mcp
pip install -e .
3

Install Playwright browsers

Playwright requires browser binaries to be installed separately. Run the Playwright install command after installing the Python package.

playwright install chromium
4

Log in to Xiaohongshu

The browser automation module handles Xiaohongshu login with session persistence. On first run you will be prompted to log in via the browser. The session cookie is saved for subsequent runs to avoid repeated logins.

5

Configure your MCP client

Add the Xiaohongshu browser automation MCP server to your MCP client configuration, pointing to the installed Python module.

{
  "mcpServers": {
    "xiaohongshu": {
      "command": "python",
      "args": ["-m", "xhs_browser_automation_mcp"],
      "cwd": "/path/to/xiaohongshu-mcp-python/xhs-browser-automation-mcp"
    }
  }
}

Xiaohongshu Examples

Client configuration

Claude Desktop configuration to run the Xiaohongshu browser automation MCP server using the local Python installation.

{
  "mcpServers": {
    "xiaohongshu": {
      "command": "python",
      "args": ["-m", "xhs_browser_automation_mcp"],
      "cwd": "/path/to/xiaohongshu-mcp-python/xhs-browser-automation-mcp"
    }
  }
}

Prompts to try

These prompts use the Xiaohongshu MCP tools to publish content and interact with the platform through your AI assistant.

- "Publish a Xiaohongshu post with title 'Morning Routine Tips' and these 3 images: /images/tip1.jpg, /images/tip2.jpg, /images/tip3.jpg"
- "Search Xiaohongshu for posts about 'minimalist home decor' and show me the top 10 results"
- "Get the details and comment count for the post at this URL: https://www.xiaohongshu.com/..."
- "Publish a video post with the file at /videos/tutorial.mp4 and the description 'How to brew the perfect cup of tea'"

Troubleshooting Xiaohongshu

Playwright browser launch fails with a missing browser error

Run `playwright install chromium` to download the required browser binaries. If running in a headless environment, ensure the necessary system dependencies for Chromium are installed (on Linux: `playwright install-deps chromium`).

Login session expires and the bot is logged out unexpectedly

The browser automation module saves session cookies for persistence, but Xiaohongshu sessions can expire or be invalidated. Re-run the login flow by deleting the saved session file and restarting the MCP server to trigger a fresh login.

Image or video upload fails during post creation

Ensure the file paths provided are absolute paths and that the files exist and are readable. Supported image formats are JPG, PNG, and GIF; supported video formats are MP4, MOV, and AVI. HTTP/HTTPS URLs are also accepted alongside local paths.

Frequently Asked Questions about Xiaohongshu

What is Xiaohongshu?

Xiaohongshu is a Model Context Protocol (MCP) server that xiaohongshu-mcp-python 是一个基于现代 python 技术栈开发的小红书内容自动化发布工具,通过 model context protocol(mcp)协议为 ai 客户端提供强大的小红书操作能力。项目核心功能包括小红书账户登录管理、图文内容发布、视频内容发布、内容搜索与获取、帖子详情查看以及评论互动等。支持多种图片格式(jpg、png、gif)和视频格式(mp4、mov、avi),既可处理本地文件路径,也支持 http/https 链接,为用户提供灵活的内容发布方案。 该 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Xiaohongshu?

Follow the installation instructions on the Xiaohongshu GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Xiaohongshu?

Xiaohongshu works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Xiaohongshu free to use?

Yes, Xiaohongshu is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Xiaohongshu Alternatives — Similar Business Applications Servers

Looking for alternatives to Xiaohongshu? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.

n8n

189.1k

A comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou

LobeHub

77.5k

🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.

Jeecgboot

46.4k

AI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。

CowAgent

44.7k

CowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。

Minds Platform

39.2k

Platform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.

Astrbot

32.8k

AI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨

Browse More Business Applications MCP Servers

Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "xiaohongshu-mcp-python": { "command": "npx", "args": ["-y", "xiaohongshu-mcp-python"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Xiaohongshu?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides