Skip to content
Back to search

RedNote-MCP

🚀MCP server for accessing RedNote(XiaoHongShu, xhs).

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ifuryst--rednote-mcp/badge.svg)](/listings/ifuryst--rednote-mcp)

HTML

<a href="/listings/ifuryst--rednote-mcp"><img src="/api/listings/ifuryst--rednote-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 167 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # RedNote MCP
  2. [![English](https://img.shields.io/badge/English-Click-yellow)](docs/README.en.md)
  3. [![简体中文](https://img.shields.io/badge/简体中文-点击查看-orange)](README.md)
  4. [![npm](https://img.shields.io/npm/v/rednote-mcp)](https://www.npmjs.com/package/rednote-mcp)
  5. 小红书内容访问的MCP服务
  6. https://github.com/user-attachments/assets/06b2c67f-d9ed-4a30-8f1d-9743f3edaa3a
  7. ## 快速开始
  8. 开始前确保安装了 [playwright](https://github.com/microsoft/playwright) 环境:
  9. ```bash
  10. npx playwright install
  11. ```
  12. ### NPM 全局安装
  13. ```bash
  14. # 全局安装
  15. npm install -g rednote-mcp
  16. # 初始化登录,会自动记录cookie到 ~/.mcp/rednote/cookies.json
  17. rednote-mcp init
  18. ```
  19. ### 从源码安装
  20. ```bash
  21. # 克隆项目
  22. git clone https://github.com/ifuryst/rednote-mcp.git
  23. cd rednote-mcp
  24. # 安装依赖
  25. npm install
  26. # 全局安装(可选,方便命令行调用)
  27. npm install -g .
  28. # 或者直接运行,如初始化登录
  29. npm run dev -- init
  30. ```
  31. ## 功能特性
  32. - 认证管理(支持 Cookie 持久化)
  33. - 关键词搜索笔记
  34. - 命令行初始化工具
  35. - 通过 URL 访问笔记内容
  36. - [ ] 通过 URL 访问评论内容
  37. ## 使用说明
  38. ### 1. 初始化登录
  39. 首次使用需要先进行登录初始化:
  40. ```bash
  41. rednote-mcp init
  42. # 或者直接从源码run
  43. npm run dev -- init
  44. # 或者mcp-client里选择login
  45. ```
  46. 执行此命令后:
  47. 1. 会自动打开浏览器窗口
  48. 2. 跳转到小红书登录页面
  49. 3. 请手动完成登录操作
  50. 4. 登录成功后会自动保存 Cookie 到 `~/.mcp/rednote/cookies.json` 文件
  51. ### 2. 在 Cursor 中配置 MCP Server
  52. 在 Cursor 的 settings.json 中添加以下配置:
  53. ```json
  54. {
  55. "mcpServers": {
  56. "RedNote MCP": {
  57. "command": "rednote-mcp",
  58. "args": [
  59. "--stdio"
  60. ]
  61. }
  62. }
  63. }
  64. ```
  65. 或者使用 npx 方式:
  66. ```json
  67. {
  68. "mcpServers": {
  69. "RedNote MCP": {
  70. "command": "npx",
  71. "args": [
  72. "rednote-mcp",
  73. "--stdio"
  74. ]
  75. }
  76. }
  77. }
  78. ```
  79. 配置说明:
  80. - `command`: 可以是全局安装后的 `rednote-mcp` 命令,或使用 `npx` 直接运行
  81. - `args`: 必须包含 `--stdio` 参数以支持 Cursor 的通信方式
  82. ## 开发指南
  83. ### 环境要求
  84. - Node.js >= 16
  85. - npm >= 7
  86. ### 开发流程
  87. ```bash
  88. # 安装依赖
  89. npm install
  90. # 构建项目
  91. npm run build
  92. # 开发模式运行
  93. npm run dev
  94. # 运行测试
  95. npm test
  96. ```
  97. ### 使用 MCP Inspector 进行调试
  98. MCP Inspector 是一个用于调试 MCP 服务器的工具,可以帮助开发者检查和验证 MCP 服务器的行为。使用以下命令启动:
  99. ```bash
  100. npx @modelcontextprotocol/inspector npx rednote-mcp --stdio
  101. ```
  102. 这个命令会:
  103. 1. 启动 MCP Inspector 工具
  104. 2. 通过 Inspector 运行 rednote-mcp 服务
  105. 3. 提供一个交互式界面来检查请求和响应
  106. 4. 帮助调试和验证 MCP 协议的实现
  107. ## 注意事项
  108. 1. 首次使用必须执行 `init` 命令进行登录
  109. 2. Cookie 文件包含敏感信息,避免泄露
  110. 3. 建议定期更新 Cookie,避免失效
  111. 4. 确保已正确安装 Node.js 环境
  112. ## 贡献指南
  113. 1. Fork 本仓库
  114. 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
  115. 3. 提交你的改动 (`git commit -m 'Add some AmazingFeature'`)
  116. 4. 推送到分支 (`git push origin feature/AmazingFeature`)
  117. 5. 开启一个 Pull Request
  118. ## 许可证
  119. MIT License - 详见 [LICENSE](LICENSE) 文件

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.