diff --git a/README_EN.md b/README_EN.md index 4fae485..d1ca24b 100644 --- a/README_EN.md +++ b/README_EN.md @@ -2,7 +2,7 @@ -[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-27-orange.svg?style=flat-square)](#contributors-) @@ -10,15 +10,32 @@ [![Gratitude](https://img.shields.io/badge/Gratitude-CNY%201524.64-blue?style=flat-square)](./DONATIONS.md) [![Docker Pulls](https://img.shields.io/docker/pulls/xpzouying/xiaohongshu-mcp?style=flat-square&logo=docker)](https://hub.docker.com/r/xpzouying/xiaohongshu-mcp) -MCP for RedNote (Xiaohongshu) platform. +MCP for RedNote (Xiaohongshu) / xiaohongshu.com. Give your AI assistant direct access to RedNote data. -- My blog article: [haha.ai/xiaohongshu-mcp](https://www.haha.ai/xiaohongshu-mcp) +### ๐Ÿš€ Quick Start: Pick the Version That Fits You -> **๐Ÿ“Œ Please read before submitting a PR: [Contributing Guide](./CONTRIBUTING.md)** +> [!IMPORTANT] +> #### ๐Ÿ”ฅ Option A: Deep Openclaw Integration (recommended for developers) +> - **Openclaw is on fire ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ โ€” Openclaw support has been added in two flavors, pick whichever suits you:** +> - [xiaohongshu-mcp-skills](https://github.com/autoclaw-cc/xiaohongshu-mcp-skills) (for users who already have this project deployed) +> - [xiaohongshu-skills](https://github.com/autoclaw-cc/xiaohongshu-skills) (ready to use out of the box) -**If you encounter any issues, be sure to check [Common Issues and Solutions](https://github.com/xpzouying/xiaohongshu-mcp/issues/56) first.** +> [!TIP] +> #### โœจ Option B: x-mcp Browser Extension (recommended for non-technical users / anyone who wants the simplest setup) +> - **Don't want to deal with Docker or set up a deployment environment? Try [xpzouying/x-mcp](https://github.com/xpzouying/x-mcp).** +> - **Zero configuration**: install the extension and it just works โ€” no code, no proxy, no complicated environment setup. +> - **Safe and stable**: runs directly in your everyday browser (Chrome/Edge) on your local network, with no server IP risk, and it solves 90% of deployment errors. -After checking the **Common Issues** list, if you still can't resolve your deployment problems, we strongly recommend using another tool I've created: [xpzouying/x-mcp](https://github.com/xpzouying/x-mcp). This tool doesn't require deployment - you only need a browser extension to drive your MCP, making it more user-friendly for non-technical users. +### ๐Ÿ“– Related Resources + +- **My blog article**: [haha.ai/xiaohongshu-mcp](https://www.haha.ai/xiaohongshu-mcp) +- **Contributing Guide**: [Contributing Guide](./CONTRIBUTING.md) + +### ๐Ÿ› ๏ธ Troubleshooting + +If you run into problems deploying the traditional Docker version, **be sure to check [Common Issues and Solutions (Issues #56)](https://github.com/xpzouying/xiaohongshu-mcp/issues/56) first**. + +> *Tip: if troubleshooting your environment is eating up too much time, switching to the [x-mcp extension](https://github.com/xpzouying/x-mcp) is usually the more efficient choice.* ## Star History @@ -284,11 +301,15 @@ Favorite a note or unfavorite it, with smart detection of current status to avoi - Tags: Now supported. Adding appropriate tags can bring more traffic. - According to my practical experience, RedNote should allow **50 posts** per day. - **(Very Important) RedNote does not allow the same account to login on multiple web platforms**. If you login to the current xiaohongshu-mcp, don't login to that account on other web platforms, otherwise it will "kick out" the current MCP account login. You can use the mobile app to check current account information. +- If your reach is low, first check whether your content contains banned words โ€” there are plenty of free third-party tools you can search for. +- Never do traffic diversion or pure content scraping/reposting โ€” these are exactly what the platform cracks down on. **Risk Explanation** 1. This project is open-sourced based on another project of mine. The original project has been running stably for over a year without any account bans, only occasional cookie expiration requiring re-login. 2. I used Claude Code CLI integration and verified stable automated operation for several weeks before open-sourcing. +3. If an account has not completed real-name verification, especially a new account, it will usually trigger a **real-name verification** prompt (see the screenshot below). โš ๏ธ This is not an account ban โ€” you would be asked to verify even without using the MCP. Once verified, the account works normally. It is recommended to complete verification before using this project. + image This project is for learning purposes only. All illegal activities are prohibited. @@ -468,6 +489,20 @@ go run . go run . -headless=false ``` +**Configure a proxy (optional)**: + +If you need to go through a proxy, set the `XHS_PROXY` environment variable: + +```bash +# Start with a proxy configured +XHS_PROXY=http://user:pass@proxy:port ./xiaohongshu-mcp-darwin-arm64 + +# Or from source +XHS_PROXY=http://proxy:port go run . +``` + +HTTP/HTTPS/SOCKS5 proxies are supported, and proxy credentials are automatically masked in the logs. + ## 1.4. Verify MCP ```bash @@ -556,6 +591,51 @@ claude mcp list +
+Open Code CLI + +Add the MCP server with the interactive command: + +```bash +opencode mcp add +``` + +Using `xiaohongshu-mcp` as an example: + +``` +โ”Œ Add MCP server +โ”‚ +โ—‡ Enter MCP server name +โ”‚ xiaohongshu-mcp +โ”‚ +โ—‡ Select MCP server type +โ”‚ Remote +โ”‚ +โ—‡ Enter MCP server URL +โ”‚ http://localhost:18060/mcp +โ”‚ +โ—‡ Does this server require OAuth authentication? +โ”‚ No +โ”‚ +โ—† MCP server "xiaohongshu-mcp" added to C:\Users\admin\.config\opencode\opencode.json +โ”‚ +โ”” MCP server added successfully +``` + +Verify that it was added successfully (make sure the MCP service is running): + +```bash +opencode mcp list +``` + +``` +โ”Œ MCP Servers +โ”‚ +โ— โœ“ xiaohongshu-mcp connected +``` + +
+
Cursor @@ -734,7 +814,28 @@ Search for content about "food" on RedNote ```
+
+OpenClaw (via MCPorter) +> Make sure xiaohongshu-mcp is already deployed locally before you start. Handing the GitHub link to OpenClaw and letting it deploy the project for you is **not recommended**. + +Since OpenClaw does not natively support MCP yet, the officially recommended way to call MCP services is through **MCPorter**. + +> ๐Ÿ’ก **Tip:** MCPorter is not the ideal way to call MCP โ€” you may run into compatibility issues along the way, so please be aware. + +#### Installation and Setup + +Just hand the following three commands to OpenClaw in one go (via the Control UI, Telegram, Feishu, etc.), and OpenClaw will set up MCPorter for you. + +``` +npm i -g mcporter +npx mcporter config add xiaohongshu-mcp http://localhost:18060/mcp +npx mcporter list xiaohongshu-mcp +``` + +Once that is done, you can use every xiaohongshu-mcp feature from OpenClaw through natural language. + +
Other HTTP MCP Supporting Clients @@ -764,20 +865,22 @@ After successful connection, you can use the following MCP tools: - `tags`: Topic tags list (optional), e.g. `["food", "travel", "lifestyle"]` - `schedule_at`: Scheduled publish time (optional), ISO8601 format, supports 1 hour to 14 days ahead - `is_original`: Declare as original content (optional), default is not declared - - `visibility`: Visibility scope (optional), supports `public` (default), `self-only`, `friends-only` + - `visibility`: Visibility scope (optional), supports `ๅ…ฌๅผ€ๅฏ่ง` / public (default), `ไป…่‡ชๅทฑๅฏ่ง` / self-only, `ไป…ไบ’ๅ…ณๅฅฝๅ‹ๅฏ่ง` / mutual-followers-only + - `products`: Product keyword list (optional), used to attach products for social commerce. Provide a product name or product ID; the system searches automatically and picks the first match. Requires the product feature to be enabled on your account. Example: [้ข่†œ, ้˜ฒๆ™’้œœSPF50] - `publish_with_video` - Publish video content to RedNote (required: title, content, video) - `video`: Local video file absolute path (single file only) - `tags`: Topic tags list (optional), e.g. `["food", "travel", "lifestyle"]` - `schedule_at`: Scheduled publish time (optional), ISO8601 format, supports 1 hour to 14 days ahead - - `visibility`: Visibility scope (optional), supports `public` (default), `self-only`, `friends-only` + - `visibility`: Visibility scope (optional), supports `ๅ…ฌๅผ€ๅฏ่ง` / public (default), `ไป…่‡ชๅทฑๅฏ่ง` / self-only, `ไป…ไบ’ๅ…ณๅฅฝๅ‹ๅฏ่ง` / mutual-followers-only + - `products`: Product keyword list (optional), used to attach products for social commerce. Provide a product name or product ID; the system searches automatically and picks the first match. Requires the product feature to be enabled on your account. Example: [้ข่†œ, ้˜ฒๆ™’้œœSPF50] - `list_feeds` - Get RedNote homepage recommendation list (no parameters) - `search_feeds` - Search RedNote content (required: keyword) - - `filters`: Filter options (optional) - - `sort_by`: Sort by - `comprehensive` (default) | `latest` | `most liked` | `most comments` | `most saved` - - `note_type`: Note type - `unlimited` (default) | `video` | `image-text` - - `publish_time`: Publish time - `unlimited` (default) | `last day` | `last week` | `last 6 months` - - `search_scope`: Search scope - `unlimited` (default) | `viewed` | `not viewed` | `followed` - - `location`: Location - `unlimited` (default) | `same city` | `nearby` + - `filters`: Filter options (optional). Values must be passed exactly as the Chinese strings below โ€” they match the labels on the RedNote filter panel. + - `sort_by`: Sort by - `็ปผๅˆ` / comprehensive (default) | `ๆœ€ๆ–ฐ` / latest | `ๆœ€ๅคš็‚น่ตž` / most liked | `ๆœ€ๅคš่ฏ„่ฎบ` / most comments | `ๆœ€ๅคšๆ”ถ่—` / most saved + - `note_type`: Note type - `ไธ้™` / any (default) | `่ง†้ข‘` / video | `ๅ›พๆ–‡` / image-text + - `publish_time`: Publish time - `ไธ้™` / any (default) | `ไธ€ๅคฉๅ†…` / last day | `ไธ€ๅ‘จๅ†…` / last week | `ๅŠๅนดๅ†…` / last 6 months + - `search_scope`: Search scope - `ไธ้™` / any (default) | `ๅทฒ็œ‹่ฟ‡` / viewed | `ๆœช็œ‹่ฟ‡` / not viewed | `ๅทฒๅ…ณๆณจ` / followed + - `location`: Location - `ไธ้™` / any (default) | `ๅŒๅŸŽ` / same city | `้™„่ฟ‘` / nearby - `get_feed_detail` - Get post details including interaction data and comments (required: feed_id, xsec_token) - `load_all_comments`: Whether to load all comments (optional), default false returns only first 10 top-level comments - `limit`: Limit number of top-level comments to load (optional), only effective when load_all_comments=true, default 20 @@ -833,7 +936,18 @@ Use xiaohongshu-mcp's video publishing feature. xiaohongshu-mcp publishing result -### 2.5. MCP FAQ +### 2.5. ๐Ÿ’ฌ MCP FAQ + +--- + +> โš ๏ธ The following are known risks when using OpenClaw + MCPorter. Please read them carefully before you start: + +- OpenClaw's automated AI deployment behavior is outside the scope of this project's maintenance, and its results cannot be guaranteed +- As an intermediate layer, MCPorter may introduce additional compatibility issues that have nothing to do with xiaohongshu-mcp itself +- If you hit connection failures or abnormal tool calls, please check MCPorter's own configuration first instead of filing an Issue +- Before asking in the community or the groups, please confirm whether the problem also reproduces **without OpenClaw** + +If you do not specifically need OpenClaw, we strongly recommend switching to a client with native HTTP MCP support such as [Claude Code CLI](#claude-code-cli), [Cursor](#cursor) or [Cline](#cline) โ€” the experience is much more stable. --- @@ -894,15 +1008,17 @@ Use xiaohongshu-mcp's video publishing feature. ### WeChat Group -| WeChat Group 17 | WeChat Group 18 | +> These are Chinese-language community groups โ€” discussion in the groups is in Chinese. + +| WeChat Group 24 | WeChat Group 25 | | :------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------: | -| WechatIMG119 | WechatIMG119 | +| WechatIMG119 | WechatIMG119| ### Feishu (Lark) Groups -| Feishu Group 1 | Feishu Group 2 | Feishu Group 3 | Feishu Group 4 | +| Feishu Group 2 | Feishu Group 3 | Feishu Group 4 | Feishu Group 5 | | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | -| qr-feishu01 | qr-feishu02 | qr-feishu03 | qr-feishu04 | +| qr-feishu02 | qr-feishu03 | qr-feishu04 | qr-feishu05 | > **Note:** > @@ -947,6 +1063,11 @@ Thanks to all friends who have contributed to this project! (In no particular or coldmountain
coldmountain

๐Ÿ’ป + mamage
mamage

๐Ÿ’ป ๐Ÿ“– + Runyang YOU
Runyang YOU

๐Ÿ’ป ๐Ÿ“– + e0_7
e0_7

๐Ÿ’ป ๐Ÿ“– + prehisle
prehisle

๐Ÿ’ป ๐Ÿ“– + Xinhao Chen
Xinhao Chen

๐Ÿ’ป ๐Ÿ“– @@ -969,3 +1090,11 @@ Thanks to all friends who have contributed to this project! (In no particular or This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! + +## ๐Ÿ“„ License + +This project is open source under the [Apache License 2.0](LICENSE). + +You are free to use, modify and distribute this project, including for commercial purposes, as long as you keep the original copyright notice and license file. The [LICENSE](LICENSE) file is the authoritative source for the full terms. + +Contributions submitted to this project are licensed under the same license by default.