Skip to content

Commit e1d43d2

Browse files
xpzouyingclaude
andauthored
docs: 添加用户主页功能说明并完善英文文档 (#125)
- 在README.md中新增"获取用户个人主页"功能说明 - 详细描述用户主页功能的参数要求和返回信息 - 更新MCP工具列表,添加user_profile工具 - 在README_EN.md中补充图片支持方式的完整英文说明 - 添加HTTP链接和本地路径两种方式的详细描述和使用示例 - 在英文版中新增"Get User Profile"功能说明 - 保持中英文文档的功能一致性和完整性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 716cf10 commit e1d43d2

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,31 @@ https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
129129

130130
</details>
131131

132+
<details>
133+
<summary><b>7. 获取用户个人主页</b></summary>
134+
135+
获取小红书用户的个人主页信息,包括用户基本信息和笔记内容。
136+
137+
**功能说明:**
138+
139+
- 获取用户基本信息(昵称、简介、头像等)
140+
- 获取关注数、粉丝数、获赞量统计
141+
- 获取用户发布的笔记内容列表
142+
- 支持 HTTP API 和 MCP 工具调用
143+
144+
**⚠️ 重要提示:**
145+
146+
- 需要先登录才能使用此功能
147+
- 需要提供用户 ID 和 xsec_token
148+
- 这些参数可以从 Feed 列表或搜索结果中获取
149+
150+
**返回信息包括:**
151+
- 用户基本信息:昵称、简介、头像、认证状态
152+
- 统计数据:关注数、粉丝数、获赞量、笔记数
153+
- 笔记列表:用户发布的所有公开笔记
154+
155+
</details>
156+
132157
**小红书基础运营知识**
133158

134159
- **标题:(非常重要)小红书要求标题不超过 20 个字**
@@ -500,6 +525,7 @@ npx @modelcontextprotocol/inspector
500525
- `search_feeds` - 搜索小红书内容(需要:keyword)
501526
- `get_feed_detail` - 获取帖子详情(需要:feed_id, xsec_token)
502527
- `post_comment_to_feed` - 发表评论到小红书帖子(需要:feed_id, xsec_token, content)
528+
- `user_profile` - 获取用户个人主页信息(需要:user_id, xsec_token)
503529

504530
### 2.4. 使用示例
505531

README_EN.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@ https://github.com/user-attachments/assets/bd9a9a4a-58cb-4421-b8f3-015f703ce1f9
3535

3636
Supports publishing image and text content to RedNote, including title, content description, and images. More publishing features will be supported later.
3737

38+
**Image Support Methods:**
39+
40+
Supports two image input methods:
41+
42+
1. **HTTP/HTTPS Image Links**
43+
```
44+
["https://example.com/image1.jpg", "https://example.com/image2.png"]
45+
```
46+
47+
2. **Local Image Absolute Paths** (Recommended)
48+
```
49+
["/Users/username/Pictures/image1.jpg", "/home/user/images/image2.png"]
50+
```
51+
52+
**Why Local Paths are Recommended:**
53+
- ✅ Better stability, not dependent on network
54+
- ✅ Faster upload speed
55+
- ✅ Avoid image link expiration issues
56+
- ✅ Support more image formats
57+
3858
**Publish Image-Text Post Demo:**
3959

4060
https://github.com/user-attachments/assets/8aee0814-eb96-40af-b871-e66e6bbb6b06
@@ -108,6 +128,31 @@ https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80
108128

109129
</details>
110130

131+
<details>
132+
<summary><b>7. Get User Profile</b></summary>
133+
134+
Get RedNote user's personal profile information, including basic user information and note content.
135+
136+
**Feature Description:**
137+
138+
- Get user basic information (nickname, bio, avatar, etc.)
139+
- Get follower count, following count, likes count statistics
140+
- Get user's published note content list
141+
- Supports HTTP API and MCP tool calls
142+
143+
**⚠️ Important Note:**
144+
145+
- Must login first to use this feature
146+
- Need to provide user ID and xsec_token
147+
- These parameters can be obtained from Feed list or search results
148+
149+
**Returned Information Includes:**
150+
- User basic info: nickname, bio, avatar, verification status
151+
- Statistics: following count, follower count, likes count, note count
152+
- Note list: all public notes published by the user
153+
154+
</details>
155+
111156
**RedNote Basic Operation Knowledge**
112157

113158
- **Title: (Very Important) RedNote requires titles to not exceed 20 characters**
@@ -461,15 +506,18 @@ After successful connection, you can use the following MCP tools:
461506

462507
- `check_login_status` - Check RedNote login status (no parameters)
463508
- `publish_content` - Publish image-text content to RedNote (required: title, content, images)
509+
- `images`: Supports HTTP links or local absolute paths, local paths recommended
464510
- `list_feeds` - Get RedNote homepage recommendation list (no parameters)
465511
- `search_feeds` - Search RedNote content (required: keyword)
466512
- `get_feed_detail` - Get post details (required: feed_id, xsec_token)
467513
- `post_comment_to_feed` - Post comments to RedNote posts (required: feed_id, xsec_token, content)
514+
- `user_profile` - Get user profile information (required: user_id, xsec_token)
468515

469516
### 2.4. Usage Examples
470517

471518
Using Claude Code to publish content to RedNote:
472519

520+
**Example 1: Using HTTP Image Links**
473521
```
474522
Help me write a post to publish on RedNote,
475523
with image: https://cn.bing.com/th?id=OHR.MaoriRock_EN-US6499689741_UHD.jpg&w=3840
@@ -478,6 +526,16 @@ The image is: "Maori rock carving at Ngātoroirangi Mine Bay, Lake Taupo, New Ze
478526
Use xiaohongshu-mcp for publishing.
479527
```
480528

529+
**Example 2: Using Local Image Paths (Recommended)**
530+
```
531+
Help me write a post about spring to publish on RedNote,
532+
using these local images:
533+
- /Users/username/Pictures/spring_flowers.jpg
534+
- /Users/username/Pictures/cherry_blossom.jpg
535+
536+
Use xiaohongshu-mcp for publishing.
537+
```
538+
481539
![claude-cli publishing](./assets/claude_push.gif)
482540

483541
**Publishing Result:**

0 commit comments

Comments
 (0)