
Xhs Login
- 8 installs
- 244 repo stars
- Updated March 5, 2026
- autoclaw-cc/xiaohongshu-mcp-skills
xhs-login is a Claude skill that manages Xiaohongshu (RedNote) login state, driving QR-code scan login and account switching through an MCP server.
About
This skill manages Xiaohongshu (RedNote) login state through an MCP server. It calls check_login_status to report whether a session is active, get_login_qrcode to render a scannable QR code for phone-app login, and delete_cookies to reset the session when switching accounts. Other Xiaohongshu skills invoke it first when they report a not-logged-in state.
- Checks Xiaohongshu login status and drives QR-code scan login via MCP tools
- Handles account switching by clearing cookies (with user confirmation) then re-issuing a QR code
Xhs Login by the numbers
- 8 all-time installs (skills.sh)
- Ranked #1,519 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
xhs-login capabilities & compatibility
- Capabilities
- xhs search · xhs profile
- Use cases
- marketing
- Runs
- Runs locally
What xhs-login says it does
管理小红书登录状态:检查是否已登录、二维码扫码登录、重置登录切换账号。
登录需要用户手动用手机 App 扫码,无法自动完成
npx skills add https://github.com/autoclaw-cc/xiaohongshu-mcp-skills --skill xhs-loginAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 8 |
|---|---|
| repo stars | ★ 244 |
| Last updated | March 5, 2026 |
| Repository | autoclaw-cc/xiaohongshu-mcp-skills ↗ |
What it does
Log a developer into Xiaohongshu via QR-code scan so downstream search, browse, and publish skills can run.
When should I use this skill?
When a user mentions logging in, scanning a QR code, switching accounts, or when another Xiaohongshu skill reports it is not logged in.
By the numbers
- 3-step flow: check status, QR login, re-login/switch
Files
执行流程
1. 检查登录状态
调用 check_login_status(无参数),返回是否已登录及用户名。
- 已登录 → 告知用户当前登录账号
- 未登录 → 进入步骤 2
2. 扫码登录
调用 get_login_qrcode(无参数)。MCP 工具返回两部分内容:
- 文本:超时提示(含截止时间)
- 图片:PNG 格式二维码(MCP image content type,Base64 编码)
展示二维码:MCP 返回的图片会通过客户端渲染给用户。如果客户端无法直接展示图片(如纯文本终端),则将 Base64 数据保存为临时 PNG 文件,告知用户文件路径让其手动打开:
# fallback: 保存二维码到临时文件
echo "<base64_data>" | base64 -d > /tmp/xhs-qrcode.png
open /tmp/xhs-qrcode.png # macOS
xdg-open /tmp/xhs-qrcode.png # Linux提示用户:
- 打开小红书 App 扫描二维码
- 二维码有效期有限,过期需重新获取
扫码完成后,调用 check_login_status 确认登录成功。
3. 重新登录 / 切换账号
当用户要求重新登录或切换账号时:
1. 调用 delete_cookies(⚠️ 需用户确认)— 清除当前登录状态 2. 调用 get_login_qrcode — 获取新二维码 3. 引导用户扫码
约束
delete_cookies会清除登录状态,执行前必须确认- 登录需要用户手动用手机 App 扫码,无法自动完成
失败处理
| 场景 | 处理 |
|---|---|
| MCP 工具不可用 | 引导用户使用 /setup-xhs-mcp 完成部署和连接配置 |
| 二维码超时 | 重新调用 get_login_qrcode |
Related skills
FAQ
How does this skill log into Xiaohongshu?
It calls get_login_qrcode to produce a PNG QR code that the user scans with the Xiaohongshu app; login cannot be fully automated because it requires a manual phone scan.
How do I switch accounts?
The skill calls delete_cookies (which requires user confirmation) to clear the current session, then issues a fresh QR code for the new account.