Skip to main content
Glama

Xiaohongshu (Little Red Book) MCP Server

by fancyboi999

自动化小红书MCP服务器

这是一个基于MCP的小红书内容创作和管理工具,可以帮助你自动化小红书内容平台的操作,包括搜索笔记、发布笔记、评论等功能。

功能特点

  • 🔍 搜索小红书笔记内容

  • 📝 发布图文/视频笔记

  • 💬 自动评论笔记

  • 🏠 获取首页推荐内容

  • 🔐 支持账号登录与验证

快速开始

1. 环境要求

  • node.js

  • python 3.12

  • uv (pip install uv)

2. 安装依赖

git clone https://github.com/fancyboi999/xhs-auto-mcp.git cd xhs-auto-mcp uv venv source .venv/bin/activate uv pip install -e .

3. 获取小红书的cookie

打开网页端小红书 登录后,获取内容平台的cookie,将cookie配置到MCP服务的 XHS_COOKIE 环境变量中 获取cookie教程

4. 配置MCP服务

有两种方式可以配置和启动MCP服务,环境变量JSON_PATH 是用于存储创作平台token与cookie,因此请填写绝对路径:

方式一:使用stdio协议(直接连接)

在Claude配置中添加以下内容:

{ "mcpServers": { "xhs-auto-mcp": { "command": "uvx", "args": ["xhs-auto-mcp", "--transport", "stdio"], "env": { "XHS_COOKIE": "xxxx", "JSON_PATH": "your_token_save_path" } } } }

方式二:使用HTTP协议

  1. 启动HTTP服务:

env XHS_COOKIE=xxxx JSON_PATH=your_token_save_path uvx xhs-auto-mcp --transport http --port 8080
  1. 在Claude配置中添加以下内容:

{ "mcpServers": { "xhs-auto-mcp": { "type": "http", "url": "http://localhost:8080/mcp" } } }

工具使用说明

本项目提供了多种工具来操作小红书平台:

可用工具

内容平台工具

  • 检查cookie有效性: 验证当前cookie是否有效

  • 获取首页推荐笔记: 获取小红书首页推荐内容

  • 搜索笔记: 根据关键词搜索笔记

  • 获取笔记内容: 获取指定笔记的详细内容

  • 获取笔记评论: 获取指定笔记的评论

  • 发表评论: 对指定笔记发表评论

创作平台工具

  • 登录: 通过手机号和验证码登录小红书创作平台

  • 发布图文笔记: 创建并发布包含图片的笔记

  • 发布视频笔记: 创建并发布包含视频的笔记

示例视频

查看演示视频了解如何使用本工具:演示视频

免责声明

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

-
security - not tested
F
license - not found
-
quality - not tested

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    A server that enables access to Xiaohongshu (Little Red Book) content, allowing users to search for notes and retrieve content via URLs with authentication management and cookie persistence.
    Last updated -
    33
    7
    MIT License
  • -
    security
    F
    license
    -
    quality
    A microservice that wraps Xiaohongshu (Little Red Book) API into a RESTful API server, enabling users to perform various operations on the platform such as retrieving notes, searching users and content, and accessing user information.
    Last updated -
    17
  • -
    security
    F
    license
    -
    quality
    A simple HTTP API server that allows users to publish articles, create answers, manage columns, and upload images on Zhihu (a Chinese Q&A platform) through straightforward REST API endpoints.
    Last updated -
    3
  • A
    security
    A
    license
    A
    quality
    Enables users to search and retrieve content from Xiaohongshu (Red Book) platform with smart search capabilities and rich data extraction including note content, author information, and images.
    Last updated -
    1
    33
    13
    MIT License
    • Apple
    • Linux

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fancyboi999/xhs-auto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server