feat: add instructions for cline mcp setup (#149)
This commit is contained in:
71
README.md
71
README.md
@@ -1,7 +1,9 @@
|
|||||||
# xiaohongshu-mcp
|
# xiaohongshu-mcp
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
MCP for 小红书/xiaohongshu.com。
|
MCP for 小红书/xiaohongshu.com。
|
||||||
@@ -43,6 +45,7 @@ https://github.com/user-attachments/assets/bd9a9a4a-58cb-4421-b8f3-015f703ce1f9
|
|||||||
支持两种图片输入方式:
|
支持两种图片输入方式:
|
||||||
|
|
||||||
1. **HTTP/HTTPS 图片链接**
|
1. **HTTP/HTTPS 图片链接**
|
||||||
|
|
||||||
```
|
```
|
||||||
["https://example.com/image1.jpg", "https://example.com/image2.png"]
|
["https://example.com/image1.jpg", "https://example.com/image2.png"]
|
||||||
```
|
```
|
||||||
@@ -53,6 +56,7 @@ https://github.com/user-attachments/assets/bd9a9a4a-58cb-4421-b8f3-015f703ce1f9
|
|||||||
```
|
```
|
||||||
|
|
||||||
**为什么推荐使用本地路径:**
|
**为什么推荐使用本地路径:**
|
||||||
|
|
||||||
- ✅ 稳定性更好,不依赖网络
|
- ✅ 稳定性更好,不依赖网络
|
||||||
- ✅ 上传速度更快
|
- ✅ 上传速度更快
|
||||||
- ✅ 避免图片链接失效问题
|
- ✅ 避免图片链接失效问题
|
||||||
@@ -150,6 +154,7 @@ https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
|
|||||||
- 这些参数可以从 Feed 列表或搜索结果中获取
|
- 这些参数可以从 Feed 列表或搜索结果中获取
|
||||||
|
|
||||||
**返回信息包括:**
|
**返回信息包括:**
|
||||||
|
|
||||||
- 用户基本信息:昵称、简介、头像、认证状态
|
- 用户基本信息:昵称、简介、头像、认证状态
|
||||||
- 统计数据:关注数、粉丝数、获赞量、笔记数
|
- 统计数据:关注数、粉丝数、获赞量、笔记数
|
||||||
- 笔记列表:用户发布的所有公开笔记
|
- 笔记列表:用户发布的所有公开笔记
|
||||||
@@ -499,6 +504,59 @@ npx @modelcontextprotocol/inspector
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Cline</b></summary>
|
||||||
|
|
||||||
|
Cline 是一个强大的 AI 编程助手,支持 MCP 协议集成。
|
||||||
|
|
||||||
|
#### 配置方法
|
||||||
|
|
||||||
|
在 Cline 的 MCP 设置中添加以下配置:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"xiaohongshu-mcp": {
|
||||||
|
"url": "http://localhost:18060/mcp",
|
||||||
|
"type": "streamableHttp",
|
||||||
|
"autoApprove": [],
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 使用步骤
|
||||||
|
|
||||||
|
1. 确保小红书 MCP 服务正在运行(`http://localhost:18060/mcp`)
|
||||||
|
2. 在 Cline 中打开 MCP 设置
|
||||||
|
3. 添加上述配置到 MCP 服务器列表
|
||||||
|
4. 保存配置并重启 Cline
|
||||||
|
5. 在对话中可以直接使用小红书相关功能
|
||||||
|
|
||||||
|
#### 配置说明
|
||||||
|
|
||||||
|
- `url`: MCP 服务地址
|
||||||
|
- `type`: 使用 `streamableHttp` 类型以获得更好的性能
|
||||||
|
- `autoApprove`: 可配置自动批准的工具列表(留空表示手动批准)
|
||||||
|
- `disabled`: 设置为 `false` 启用此 MCP 服务
|
||||||
|
|
||||||
|
#### 使用示例
|
||||||
|
|
||||||
|
配置完成后,可以在 Cline 中直接使用自然语言操作小红书:
|
||||||
|
|
||||||
|
```
|
||||||
|
帮我检查小红书登录状态
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
帮我发布一篇关于春天的图文到小红书,使用这张图片:/path/to/spring.jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
搜索小红书上关于"美食"的内容
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>其他支持 HTTP MCP 的客户端</b></summary>
|
<summary><b>其他支持 HTTP MCP 的客户端</b></summary>
|
||||||
|
|
||||||
@@ -522,7 +580,7 @@ npx @modelcontextprotocol/inspector
|
|||||||
|
|
||||||
- `check_login_status` - 检查小红书登录状态(无参数)
|
- `check_login_status` - 检查小红书登录状态(无参数)
|
||||||
- `publish_content` - 发布图文内容到小红书(必需:title, content, images)
|
- `publish_content` - 发布图文内容到小红书(必需:title, content, images)
|
||||||
- `images`: 支持HTTP链接或本地绝对路径,推荐使用本地路径
|
- `images`: 支持 HTTP 链接或本地绝对路径,推荐使用本地路径
|
||||||
- `list_feeds` - 获取小红书首页推荐列表(无参数)
|
- `list_feeds` - 获取小红书首页推荐列表(无参数)
|
||||||
- `search_feeds` - 搜索小红书内容(需要:keyword)
|
- `search_feeds` - 搜索小红书内容(需要:keyword)
|
||||||
- `get_feed_detail` - 获取帖子详情(需要:feed_id, xsec_token)
|
- `get_feed_detail` - 获取帖子详情(需要:feed_id, xsec_token)
|
||||||
@@ -533,7 +591,8 @@ npx @modelcontextprotocol/inspector
|
|||||||
|
|
||||||
使用 Claude Code 发布内容到小红书:
|
使用 Claude Code 发布内容到小红书:
|
||||||
|
|
||||||
**示例1:使用HTTP图片链接**
|
**示例 1:使用 HTTP 图片链接**
|
||||||
|
|
||||||
```
|
```
|
||||||
帮我写一篇帖子发布到小红书上,
|
帮我写一篇帖子发布到小红书上,
|
||||||
配图为:https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
|
配图为:https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
|
||||||
@@ -542,7 +601,8 @@ npx @modelcontextprotocol/inspector
|
|||||||
使用 xiaohongshu-mcp 进行发布。
|
使用 xiaohongshu-mcp 进行发布。
|
||||||
```
|
```
|
||||||
|
|
||||||
**示例2:使用本地图片路径(推荐)**
|
**示例 2:使用本地图片路径(推荐)**
|
||||||
|
|
||||||
```
|
```
|
||||||
帮我写一篇关于春天的帖子发布到小红书上,
|
帮我写一篇关于春天的帖子发布到小红书上,
|
||||||
使用这些本地图片:
|
使用这些本地图片:
|
||||||
@@ -567,7 +627,7 @@ npx @modelcontextprotocol/inspector
|
|||||||
1. **[n8n 完整集成教程](./examples/n8n/README.md)** - 工作流自动化平台集成
|
1. **[n8n 完整集成教程](./examples/n8n/README.md)** - 工作流自动化平台集成
|
||||||
2. **[Cherry Studio 完整配置教程](./examples/cherrystudio/README.md)** - AI 客户端完美接入
|
2. **[Cherry Studio 完整配置教程](./examples/cherrystudio/README.md)** - AI 客户端完美接入
|
||||||
3. **[Claude Code + Kimi K2 接入教程](./examples/claude-code/claude-code-kimi-k2.md)** - Claude Code 门槛太高,那么就接入 Kimi 国产大模型吧~
|
3. **[Claude Code + Kimi K2 接入教程](./examples/claude-code/claude-code-kimi-k2.md)** - Claude Code 门槛太高,那么就接入 Kimi 国产大模型吧~
|
||||||
4. **[AnythingLLM 完整指南](./examples/anythingLLM/readme.md)** - AnythingLLM 是一款all-in-one 多模态 AI 客户端,支持workflow定义,支持多种大模型和插件扩展。
|
4. **[AnythingLLM 完整指南](./examples/anythingLLM/readme.md)** - AnythingLLM 是一款 all-in-one 多模态 AI 客户端,支持 workflow 定义,支持多种大模型和插件扩展。
|
||||||
|
|
||||||
> 🎯 **提示**: 点击上方链接查看详细的图文教程,快速上手各种集成方案!
|
> 🎯 **提示**: 点击上方链接查看详细的图文教程,快速上手各种集成方案!
|
||||||
>
|
>
|
||||||
@@ -616,9 +676,6 @@ npx @modelcontextprotocol/inspector
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 两列排布:飞书二群 | 微信群 -->
|
<!-- 两列排布:飞书二群 | 微信群 -->
|
||||||
|
|
||||||
| 【飞书二群】:扫码进入 | 【微信群 5 群】:扫码进入 |
|
| 【飞书二群】:扫码进入 | 【微信群 5 群】:扫码进入 |
|
||||||
|
|||||||
74
README_EN.md
74
README_EN.md
@@ -1,6 +1,9 @@
|
|||||||
# xiaohongshu-mcp
|
# xiaohongshu-mcp
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
MCP for RedNote (Xiaohongshu) platform.
|
MCP for RedNote (Xiaohongshu) platform.
|
||||||
@@ -40,6 +43,7 @@ Supports publishing image and text content to RedNote, including title, content
|
|||||||
Supports two image input methods:
|
Supports two image input methods:
|
||||||
|
|
||||||
1. **HTTP/HTTPS Image Links**
|
1. **HTTP/HTTPS Image Links**
|
||||||
|
|
||||||
```
|
```
|
||||||
["https://example.com/image1.jpg", "https://example.com/image2.png"]
|
["https://example.com/image1.jpg", "https://example.com/image2.png"]
|
||||||
```
|
```
|
||||||
@@ -50,6 +54,7 @@ Supports two image input methods:
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Why Local Paths are Recommended:**
|
**Why Local Paths are Recommended:**
|
||||||
|
|
||||||
- ✅ Better stability, not dependent on network
|
- ✅ Better stability, not dependent on network
|
||||||
- ✅ Faster upload speed
|
- ✅ Faster upload speed
|
||||||
- ✅ Avoid image link expiration issues
|
- ✅ Avoid image link expiration issues
|
||||||
@@ -147,6 +152,7 @@ Get RedNote user's personal profile information, including basic user informatio
|
|||||||
- These parameters can be obtained from Feed list or search results
|
- These parameters can be obtained from Feed list or search results
|
||||||
|
|
||||||
**Returned Information Includes:**
|
**Returned Information Includes:**
|
||||||
|
|
||||||
- User basic info: nickname, bio, avatar, verification status
|
- User basic info: nickname, bio, avatar, verification status
|
||||||
- Statistics: following count, follower count, likes count, note count
|
- Statistics: following count, follower count, likes count, note count
|
||||||
- Note list: all public notes published by the user
|
- Note list: all public notes published by the user
|
||||||
@@ -190,18 +196,21 @@ Results after about a week
|
|||||||
Download pre-compiled binaries for your platform directly from [GitHub Releases](https://github.com/xpzouying/xiaohongshu-mcp/releases):
|
Download pre-compiled binaries for your platform directly from [GitHub Releases](https://github.com/xpzouying/xiaohongshu-mcp/releases):
|
||||||
|
|
||||||
**Main Program (MCP Service):**
|
**Main Program (MCP Service):**
|
||||||
|
|
||||||
- **macOS Apple Silicon**: `xiaohongshu-mcp-darwin-arm64`
|
- **macOS Apple Silicon**: `xiaohongshu-mcp-darwin-arm64`
|
||||||
- **macOS Intel**: `xiaohongshu-mcp-darwin-amd64`
|
- **macOS Intel**: `xiaohongshu-mcp-darwin-amd64`
|
||||||
- **Windows x64**: `xiaohongshu-mcp-windows-amd64.exe`
|
- **Windows x64**: `xiaohongshu-mcp-windows-amd64.exe`
|
||||||
- **Linux x64**: `xiaohongshu-mcp-linux-amd64`
|
- **Linux x64**: `xiaohongshu-mcp-linux-amd64`
|
||||||
|
|
||||||
**Login Tool:**
|
**Login Tool:**
|
||||||
|
|
||||||
- **macOS Apple Silicon**: `xiaohongshu-login-darwin-arm64`
|
- **macOS Apple Silicon**: `xiaohongshu-login-darwin-arm64`
|
||||||
- **macOS Intel**: `xiaohongshu-login-darwin-amd64`
|
- **macOS Intel**: `xiaohongshu-login-darwin-amd64`
|
||||||
- **Windows x64**: `xiaohongshu-login-windows-amd64.exe`
|
- **Windows x64**: `xiaohongshu-login-windows-amd64.exe`
|
||||||
- **Linux x64**: `xiaohongshu-login-linux-amd64`
|
- **Linux x64**: `xiaohongshu-login-linux-amd64`
|
||||||
|
|
||||||
Usage Steps:
|
Usage Steps:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. First run the login tool
|
# 1. First run the login tool
|
||||||
chmod +x xiaohongshu-login-darwin-arm64
|
chmod +x xiaohongshu-login-darwin-arm64
|
||||||
@@ -245,12 +254,14 @@ For Windows issues, check here first: [Windows Installation Guide](./docs/window
|
|||||||
First time requires manual login to save RedNote login status.
|
First time requires manual login to save RedNote login status.
|
||||||
|
|
||||||
**Using Binary Files:**
|
**Using Binary Files:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run the login tool for your platform
|
# Run the login tool for your platform
|
||||||
./xiaohongshu-login-darwin-arm64
|
./xiaohongshu-login-darwin-arm64
|
||||||
```
|
```
|
||||||
|
|
||||||
**Using Source Code:**
|
**Using Source Code:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go run cmd/login/main.go
|
go run cmd/login/main.go
|
||||||
```
|
```
|
||||||
@@ -260,6 +271,7 @@ go run cmd/login/main.go
|
|||||||
Start xiaohongshu-mcp service.
|
Start xiaohongshu-mcp service.
|
||||||
|
|
||||||
**Using Binary Files:**
|
**Using Binary Files:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Default: Headless mode, no browser interface
|
# Default: Headless mode, no browser interface
|
||||||
./xiaohongshu-mcp-darwin-arm64
|
./xiaohongshu-mcp-darwin-arm64
|
||||||
@@ -269,6 +281,7 @@ Start xiaohongshu-mcp service.
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Using Source Code:**
|
**Using Source Code:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Default: Headless mode, no browser interface
|
# Default: Headless mode, no browser interface
|
||||||
go run .
|
go run .
|
||||||
@@ -483,6 +496,59 @@ Usage steps:
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Cline</b></summary>
|
||||||
|
|
||||||
|
Cline is a powerful AI programming assistant that supports MCP protocol integration.
|
||||||
|
|
||||||
|
#### Configuration Method
|
||||||
|
|
||||||
|
Add the following configuration to Cline's MCP settings:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"xiaohongshu-mcp": {
|
||||||
|
"url": "http://localhost:18060/mcp",
|
||||||
|
"type": "streamableHttp",
|
||||||
|
"autoApprove": [],
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Usage Steps
|
||||||
|
|
||||||
|
1. Ensure RedNote MCP service is running (`http://localhost:18060/mcp`)
|
||||||
|
2. Open MCP settings in Cline
|
||||||
|
3. Add the above configuration to the MCP server list
|
||||||
|
4. Save configuration and restart Cline
|
||||||
|
5. You can directly use RedNote-related features in conversations
|
||||||
|
|
||||||
|
#### Configuration Explanation
|
||||||
|
|
||||||
|
- `url`: MCP service address
|
||||||
|
- `type`: Use `streamableHttp` type for better performance
|
||||||
|
- `autoApprove`: Configurable auto-approve tool list (empty means manual approval)
|
||||||
|
- `disabled`: Set to `false` to enable this MCP service
|
||||||
|
|
||||||
|
#### Usage Examples
|
||||||
|
|
||||||
|
After configuration, you can use natural language to operate RedNote directly in Cline:
|
||||||
|
|
||||||
|
```
|
||||||
|
Help me check RedNote login status
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Help me publish a spring-themed image-text post to RedNote, using this image: /path/to/spring.jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Search for content about "food" on RedNote
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Other HTTP MCP Supporting Clients</b></summary>
|
<summary><b>Other HTTP MCP Supporting Clients</b></summary>
|
||||||
|
|
||||||
@@ -518,6 +584,7 @@ After successful connection, you can use the following MCP tools:
|
|||||||
Using Claude Code to publish content to RedNote:
|
Using Claude Code to publish content to RedNote:
|
||||||
|
|
||||||
**Example 1: Using HTTP Image Links**
|
**Example 1: Using HTTP Image Links**
|
||||||
|
|
||||||
```
|
```
|
||||||
Help me write a post to publish on RedNote,
|
Help me write a post to publish on RedNote,
|
||||||
with image: https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
|
with image: https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
|
||||||
@@ -527,6 +594,7 @@ Use xiaohongshu-mcp for publishing.
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Example 2: Using Local Image Paths (Recommended)**
|
**Example 2: Using Local Image Paths (Recommended)**
|
||||||
|
|
||||||
```
|
```
|
||||||
Help me write a post about spring to publish on RedNote,
|
Help me write a post about spring to publish on RedNote,
|
||||||
using these local images:
|
using these local images:
|
||||||
@@ -590,7 +658,6 @@ Switched to Feishu group, scan QR code to join directly
|
|||||||
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| <img src="https://github.com/user-attachments/assets/ca1f5d6e-b1bf-4c15-9975-ff75f339ec9b" alt="qrcode_2qun" width="300"> | <img src="https://github.com/user-attachments/assets/7665056d-be56-4bf3-a9f3-77f967079929" alt="WechatIMG119" width="300"> |
|
| <img src="https://github.com/user-attachments/assets/ca1f5d6e-b1bf-4c15-9975-ff75f339ec9b" alt="qrcode_2qun" width="300"> | <img src="https://github.com/user-attachments/assets/7665056d-be56-4bf3-a9f3-77f967079929" alt="WechatIMG119" width="300"> |
|
||||||
|
|
||||||
|
|
||||||
## 🙏 Thanks to Contributors ✨
|
## 🙏 Thanks to Contributors ✨
|
||||||
|
|
||||||
Thanks to all friends who have contributed to this project! (In no particular order)
|
Thanks to all friends who have contributed to this project! (In no particular order)
|
||||||
@@ -616,13 +683,10 @@ Thanks to all friends who have contributed to this project! (In no particular or
|
|||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
|
||||||
|
|
||||||
### ✨ Special Thanks
|
### ✨ Special Thanks
|
||||||
|
|
||||||
| Contributors |
|
| Contributors |
|
||||||
| --- |
|
| --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| [<img src="https://avatars.githubusercontent.com/wanpengxie" width="100px;"><br>@wanpengxie](https://github.com/wanpengxie) |
|
| [<img src="https://avatars.githubusercontent.com/wanpengxie" width="100px;"><br>@wanpengxie](https://github.com/wanpengxie) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||||
Reference in New Issue
Block a user