Skip to main content
Glama
proerror77
by proerror77

Xiaohongshu API MCP Server | 小红书 API 微服务

这是一个将小红书 API 封装成 RESTful API 服务器的微服务。可以使用 Docker 进行部署。

功能特点

  • RESTful API for Xiaohongshu operations | 小红书操作的 RESTful API

  • Multiple client support | 支持多客户端

  • Docker containerization | Docker 容器化

  • Easy to deploy and scale | 易于部署和扩展

Related MCP server: Xiaohongshu (Little Red Book) MCP Server

API 端点

服务器提供以下端点:

  • /clients - 创建和管理小红书客户端实例

  • /clients/{client_id}/note - 通过 ID 获取笔记

  • /clients/{client_id}/note/html - 从 HTML 通过 ID 获取笔记

  • /clients/{client_id}/search/notes - 通过关键词搜索笔记

  • /clients/{client_id}/search/users - 通过关键词搜索用户

  • /clients/{client_id}/user/info - 通过 ID 获取用户信息

  • /clients/{client_id}/user/notes - 获取用户笔记

  • /clients/{client_id}/feed/categories - 获取推荐流分类

  • /clients/{client_id}/feed/{feed_type} - 通过类型获取推荐流

  • /health - 健康检查端点

项目结构

.
├── xhs_mcp_server/     # 主服务器目录
│   ├── app/           # 应用程序核心
│   ├── xhs/          # 小红书API模块
│   ├── Dockerfile    # Docker构建文件
│   └── requirements.txt # Python依赖
└── xhs_api.py        # API实现

快速开始

前提条件

  • Docker

  • Docker Compose

安装和运行

  1. 构建并启动 Docker 容器:

cd xhs_mcp_server
docker-compose up -d

服务将在 http://localhost:8000 运行。

  1. 通过Python直接运行:

pip install -r xhs_mcp_server/requirements.txt
python xhs_api.py

API 文档

服务器运行后,您可以在以下位置访问 API 文档:

  • Swagger UI: http://localhost:8000/docs

  • ReDoc: http://localhost:8000/redoc

使用示例

  1. 创建客户端:

curl -X POST "http://localhost:8000/clients" \
  -H "Content-Type: application/json" \
  -d '{"cookie": "your_cookie_here"}'
  1. 通过 ID 获取笔记:

curl -X POST "http://localhost:8000/clients/client_1/note" \
  -H "Content-Type: application/json" \
  -d '{"note_id": "your_note_id", "xsec_token": "your_xsec_token"}'

许可证

本项目仅用于教育目的。使用风险自负。

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    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
    214
    7
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A server that allows interfacing with the Chinese social media platform Xiaohongshu through HTTP requests, enabling searching notes, retrieving note content and comments, and posting comments.
    Last updated
    8
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A lightweight MCP server that provides read-only access to Xiaohongshu (Little Red Book) data, enabling search, note details, user profiles, and trending feeds via direct HTTP APIs.
    Last updated
    27
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables automated interaction and data scraping for Xiaohongshu (RedNote), including posting, liking, commenting, following, and retrieving user and note data.
    Last updated
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • 搜索笔记、浏览首页推荐、查看笔记内容与评论,并发表你的评论。直接在工作流中与小红书内容互动,高效跟进话题。

  • Track Bilibili creators and get the latest updates on videos, dynamics, and articles. Fetch user p…

  • Official PicSee MCP server for short links, link management, click analytics, and optional OAuth.

View all MCP Connectors

Latest Blog Posts

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/proerror77/xhs_mcp_agent'

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