返回 MCP 目录
public公开dns本地运行

小红书MCP发布器

用于发布小红书的MCP插件。

article

README

Project description

install

  1. python packages
pip install -r requirements.txt
  1. install chromedriver find out your chrome version like "134.0.6998.166". download it
npx @puppeteer/browsers install chromedriver@134.0.6998.166

copy the chromedriver to your path or add it in your path

  1. install xhs_mcp_server
pip install xhs-mcp-server

login

run the following command in your terminal.

env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server.__login__

it will show:

无效的cookies,已清理
请输入验证码: 

and you need to input the verification code in the terminal and press enter.

check it

env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server.__login__

it will show:

使用cookies登录成功

inspector

start the inspector by following command in terminal:

npx @modelcontextprotocol/inspector -e phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server

you can use a local image, type in its path in the inspector

["PATHTOYOURIMAGE.jpg"]

it will show an error, but it is ok, the post will be sent. Error Request timed out

start the server

start the server by following command:

env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server
help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端