Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

xhs-mcp

MCP.Pizza Chef: jobsonlook

xhs-mcp is a lightweight MCP server that uses JavaScript reverse-engineering to expose Xiaohongshu (Little Red Book) APIs without heavy browser automation. It supports searching notes, retrieving note content, fetching comments, and posting comments by directly calling HTTP endpoints. This server requires minimal dependencies and uses cookies for authentication, enabling efficient integration with MCP clients for real-time social media data access.

Use This MCP server To

Search Xiaohongshu notes by keywords Retrieve detailed content of Xiaohongshu notes Fetch comments on specific Xiaohongshu notes Post comments on Xiaohongshu notes programmatically Integrate Xiaohongshu social data into AI workflows Enable MCP clients to interact with Xiaohongshu content Automate social media monitoring on Xiaohongshu Extract user-generated content for analysis or summarization

README

小红书MCP服务

smithery badge

特点

  • 采用js逆向出x-s,x-t,直接请求http接口,无须笨重的playwright
  • 搜索笔记
  • 获取笔记内容
  • 获取笔记的评论
  • 发表评论

特性

快速开始

1. 环境

  • node
  • python 3.12
  • uv (pip install uv)

2. 安装依赖

git clone git@github.com:jobsonlook/xhs-mcp.git

cd xhs-mcp
uv sync 

3. 获取小红书的cookie

打开web小红书 登录后,获取cookie,将cookie配置到第4步的 XHS_COOKIE 环境变量中 cookie

4. 配置mcp server

{
    "mcpServers": {
        "xhs-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/xxx/xhs-mcp",
                "run",
                "main.py"
            ],
            "env": {
                "XHS_COOKIE": "xxxx"
            }
        }
    }
}

免责声明

本项目仅用于学习交流,禁止用于其他用途,任何涉及商业盈利目的均不得使用,否则风险自负。

xhs-mcp FAQ

How do I authenticate the xhs-mcp server?
You authenticate by providing your Xiaohongshu web cookie via the XHS_COOKIE environment variable.
What dependencies are required to run xhs-mcp?
Node.js, Python 3.12, and the 'uv' package installed via pip are required.
Does xhs-mcp use browser automation like Playwright?
No, it uses JavaScript reverse-engineering to call HTTP APIs directly, avoiding heavy browser automation.
Can I post comments on Xiaohongshu using this server?
Yes, xhs-mcp supports posting comments on notes through its API.
Is xhs-mcp suitable for real-time social media data integration?
Yes, it provides direct API access enabling real-time data retrieval and interaction.
How do I configure the xhs-mcp server in MCP?
Configure the server command to run 'uv' with the main.py script and set the XHS_COOKIE environment variable.
Can xhs-mcp be used with multiple MCP clients?
Yes, it is designed as a server exposing Xiaohongshu data to any MCP client.
Is the xhs-mcp server open source?
Yes, it is available on GitHub under the jobsonlook/xhs-mcp repository.