Xiechengqi/redbook-scraper-mcp-server
3.1
If you are the rightful owner of redbook-scraper-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This is a FastMCP and FastAPI-based Xiaohongshu note search and content retrieval service.
Tools
3
Resources
0
Prompts
0
小红书搜索MCP服务
这是一个基于FastMCP和FastAPI的小红书笔记搜索和内容获取服务。
功能特性
- 🔍 笔记搜索: 根据关键词搜索小红书笔记
- 📄 内容获取: 获取指定笔记的详细内容
- 🔐 登录管理: 管理小红书账号登录状态
- 🌐 FastAPI接口: 提供RESTful API接口
- 🔧 MCP工具: 支持MCP协议的工具调用
安装
bash run.sh
Web Terminal
Chromium
FastAPI
启动FastAPI服务器后,访问以下地址查看API文档:
- Swagger UI: http://localhost:18000/docs
- ReDoc: http://localhost:18000/redoc
健康检查
GET /api/health
登录
POST /api/login
搜索笔记
POST /api/search
Content-Type: application/json
{
"keywords": "搜索关键词",
"limit": 30
}
响应示例:
{
"success": true,
"data": [
{
"url": "https://www.xiaohongshu.com/explore/...",
"title": "笔记标题"
}
],
"message": "成功搜索到 10 条结果"
}
获取笔记内容
POST /api/note-content
Content-Type: application/json
{
"url": "https://www.xiaohongshu.com/explore/..."
}
响应示例:
{
"success": true,
"data": "标题: ...\n作者: ...\n发布时间: ...\n\n内容: ...",
"message": "成功获取笔记内容"
}
MCP
项目提供了以下MCP工具:
- login() - 登录小红书账号
- search_notes(keywords, limit) - 搜索笔记
- get_note_content(url) - 获取笔记内容
Streamable HTTP 启动
默认情况下,MCP 服务使用 Streamable HTTP 方式对外暴露,可以通过以下环境变量自定义:
MCP_TRANSPORT:默认http,其他可选项stdioMCP_STREAM_HOST:默认0.0.0.0MCP_STREAM_PORT:默认3333
这样即可让 Cursor Agent 等客户端通过 Streamable HTTP 连接当前 MCP 服务。
cursor-agent + mcp
注意事项
- 确保 docker 预先安装
- 首次使用需要登录小红书账号
免责声明
本项目仅供学习与技术研究使用,禁止用于任何商业目的或违反当地法律法规的场景。使用者需自行承担因使用本项目产生的一切风险与责任。
许可证
MIT License