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
HuiMei provides a CLI and MCP interface for publishing to supported Chinese social-media platforms through cloud or local browser execution.
Why HuiMei?
- 🌏 Multi-platform workflow — One command surface for the platforms and content types reported by
huimei platforms. - 🔀 CLI + MCP dual interface — Humans use the terminal (
huimei publish), AI agents use the MCP protocol. Same engine, two entry points. - 🔒 Cloud, local, and auto execution — Local mode drives the user's Chrome through a managed Runtime Host; cloud mode runs the same signed automation bundle on the service environment.
- 🔑 Protected credentials and runtime code — Sensitive payloads use HTTPS/WSS plus application-layer encryption. Local tasks receive short-lived, device-bound encrypted credential envelopes, and automation code is delivered as a signed encrypted Runtime Bundle.
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: pipx (recommended)
pipx install huimei
Option 2: One-line install script
curl -fsSL https://huimei.smaroot.tech/install.sh | bash
Option 3: pip inside a virtual environment
python3 -m venv .venv
source .venv/bin/activate
python -m pip install huimei
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
# View or update the global publish mode saved on the server
huimei mode
huimei mode auto
# 客户端发布固定使用 headless;账号登录仍会打开有头浏览器
huimei browser show
huimei browser set --chrome-path "/path/to/chrome" --window-size 1440x900
# Machine-readable capabilities and asynchronous task status for AI Agents
huimei agent-context
huimei task-status <task-id> --json
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_capabilities |
Read the authoritative runtime contract |
huimei_diagnose |
Check local publish-device readiness |
huimei_account_login_start |
Start interactive browser login asynchronously |
huimei_local_task_status |
Query browser-login task status |
huimei_publish |
Create an asynchronous publish task |
huimei_publish_status |
Query the final platform publish status |
huimei_set_mode |
Update the global publish mode |
Architecture
CLI / MCP / Web
│ HTTPS + WSS
▼
Huimei Platform ── task, account, device and status coordination
│
├── cloud ──▶ Runtime Host ──▶ managed Python + encrypted Runtime Bundle
│
└── local ──▶ Local Worker ──▶ managed Python + encrypted Runtime Bundle ──▶ Chrome
The CLI contains the stable command, transport, Worker, and Runtime Host layers. Platform automation code and its dependency descriptor are versioned independently, so script updates do not normally require a CLI upgrade. Publishing is asynchronous; task creation is not treated as final platform success.
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.
Links
- Homepage: huimei.smaroot.tech
- PyPI: pypi.org/project/huimei
- Documentation: huimei.smaroot.tech/docs
- Changelog: CHANGELOG.md
License
MIT © 2026 Beijing HuiGen ZhiYan Technology Co., Ltd (北京慧根智研科技有限责任公司)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file huimei-0.6.13.tar.gz.
File metadata
- Download URL: huimei-0.6.13.tar.gz
- Upload date:
- Size: 189.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0578ddd9af033b04a80a772049370caceaf09aa9f3ce078c8ea37a5e06bb9009
|
|
| MD5 |
b11faad68bb58fa872832335f1e3803f
|
|
| BLAKE2b-256 |
4010c831cfaef46a30ab4764b27243bd9f9e300e8f2b3ed7cacaa03a3eac4f12
|
File details
Details for the file huimei-0.6.13-py3-none-any.whl.
File metadata
- Download URL: huimei-0.6.13-py3-none-any.whl
- Upload date:
- Size: 197.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cc8ccb09405f444d658c3f5c8c4e15b3b79fcc012d6c0bfc6d2746519e1f068
|
|
| MD5 |
21d45f8118d9828ea56443b29d949b7e
|
|
| BLAKE2b-256 |
0b9edaa4f6c570a5f9a8dec24a123db0901bbb8179cb8e754720f2dd9f97c67f
|