Content
# xiaohongshuritter
`xiaohongshuritter` is a Xiaohongshu MCP system for enterprise scenarios, supporting multi-tenancy, multi-account, concurrency control, and three delivery methods: `Docker 部署`, `源码部署`, and `OpenClaw 部署`.
Applicable scenarios:
- Multiple brands and business lines within an enterprise share a set of Xiaohongshu automated services
- Multiple operation accounts are uniformly connected to MCP, and AI clients route calls according to `tenant_id` and `account_id`
- Stable deployment is required in environments such as `Windows`, `macOS`, `Linux`, `Docker`, and `OpenClaw`
- Automated capabilities such as graphic and text publishing, video publishing, search, comments, and information retrieval are required
## System Architecture Diagram
```mermaid
flowchart LR
subgraph "调用入口"
A["OpenClaw"]
B["内部 AI 应用"]
C["运维脚本 / 管理端"]
end
A --> D["MCP Endpoint (/mcp)"]
B --> D
C --> E["HTTP API (/api/v1/*)"]
D --> F["租户与账号路由层"]
E --> F
F --> G["并发控制器"]
G --> H["登录态与会话管理"]
H --> I["浏览器自动化层"]
I --> J["小红书平台"]
F --> K["账号配置 accounts.json"]
H --> L["Cookie 隔离存储"]
G --> M["健康检查 / 审计 / 监控"]
```
## Deployment Flowchart
```mermaid
flowchart TD
A["获取仓库源码"] --> B["选择部署方式"]
B --> C["Docker 部署"]
B --> D["源码部署"]
B --> E["OpenClaw 部署"]
C --> F["配置 accounts.json"]
D --> F
E --> G["选择交付包<br/>openclaw-lite / openclaw-source-lite"]
G --> F
F --> H["启动服务"]
H --> I["检查 /health"]
I --> J["检查 /api/v1/accounts"]
J --> K["在 OpenClaw 中注册 MCP"]
K --> L["执行二维码登录"]
L --> M["开始发布 / 搜索 / 评论等业务调用"]
```
## Core Capabilities
- Multi-tenant isolation: Distinguish enterprises, brands, or business lines through `tenant_id`
- Multi-account routing: Manage multiple accounts under the same tenant through `account_id`
- Concurrency control: Supports global concurrency and single-account concurrency limits
- MCP + HTTP API: Provides both MCP service entry and HTTP management interface
- Account status management: Supports login detection, QR code login, and Cookie isolation
- Multi-platform deployment: Supports standard Docker, source code execution, and OpenClaw calls
## Function Overview
- Login status check
- Login QR code acquisition
- Graphic and text note publishing
- Video note publishing
- Recommendation stream acquisition
- Keyword search
- Note details acquisition
- Comments and replies
- Current account list and concurrency status query
## Deployment Methods
| 场景 | 推荐方式 | 文档 |
| --- | --- | --- |
| 标准服务器部署 | Docker | [docs/docker_deployment.md](./docs/docker_deployment.md) |
| 本地开发与二次开发 | 源码部署 | [docs/source_deployment.md](./docs/source_deployment.md) |
| OpenClaw 集成 | OpenClaw 部署 | [docs/openclaw_deployment.md](./docs/openclaw_deployment.md) |
| Apple Silicon | macOS M4 指南 | [docs/macos_m4_openclaw.md](./docs/macos_m4_openclaw.md) |
| Windows 企业环境 | Windows 指南 | [docs/windows_enterprise.md](./docs/windows_enterprise.md) |
## Quick Start
### 1. Prepare Account Configuration
```bash
cp configs/accounts.enterprise.example.json configs/accounts.json
```
Minimum example:
```json
{
"default_tenant": "default",
"default_account": "main",
"global_max_concurrency": 12,
"tenants": [
{
"id": "default",
"default_account": "main",
"accounts": [
{
"id": "main",
"cookie_path": "./data/default/main/cookies.json",
"max_concurrency": 3
}
]
}
]
}
```
### 2. Start the Service
Docker:
```bash
docker compose -f docker/docker-compose.yml up -d
```
Source code:
```bash
go run .
```
### 3. Verify the Service
```bash
curl http://127.0.0.1:18060/health
curl http://127.0.0.1:18060/api/v1/accounts
```
### 4. MCP Address
```text
http://127.0.0.1:18060/mcp
```
## OpenClaw Call Example
```json
{
"tenant_id": "default",
"account_id": "main",
"title": "企业内容发布示例",
"content": "支持多租户、多账号与并发发布。",
"images": ["/app/images/demo.jpg"],
"tags": ["内容运营", "企业发布"],
"visibility": "公开可见"
}
```
## Delivery Package
The repository contains package templates suitable for OpenClaw and operation and maintenance delivery:
- [package/README.md](./package/README.md)
- [package/openclaw-lite/README.md](./package/openclaw-lite/README.md)
- [package/openclaw-source-lite/README.md](./package/openclaw-source-lite/README.md)
Description:
- `openclaw-lite` is suitable for standard Docker / Linux amd64 environments
- `openclaw-source-lite` is suitable for ARM64, Chromium pre-installed, and OpenClaw stable delivery
## Documentation Navigation
- Enterprise-level capability description: [docs/enterprise_deployment.md](./docs/enterprise_deployment.md)
- HTTP API documentation: [docs/API.md](./docs/API.md)
- Enterprise API extension: [docs/API_ENTERPRISE.md](./docs/API_ENTERPRISE.md)
- OpenClaw MCP usage documentation: [docs/OPENCLAW_MCP_USAGE.md](./docs/OPENCLAW_MCP_USAGE.md)
- Docker deployment: [docs/docker_deployment.md](./docs/docker_deployment.md)
- Source code deployment: [docs/source_deployment.md](./docs/source_deployment.md)
- OpenClaw deployment: [docs/openclaw_deployment.md](./docs/openclaw_deployment.md)
## Reference Project Description
This project refers to the open-source project [xpzouying/xiaohongshu-mcp](https://github.com/xpzouying/xiaohongshu-mcp) in design and implementation, and expands enterprise-level multi-account, multi-concurrency, OpenClaw delivery, Docker and multi-platform deployment capabilities on this basis.
See [NOTICE.md](./NOTICE.md) for further details.
## Open Source Collaboration
- Change log: [CHANGELOG.md](./CHANGELOG.md)
- Security description: [SECURITY.md](./SECURITY.md)
- Community code of conduct: [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
- Contribution instructions: [CONTRIBUTING.md](./CONTRIBUTING.md)
## Compliance Reminder
Please use this project on the premise that it is permitted by account authorization, platform rules, and local laws and regulations. When it comes to write operations such as publishing, commenting, and liking, it is recommended to connect to the review, traffic limiting, and auditing processes.
Connection Info
You Might Also Like
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
Appwrite
Build like a team of hundreds
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
chatbox
User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)