Skip to main content

MCP Server & CLI for social media automation — let AI agents publish to TikTok, Instagram, YouTube, Douyin, XHS, Bilibili and 15+ platforms via Model Context Protocol

Project description

HuiMei 慧媒 — Chinese Social Media Automation CLI & MCP Server

PyPI version Python License: MIT

The first MCP Server for Chinese social media — let AI agents publish to Douyin, XHS, Bilibili, Kuaishou, Weibo, and 6 more platforms through one unified interface.

Why HuiMei?

  • 🌏 Only MCP Server for Chinese social media — Covers 11 platforms including 抖音 (Douyin), 小红书 (XHS), B站 (Bilibili), 快手 (Kuaishou), 微博 (Weibo), and more. No other tool does this.
  • 🔀 CLI + MCP dual interface — Humans use the terminal (huimei publish), AI agents use the MCP protocol. Same engine, two entry points.
  • 🔒 Local-first execution — Playwright runs on your device. Cookies are encrypted and stored locally. Your credentials never leave your machine.
  • 🔄 Hybrid execution — Cloud for convenience, local for safety. Auto mode gives you the best of both — tries your local browser first, falls back to cloud if offline.
  • ⚡ Zero-config worker — Login once, CLI stays connected. Your WebUI can dispatch tasks to your local machine with no extra setup.

Supported Platforms

Platform ID Name Video Image
douyin 抖音 (Douyin)
xhs 小红书 (Xiaohongshu/RED)
bilibili B站 (Bilibili)
ks 快手 (Kuaishou)
weibo 微博 (Weibo)
tencent 视频号 (WeChat Channels)
tk TikTok
toutiao 头条 (Toutiao)
baijiahao 百家号 (Baijiahao)
weixingongzhonghao 微信公众号 (WeChat MP)
zhihu 知乎 (Zhihu)

Installation

Option 1: pip (recommended)

pip install huimei
playwright install chromium

Option 2: pipx (isolated environment)

pipx install huimei
playwright install chromium

Option 3: One-line install script

curl -fsSL https://raw.githubusercontent.com/huimei-engine/huimei-cli/main/install.sh | bash

Quick Start

# Log in to your account
huimei login

# List supported platforms
huimei platforms

# List linked social media accounts
huimei account list

# Check CLI and connection status
huimei status

Execution Modes

HuiMei supports three execution modes, configurable via WebUI (Profile → Publish Settings) or CLI:

Mode Description Best For
☁️ Cloud Server-side engine publishes Zero-config, batch publishing
💻 Local CLI opens local browser Residential IP, lower risk
🔄 Auto (default) CLI-first, cloud fallback Best of both worlds
# Switch via CLI
huimei login --server prod   # Connect to production
# Or change in WebUI: Profile → Publish Settings

When using Local or Auto mode, the CLI background worker automatically:

  • Connects to backend via WebSocket
  • Receives publish tasks from WebUI
  • Downloads media files from cloud storage
  • Opens local browser with your cookies
  • Executes the publish automation
  • Reports results back to WebUI

No manual worker management needed — it starts on login and reconnects automatically.

MCP Server Integration

MCP (Model Context Protocol) allows AI agents to call external tools as if they were native functions. HuiMei ships a built-in MCP server so agents like Claude, Hermes, and GPT can manage your social media directly.

Claude Code / Claude Desktop

Add to your MCP config (~/.claude/claude_code_config.json or Claude Desktop settings):

{
  "mcpServers": {
    "huimei": {
      "command": "huimei-mcp-server",
      "args": []
    }
  }
}

Hermes Agent

Add to your Hermes config:

mcp_servers:
  huimei:
    command: huimei-mcp-server

Available MCP Tools

Tool Description
huimei_login Launch browser login flow for a platform
huimei_status Check CLI status and backend connectivity
huimei_logout Log out and clear local session
huimei_platforms List all supported platforms and capabilities
huimei_accounts List all linked social media accounts
huimei_publish Create a publish task (video/image to platforms)

Architecture

┌─────────────────────────┐          ┌─────────────────────────┐
│     CLI  (Your Device)  │◀──WS──▶│   Java Backend (Cloud)  │
│                         │──HTTP──▶│                         │
│  ▸ Playwright browser   │          │  ▸ Account management   │
│  ▸ Encrypted cookies    │          │  ▸ Task scheduling      │
│  ▸ Residential IP       │          │  ▸ Execution routing    │
│  ▸ MCP Server           │          │  ▸ Settings sync        │
│  ▸ Background worker    │          │  ▸ Subscription billing │
└─────────────────────────┘          └─────────────────────────┘
        "The Arm"                          "The Brain"

CLI is the arm, Backend is the brain. The CLI executes browser automation locally. All business logic, scheduling, and orchestration happen on the backend.

Use Cases

📹 Content Creators — Write once, publish everywhere. Record a video, add your caption, and distribute to all 11 platforms with a single command.

🤖 AI Agents — Let Claude or GPT manage your social media via MCP. Your agent can check account status, schedule posts, and publish content autonomously.

📊 Marketing Teams — Automate matrix account publishing across dozens of accounts and platforms. Integrate into your existing CI/CD or content pipeline.

🔄 Settings Sync — Settings changed in WebUI instantly sync to CLI via WebSocket.

Links

License

MIT © 2026 Beijing HuiGen ZhiYan Technology Co., Ltd (北京慧根智研科技有限责任公司)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huimei-0.4.9.tar.gz (57.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huimei-0.4.9-py3-none-any.whl (72.2 kB view details)

Uploaded Python 3

File details

Details for the file huimei-0.4.9.tar.gz.

File metadata

  • Download URL: huimei-0.4.9.tar.gz
  • Upload date:
  • Size: 57.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for huimei-0.4.9.tar.gz
Algorithm Hash digest
SHA256 a6404d1f440b642106ab573d5f01f0e5a12e36798ceeb4f56383c0fa9f66aa6a
MD5 32a18832a2dc8e7ef3c1c1cb95d5eda3
BLAKE2b-256 7c30a5f6e2e62ac3e8e37e082cf2021c0515be30443522895819a8d7042416e5

See more details on using hashes here.

File details

Details for the file huimei-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: huimei-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 72.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for huimei-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 70934d51ca45b04155fce3a17d09b72dea49f01f19cca78b83cce14ffc2599d2
MD5 349c22088479e60780c87ed835cd6177
BLAKE2b-256 616ab73d6b03a974e7e328d1221a1b1715a906e3d15c0cd9a9966e36c856ff1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page