xiaohongshu-mcp

tclawde/xiaohongshu-mcp-skill · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/tclawde/xiaohongshu-mcp-skill --skill xiaohongshu-mcp
0 commentsdiscussion
summary

基于 xpzouying/xiaohongshu-mcp 构建

skill.md

Xiaohongshu MCP Skill

基于 xpzouying/xiaohongshu-mcp 构建

🎯 核心功能

本 Skill 提供小红书完整自动化解决方案:

功能 状态 说明
🔐 登录管理 ✅ 已测试 支持截图发送到飞书
🔍 搜索内容 ✅ 已测试 关键词搜索、筛选
📄 获取详情 ✅ 已测试 含评论列表
📤 发布图文 ✅ 已测试 封面生成器集成
👍 点赞 ✅ 已测试 单条点赞
💬 发表评论 ✅ 已测试 主评论
↩️ 回复评论 ✅ 已测试 子评论回复
⭐ 收藏 ✅ 已测试 收藏/取消
🔄 获取推荐 ✅ 已测试 首页 feeds

共 13 个 MCP 工具全部可用!

🚀 快速开始

1. 登录

# 方式1:一键登录(推荐)
bash xhs_login.sh --notify

# 方式2:本地登录
bash xhs_login.sh

2. 启动 MCP 服务器

./xiaohongshu-mcp-darwin-arm64 &

3. 使用功能

# 检查登录状态
python3 scripts/xhs_client.py status

# 搜索内容
python3 scripts/xhs_client.py search "AI"

# 发布内容
python3 scripts/xhs_client.py publish "标题" "内容" "图片URL"

📚 完整操作指南

MCP 工具列表

工具 功能 使用场景
check_login_status 检查登录状态 确认账号状态
list_feeds 获取推荐列表 发现热门内容
search_feeds 搜索内容 关键词搜索
get_feed_detail 获取帖子详情 查看评论
publish_content 发布图文 创作新内容
publish_with_video 发布视频 视频内容
post_comment_to_feed 发表评论 回复粉丝
reply_comment_in_feed 回复评论 互动
like_feed 点赞 点赞帖子
favorite_feed 收藏 收藏帖子
delete_cookies 删除 cookies 重置登录
get_login_qrcode 获取二维码 重新登录
user_profile 获取用户主页 查看主页

💬 评论互动策略

人设保持

人设:理性思考者,不是杠精

评论区互动要求:

  • ✅ 理性分析,尊重不同意见
  • ✅ 有数据支撑的反驳
  • ✅ 自然的聊天感
  • ❌ 攻击评论者
  • ❌ 强词夺理

评论规则

评论类型 点赞 回复
观点一致 ✅ 有延续性
部分认同 ✅ 补充观点
观点相反 ✅ 尊重表达
提问 ✅ 直接回答
分享经历 ✅ 共鸣

回复模板

观点一致型:

"说出了我想说的![补充细节]"
"对对对,尤其是[具体例子]..."

部分认同型:

"有道理,不过我觉得[补充观点]"
"同意一半吧,另外[补充视角]"

观点相反型:

"你的观点挺有意思,不过我觉得[不同看法]"
"可能我表达不清楚,我想说的是[重新解释]"

提问型:

"好问题!我的看法是[直接回答]"
"这个要分情况,[分情况说明]"

分享经历型:

"太真实了![共鸣]"
"你这个经历太有代表性了![延伸]"

回复要求

  1. 每条必回 - 展现活跃度
  2. 主题相关 - 扣住帖子核心
  3. 有延续性 - 不是敷衍
  4. 无 AI 感 - 自然口语化
  5. 保持人设 - 理性思考者

🔧 技术实现

MCP HTTP API

所有功能都可通过 HTTP API 调用:

# MCP Endpoint
http://localhost:18060/mcp

# 格式
curl -X POST http://localhost:18060/mcp \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: <SESSION_ID>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search_feeds",
      "arguments": {
        "keyword": "AI"
      }
    }
  }'

MCP Session 获取

# 初始化
RESPONSE=$(curl -s -i -X POST http://localhost:18060/mcp \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}')

# 提取 Session ID
SESSION_ID=$(echo "$RESPONSE" | grep -i "Mcp-Session-Id:" | cut -d' ' -f2)

示例:完整发布流程

#!/bin/bash
MCP_URL="http://localhost:18060/mcp"
COOKIE_FILE="cookies.txt"

# 1. 初始化
RESPONSE=$(curl -s -i -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -c "$COOKIE_FILE" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}')

SESSION_ID=$(echo "$RESPONSE" | grep -i "Mcp-Session-Id:" | cut -d' ' -f2)

# 2. 发送初始化通知
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' > /dev/null

# 3. 发布内容
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 100,
    "method": "tools/call",
    "params": {
      "name": "publish_content",
      "arguments": {
        "title": "AI正在毁掉这一代年轻人?",
        "content": "🔥 争议话题...\n\n详细内容...",
        "images": ["/tmp/cover.jpg"]
      }
    }
  }'

示例:评论互动

#!/bin/bash
MCP_URL="http://localhost:18060/mcp"
COOKIE_FILE="cookies.txt"
SESSION_ID="YOUR_SESSION_ID"

# 1. 获取评论列表
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_feed_detail",
      "arguments": {
        "feed_id": "698c441c000000002801d381",
        "xsec_token": "YOUR_TOKEN",
        "load_all_comments": true
      }
    }
  }'

# 2. 点赞
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "like_feed",
      "arguments": {
        "feed_id": "698c441c000000002801d381",
        "xsec_token": "YOUR_TOKEN"
      }
    }
  }'

# 3. 发表评论
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "post_comment_to_feed",
      "arguments": {
        "feed_id": "698c441c000000002801d381",
        "xsec_token": "YOUR_TOKEN",
        "content": "说出了我想说的!补充细节..."
      }
    }
  }'

# 4. 回复评论
curl -s -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "reply_comment_in_feed",
      "arguments": {
        "feed_id": "68786933000000000d01a693",
        "xsec_token": "YOUR_TOKEN",
        "comment_id": "68786afc000000001101ada6",
        "user_id": "6695e7370000000003032a17",
        "content": "说得有道理!补充观点..."
      }
how to use xiaohongshu-mcp

How to use xiaohongshu-mcp on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add xiaohongshu-mcp
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/tclawde/xiaohongshu-mcp-skill --skill xiaohongshu-mcp

The skills CLI fetches xiaohongshu-mcp from GitHub repository tclawde/xiaohongshu-mcp-skill and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/xiaohongshu-mcp

Reload or restart Cursor to activate xiaohongshu-mcp. Access the skill through slash commands (e.g., /xiaohongshu-mcp) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.551 reviews
  • Zaid Torres· Dec 24, 2024

    xiaohongshu-mcp has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Zaid Iyer· Dec 8, 2024

    I recommend xiaohongshu-mcp for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Noor Rao· Nov 27, 2024

    Keeps context tight: xiaohongshu-mcp is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Zaid Diallo· Nov 15, 2024

    Solid pick for teams standardizing on skills: xiaohongshu-mcp is focused, and the summary matches what you get after install.

  • Mia Nasser· Oct 18, 2024

    Registry listing for xiaohongshu-mcp matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ira Chen· Oct 10, 2024

    Keeps context tight: xiaohongshu-mcp is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Aisha Singh· Oct 6, 2024

    We added xiaohongshu-mcp from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Aisha Bansal· Sep 25, 2024

    Solid pick for teams standardizing on skills: xiaohongshu-mcp is focused, and the summary matches what you get after install.

  • Benjamin Li· Sep 21, 2024

    xiaohongshu-mcp has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Yash Thakker· Sep 17, 2024

    Useful defaults in xiaohongshu-mcp — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 51

1 / 6