xiaohongshu-mcp is an MCP server that lets AI assistants access and interact with Xiaohongshu, a social content platform. It supports tasks such as checking login status, searching content, and publishing image, text, and video posts. The catalogue includes a skill and instructions for using it.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add xpzouying/xiaohongshu-mcp --skill post-to-xhsgit clone --depth 1 https://github.com/xpzouying/xiaohongshu-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xpzouying/xiaohongshu-mcp/post-to-xhs)<a href="https://agentmods.dev/skills/xpzouying/xiaohongshu-mcp/post-to-xhs"><img src="https://agentmods.dev/badge/skills/xpzouying/xiaohongshu-mcp/post-to-xhs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xpzouying/xiaohongshu-mcp/post-to-xhs"><img src="https://agentmods.dev/badge/skills/xpzouying/xiaohongshu-mcp/post-to-xhs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.02232 |
| Opus 5.5 | $0.00038 | $0.00893 |
| Sonnet 5.5 | $0.00019 | $0.00446 |
| Haiku 4.5 | $0.00010 | $0.00223 |
Grade A, and why
post-to-xhs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.
小红书内容发布
根据用户输入自动判断发布方式和发布模式,简化发布流程。
发布模式
- 上传图文(默认):图片 + 短文,适合日常分享
- 写长文:长篇文章 + 排版模板选择,适合深度内容。用户明确说"发长文"时使用
工作流程
用户输入
│
├─ 完整内容 + 图片/图片URL → 判断模式 → 发布流程
│
└─ 网页 URL → WebFetch 提取内容和图片
│
├─ 有图片 → 适当总结内容 → 判断模式 → 发布流程
│
└─ 无图片 → 提示用户手动下载图片
│
└─ 用户提供图片后 → 发布流程
Step 1: 判断输入类型
根据用户输入判断:
- 完整内容模式:用户提供了标题、正文内容、以及图片(本地路径或URL)
- URL 提取模式:用户只提供了一个网页 URL
如果不确定,询问用户。
Step 2: 处理内容
完整内容模式
直接使用用户提供的标题和正文,跳到 Step 3。
URL 提取模式
- 使用 WebFetch 提取网页内容
- 提取关键信息:标题、正文、图片URL
- 适当总结内容,保持:
- 关键信息完整
- 语言自然流畅
- 适合小红书阅读习惯
图片提取失败处理
如果从网页中提取不到图片URL,或图片URL无法访问,必须:
- 告知用户图片提取失败
- 提供原网页链接,请用户手动访问
- 指导用户:
- 在浏览器中打开原网页
- 右键点击想要的图片 → "图片另存为" 或 "复制图片地址"
- 将保存的图片路径或复制的图片URL提供给我
- 等待用户提供图片后再继续发布流程
示例提示语:
从网页中未能提取到可用的图片。请手动获取:
1. 打开原文链接:[URL]
2. 找到合适的配图,右键另存为本地,或复制图片地址
3. 将图片路径或URL发给我
拿到图片后我们继续发布。
Step 3: 内容检查
标题检查
标题长度必须 ≤ 38,计算规则:
- 中文字符和中文标点(《》、,。等):每个计 2
- 英文字母/数字/空格/ASCII标点:每个计 1
如果超长,自动生成符合长度要求的新标题,保持语义一致。
正文格式
- 段落之间使用双换行分隔
- 语言自然,避免机器翻译感
- 简体中文
Step 4: 发布到小红书
完整发布流程参考: references/publish-workflow.md
4.1 用户确认内容
通过 AskUserQuestion 向用户展示即将发布的内容(标题、正文、图片),获得明确确认后再继续。
4.2 选择发布模式
通过 AskUserQuestion 让用户选择发布模式:
- 无头模式(推荐):后台运行,速度快,无浏览器窗口。发布完成后直接报告结果。
- 有窗口模式:显示浏览器窗口,可以预览内容。需要用户确认后再点击发布。
AskUserQuestion 示例:
问题:选择发布模式
选项:
- 无头模式(推荐):后台快速发布,无需预览
- 有窗口模式:显示浏览器,可预览确认
4.3 写入临时文件
将标题和正文写入临时 UTF-8 文本文件。不要在 python -c 中内联中文文本。
4.4 运行发布(根据模式分流)
A. 上传图文模式(默认)
根据用户选择的模式执行发布脚本:
无头模式(添加 --headless 参数):
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\publish_pipeline.py" --headless --title-file title.txt --content-file content.txt --image-urls "URL1" "URL2"
有窗口模式(不添加 --headless):
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\publish_pipeline.py" --title-file title.txt --content-file content.txt --image-urls "URL1" "URL2"
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- config/accounts.json 238 B
- references/publish-workflow.md 11 KB
- scripts/account_manager.py 9.4 KB runs code
- scripts/cdp_publish.py 41 KB runs code
- scripts/chrome_launcher.py 9.8 KB runs code
- scripts/content.txt 319 B
- scripts/image_downloader.py 4.6 KB runs code
- scripts/publish_pipeline.py 8.1 KB runs code
- scripts/title.txt 36 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 252 lines · 96 tokens per session scan A 9e6eb054cff8
post-to-xhs is a skill published in the GitHub repository xpzouying/xiaohongshu-mcp (16,942 stars, last pushed yesterday), licensed Apache-2.0. It adds 96 tokens to every session and 2,232 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
post-to-xhs compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| post-to-xhsxpzouying/xiaohongshu-mcp | Skill | 17k | yesterday | Apache-2.0 | A | 96 | Claude Code, Codex |
| opik-diagnosecomet-ml/opik-mcp | Skill | 225 | 9d ago | Apache-2.0 | A | 187 | Claude Code |
| ue-mcp-epic-routingdb-lyon/ue-mcp | Skill | 476 | yesterday | MIT | A | 81 | Claude Code, Codex |
| qa-knowledgegriddynamics/rosetta | Skill | 370 | today | Apache-2.0 | A | 32 | Claude Code, Codex |
| apitapn1byn1kt/apitap | Skill | 131 | 16d ago | Apache-2.0 | A | 0 | Claude Code, Codex |
| frontmcp-setupagentfront/frontmcp | Skill | 148 | today | Apache-2.0 | A | 176 | Claude Code, Codex |
| x-use-reviewihuzaifashoukat/x-use | Skill | 181 | 4d ago | MIT | A | 56 | Claude Code |