This server connects Claude directly to Xiaohongshu (Little Red Book), China's lifestyle and social commerce platform. It exposes tools to search notes, browse the homepage feed, fetch note content and comments, and post your own comments. The implementation uses JavaScript reverse engineering to generate the required x-s and x-t parameters for HTTP requests instead of relying on browser automation. You'll need to grab your cookie from the web interface and pass it as an environment variable. Useful if you're monitoring trending topics, tracking brand mentions, or managing community engagement on Xiaohongshu without leaving your workflow.

git clone git@github.com:jobsonlook/xhs-mcp.git
cd xhs-mcp
uv sync
打开web小红书
登录后,获取cookie,将cookie配置到第4步的 XHS_COOKIE 环境变量中

{
"mcpServers": {
"xhs-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/xxx/xhs-mcp",
"run",
"main.py"
],
"env": {
"XHS_COOKIE": "xxxx"
}
}
}
}
本项目仅用于学习交流,禁止用于其他用途,任何涉及商业盈利目的均不得使用,否则风险自负。