skill-xhs-mcp-service

小红书(XHS/RED)自动化助手。完整的小红书操作能力,包含 MCP 服务端。 当用户提到小红书、红书、XHS、RED、发笔记、搜笔记、小红书运营等任何与小红书相关的操作时使用此技能。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "skill-xhs-mcp-service" with this command: npx skills add weznai/skill-xiaohongshu

小红书 MCP 技能

完整的小红书自动化技能,包含独立服务端,开箱即用。

快速开始

首次使用:

cd <技能目录>
npm install
npm run login  # 扫码登录

日常使用: 技能会自动启动服务,无需手动操作。

功能列表(13个工具)

工具说明参数
check_login_status检查登录状态
get_login_qrcode获取登录二维码
delete_cookies删除登录状态
list_feeds获取首页推荐
search_feeds搜索笔记keyword, filters?
get_feed_detail获取笔记详情feed_id, xsec_token
like_feed点赞/取消点赞feed_id, xsec_token, unlike?
favorite_feed收藏/取消收藏feed_id, xsec_token, unfavorite?
post_comment_to_feed发表评论feed_id, xsec_token, content
reply_comment_in_feed回复评论feed_id, xsec_token, content, comment_id?
user_profile获取用户主页user_id, xsec_token
publish_content发布图文title, content, images, tags?
publish_with_video发布视频title, content, video, tags?

使用方式

方式1:Node.js 直接调用(推荐)

import { searchFeeds, likeFeed, publishContent } from './scripts/xhs-tools.js';

// 搜索笔记
const results = await searchFeeds('咖啡');

// 点赞
if (results.feeds[0]) {
  await likeFeed(results.feeds[0].id, results.feeds[0].xsec_token);
}

// 发布图文
await publishContent({
  title: '我的笔记',
  content: '正文内容',
  images: ['./photo1.jpg'],
  tags: ['美食']
});

方式2:MCP 服务调用

服务默认运行在 http://localhost:18060/mcp

# 启动服务(通常自动启动)
npm start

# 通过 MCP Inspector 调试
npx @modelcontextprotocol/inspector http://localhost:18060/mcp

方式3:命令行快速操作

# 检查登录
node -e "import('./scripts/xhs-tools.js').then(m => m.checkLoginStatus()).then(console.log)"

# 搜索
node -e "import('./scripts/xhs-tools.js').then(m => m.searchFeeds('美食')).then(r => console.log(r.feeds.length))"

服务管理

检查服务状态:

node scripts/ensure-service.js status

启动服务:

node scripts/ensure-service.js start

停止服务:

node scripts/ensure-service.js stop

详细文档

注意事项

  1. 账号安全:同一账号不能在多个网页端登录
  2. 发布限制:每天最多 50 篇笔记
  3. 标题限制:最多 20 字
  4. 正文限制:最多 1000 字
  5. Cookie 有效期:建议每周重新登录一次

环境变量

变量说明默认值
XHS_PORT服务端口18060
XHS_HOST绑定地址0.0.0.0
XHS_PROXY代理地址-

使用代理:

XHS_PROXY=http://proxy:port npm start

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

RedotPay Payment Skill for MPP

Use this skill when the user wants to call an API, discover available services, or access external data with automatic payments using RedotPay — or mentions...

Registry SourceRecently Updated
General

Founder Signal

Founder Signal turns verified Reddit evidence into a small, reviewable signal package for founders evaluating product demand and positioning across one or mo...

Registry SourceRecently Updated
General

PM周报数据同步

将项目经理提交的原始 Excel 周报数据同步到乐荐飞书表格。当项目经理发送周报 Excel 文件、要求更新周收入数据、核对周报数据时激活。

Registry SourceRecently Updated
General

Bybit Exchange AI Trading Skill

Bybit Exchange Trading Skill — trade on Bybit using natural language. Covers spot, derivatives, earn, and more. Requires Bybit API credentials and explicit c...

Registry SourceRecently Updated