Douyin AI Agent MCP Server
Controls Android real devices and emulators through ADB and uiautomator2 to automate Douyin operations such as video publishing, browsing, scrolling, and direct-message handling.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Douyin AI Agent — 视觉大模型 + ADB + MCP 移动端短视频自动化运营引擎
一套面向 Android 真机与模拟器的 AI 视觉驱动短视频自动化运营 Agent 框架。通过 ADB + uiautomator2 控件树定位 + 视觉大模型(GLM-4V / OpenAI 兼容)截屏决策 + 拟人化防风控行为模拟,打通视频提取分析、AI 生成文案、批量防重发布、模拟养号与私信智能回复全链路,并原生封装为 MCP / Hermes / WorkBuddy 多 Agent 协议适配器。
系统架构
flowchart LR
Agent["外部 AI Agent<br/>(Claude / Codex / Hermes / WorkBuddy)"]
subgraph Adapters["多协议适配层 agent_adapters/"]
MCP["MCP Adapter<br/>(7 标准工具)"]
Hermes["Hermes Adapter & SKILL.md"]
WB["WorkBuddy Adapter"]
end
subgraph Core["核心能力层 core/"]
Pub["PublishService<br/>自动选片 / 批量防重轮发"]
Msg["MessageService<br/>私信巡检 / AI 自动回复"]
Vid["VideoService<br/>视频提取 / 抽帧分析"]
Vision["VisionLLMClient<br/>视觉理解 + 标题文案生成"]
Human["Humanize Engine<br/>随机坐标偏移 / 贝塞尔速度滑动"]
end
Device["Android 真机 / 模拟器<br/>(ADB + uiautomator2 跨分辨率控件树)"]
Agent --> Adapters --> Core --> Device
Core --> VisionRelated MCP server: ghost-in-the-droid
核心特性
视觉大模型 + UI 控件树双保险:结合
uiautomator2跨设备分辨率控件查找与多模态视觉模型(支持 GLM-4V 及任意 OpenAI 兼容视觉接口)兜底识别复杂弹窗与页面状态。拟人化防风控引擎 (
core/humanize.py):内置随机坐标抖动点击、自然滑动速度与距离随机化、区间随机延迟,降低机械操作风控风险。全链路运营能力 (
core/capabilities/&skills/):auto-publish/batch-publish:相册智能接续防重发布 & 本地目录批量轮发;douyin_video:本地缓存提取、视频下载、多帧视觉内容分析与爆款标题/描述/标签生成流水线;check-messages/auto-reply:自动巡检未读私信并基于上下文生成拟人回复;browse:模拟真人刷视频浏览养号。
原生多 Agent 生态接入 (
agent_adapters/):内置 MCP (Model Context Protocol) 7 大标准工具契约、HermesAdapter、WorkBuddyAdapter及标准SKILL.md插件定义,开箱即作为外部 Agent 的移动端执行手脚。零密钥入库安全设计:配置加载器 (
core/config_loader.py) 优先读取环境变量(DOUYIN_AI_API_KEY/GLM_API_KEY),本地config/settings.yaml自动被.gitignore忽略。
MCP 标准工具清单
工具名 | 功能说明 | 核心输出 |
| 相册自动选片 + AI 文案生成 + 发布 |
|
| 检测私信未读状态与发送人列表 |
|
| 读取指定联系人私信与上下文截图 |
|
| 向指定用户发送回复消息 |
|
| 拟人化刷视频养号 |
|
| 拟人化页面上下滚动 |
|
快速开始
1. 安装依赖
git clone https://github.com/yuanZhang7777777/douyin-ai-agent.git
cd douyin-ai-agent
python -m venv .venv
# Windows: .venv\Scripts\activate | macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt2. 配置密钥与设备
推荐使用环境变量(避免密钥写入文件):
cp .env.example .env
# 或直接设置环境变量
export DOUYIN_AI_API_KEY="your_api_key"
export DOUYIN_DEVICE_SERIAL="127.0.0.1:5555" # 可选,不填则自动发现也可以复制 config/settings.yaml.example 为 config/settings.yaml 按需微调。
3. 检查设备并运行
# 验证 ADB 与在线设备
python check_devices.py
# 查看设备信息
python main.py device-info -D emulator
# 自动发布(相册防重接续)
python main.py auto-publish -D emulator
# 批量发布本地目录视频(间隔 60 秒)
python main.py batch-publish -v ./videos -n 5 -i 60 -D emulator
# 私信自动巡检与 AI 回复
python main.py check-messages -D phone
python main.py auto-reply -D phone
# 模拟真人浏览养号 60 秒
python main.py browse -d 60 -D phone运行单元测试
pip install pytest
pytest -v免责声明
本项目仅用于技术学习、AI Agent 移动端交互研究及合规账号运营效率工具探索,请严格遵守相关平台服务协议与法律法规,切勿用于违规刷量或骚扰行为。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Real iPhones your AI agent drives over MCP: post on TikTok, Instagram, YouTube, answer comments.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Autonomous AI video editor over MCP: 37 tools, 189+ actions, 280+ caption templates, MP4 export.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables full Android control from any AI agent via 7 MCP tools, including screen capture, touch interaction, app management, and system control.35 PyPIMIT
- AlicenseBqualityBmaintenanceGive any LLM agent a real Android or iPhone. 62 MCP tools: tap, swipe, type, screenshot, screen-tree reading, app launch, camera, TTS, crash reports, batched execution. Android via ADB, iPhone via WebDriverAgent, on-device inference, Docker+KVM emulators. Works with Claude Code, Cursor, LangChain, LlamaIndex, and any MCP client. MIT.66178 PyPI430MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to see and operate a real Android phone over adb by fusing live screenshots with UI-tree data, supporting look, tap, swipe, type, and screenshot actions through any MCP client.4MIT
- AlicenseNot gradedqualityCmaintenanceAn Android UI automation MCP server that exposes 30+ ADB-backed tools, letting AI agents control phones or emulators to detect elements, tap, type, and orchestrate the full ticket-purchasing flow. It targets ticket-grabbing on Damai, Maoyan, and Fliggy, with millisecond-precision waiting and automatic failure screenshots.8MIT