xhs-mcp-cdp

Official

Automate 小红书发布 via Chrome CDP

AuthorMushroomDAO
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of repeatedly performing manual 小红书图文发布 through the web UI by providing a local MCP HTTP service that drives an already-logged-in Chrome session to publish content reliably.

Core Features & Use Cases

  • CDP Tab Reuse to Avoid WAF: Reuses an existing creator.xiaohongshu.com tab in the same Chrome Profile instead of creating a new one, reducing the chance of being redirected to /login.
  • Page-level WebSocket Click Injection: Sends page-level Input.dispatchMouseEvent over the page’s WebSocket to produce isTrusted=true events so Vue SPA UI responds correctly.
  • Robust Element Waiting with Timeout: Wraps element queries with goroutine + channel + time.After to prevent indefinite WebSocket blocking and provide predictable timeouts.
  • Use Cases: Automating 图文发布 (title/content/tags/images), remote health checks, and debugging a publish flow end-to-end on macOS (Mac Mini 24h service or MacBook temporary local mode).

Quick Start

Start the CDP mode by running the xhs cdp 模式 trigger to launch the MCP server on :18060 and then publish via POST /api/v1/publish with your title, content, tags, and image paths.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: xhs-mcp-cdp
Download link: https://github.com/MushroomDAO/blog/archive/main.zip#xhs-mcp-cdp

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.