xhs-login
Original:🇨🇳 Chinese
Translated
Manage Xiaohongshu login status: Check login status, QR code login, reset login to switch accounts. Use this when the user mentions login, QR code scanning, account, account switching, logout, login status check, or when other skills report "not logged in" requiring prior login.
12installs
Added on
NPX Install
npx skill4agent add autoclaw-cc/xiaohongshu-mcp-skills xhs-loginTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Execution Flow
1. Check Login Status
Call (no parameters), which returns whether the user is logged in and the username.
check_login_status- Logged in → Inform the user of the currently logged-in account
- Not logged in → Proceed to Step 2
2. QR Code Login
Call (no parameters). The MCP tool returns two parts:
get_login_qrcode- Text: Timeout prompt (including deadline)
- Image: PNG format QR code (MCP image content type, Base64 encoded)
Display QR Code: The image returned by MCP will be rendered to the user via the client. If the client cannot directly display images (such as a plain text terminal), save the Base64 data as a temporary PNG file and inform the user of the file path to open manually:
bash
# fallback: 保存二维码到临时文件
echo "<base64_data>" | base64 -d > /tmp/xhs-qrcode.png
open /tmp/xhs-qrcode.png # macOS
xdg-open /tmp/xhs-qrcode.png # LinuxPrompt the user:
- Open the Xiaohongshu App to scan the QR code
- The QR code has a limited validity period; re-obtain it if it expires
After scanning, call to confirm successful login.
check_login_status3. Re-login / Switch Accounts
When the user requests re-login or account switching:
- Call (⚠️ User confirmation required) — Clear current login status
delete_cookies - Call — Obtain new QR code
get_login_qrcode - Guide the user to scan the code
Constraints
- will clear the login status; must confirm with the user before execution
delete_cookies - Login requires manual QR code scanning via the mobile App; cannot be completed automatically
Failure Handling
| Scenario | Handling |
|---|---|
| MCP tool unavailable | Guide the user to use |
| QR code expired | Re-call |