Douyin Upload MCP Skill logo

Douyin Upload MCP Skill

Community
WJZ-P

基于浏览器自动化的抖音视频/图文上传 MCP & Skill,适用于openclaw或任何支持skill,mcp的agent. o( ̄▽ ̄)ブ

PublisherWJZ-P
Repositorydouyin-upload-mcp-skill
LanguageJavaScript
Forks
20
Stars
84
Available tools
0
Transport typestdio
LicenseAGPL-3.0
Links
  • Connect tools to AI workflows

    Douyin Upload MCP Skill exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    84 stars and 20 forks from the linked repository.

基于 CDP 操控抖音创作者平台,实现视频、图文的全自动发布。

douyin-upload-mcp-skill

基于 CDP(Chrome DevTools Protocol)的抖音创作者平台自动化上传服务,通过 MCP 协议对外暴露工具,支持视频和图文的全自动发布。

功能

  • 视频发布:上传视频 → 等待转码 → AI 封面推荐 → 填写标题/简介 → 一键发布
  • 图文发布:上传多张图片 → 填写标题/简介 → 自动选择音乐 → 一键发布
  • 登录管理:扫码 → 短信验证 → 验证码输入,全流程自动推进
  • 浏览器托管:独立 Daemon 进程管理 Chrome 生命周期,闲置 30 分钟自动销毁

快速开始

1. 安装依赖

bash
npm install

2. 作为 MCP 服务使用(推荐)

在 MCP 客户端配置中添加:

json
{
  "mcpServers": {
    "douyin": {
      "command": "node",
      "args": ["<项目绝对路径>/src/mcp-server.js"]
    }
  }
}

或手动启动:

bash
npm run mcp

3. 运行 Demo 测试

bash
# 视频发布
node src/demo.js

# 图文发布
node src/demo-imagetext.js

MCP 工具列表

核心发布

工具说明必填参数可选参数
douyin_publish_video发布视频filePathtitle, description, timeout
douyin_publish_imagetext发布图文filePathstitle, description

登录与状态

工具说明可选参数
douyin_check_login检查登录状态并推进登录流程smsCode
douyin_probe探测页面元素状态—
douyin_screenshot页面截图—

页面操作

工具说明参数
douyin_navigate_to导航到指定抖音 URLurl, timeout
douyin_reload_page刷新页面timeout
douyin_browser_info获取浏览器连接信息—

登录流程

MCP 不支持中途交互,登录需要多次调用 douyin_check_login 推进:

第 1 次调用 → phase: qrcode           → 截图保存二维码,用户扫码
第 2 次调用 → phase: sms_verification → 自动点击「接收短信验证码」
第 3 次调用 → phase: sms_code_input   → 提示输入验证码
第 4 次调用 → phase: logged_in        → 传入 smsCode 完成登录

架构

MCP Client → mcp-server.js → index.js → browser.js → Daemon
                                ↓
                          douyin-ops.js → operator.js → CDP → Chrome → douyin.com
层文件职责
协议层mcp-server.jsMCP 工具注册,stdio 传输
入口层index.js对外暴露 createDouyinSession()
业务层douyin-ops.js抖音业务编排(上传、填写、发布)
原子层operator.jsCDP 底层操作(locate/click/type),带人类行为模拟
连接层browser.js连接 Daemon 获取浏览器实例
Daemondaemon/独立进程管理浏览器生命周期

配置

所有配置通过环境变量或 .env 文件设置。项目根目录已提供 .env 模板,可直接修改。

配置优先级: process.env > .env.development > .env > 代码默认值

.env.development 不会被 git 追踪,适合存放本地私有配置(如浏览器路径)。

浏览器配置

变量默认值说明
BROWSER_PATH自动检测浏览器可执行文件路径,支持 Chrome / Edge / Chromium。不设则自动按优先级检测系统已安装的浏览器
BROWSER_DEBUG_PORT40821CDP 远程调试端口。多个 skill(如 gemini-skill)共享同一端口即共享同一浏览器实例
BROWSER_HEADLESSfalse是否无头模式。首次使用建议关闭(false),方便扫码登录
BROWSER_USER_DATA_DIR~/.wjz_browser_data浏览器用户数据目录,保存登录态、cookies 等。首次运行会自动从系统默认浏览器目录克隆
BROWSER_PROTOCOL_TIMEOUT60000CDP 协议超时时间(毫秒)。视频上传等长操作可适当增大

Daemon 配置

变量默认值说明
DAEMON_PORT40225Daemon HTTP 服务端口。与 gemini-skill 共享同一 Daemon
DAEMON_TTL_MS1800000闲置超时时间(毫秒),默认 30 分钟。超时后自动关闭浏览器并退出 Daemon,下次调用时自动重新拉起

其他配置

变量默认值说明
OUTPUT_DIR./douyin-output截图、二维码等输出文件目录
DOUYIN_URLhttps://creator.douyin.com/抖音创作者平台首页 URL

关于 OpenClaw 浏览器复用

OpenClaw 的默认 CDP 端口是 18800。如果你希望复用 OpenClaw 已启动的浏览器会话,可以将 BROWSER_DEBUG_PORT 改为 18800:

env
BROWSER_DEBUG_PORT=18800

但请注意:OpenClaw 自带的浏览器会话没有集成 Stealth 反爬插件,在反检测能力上不如本项目自行维护的浏览器实例。本项目使用 puppeteer-extra-plugin-stealth 提供了完整的反爬保护(隐藏 webdriver 标记、模拟真实浏览器指纹等),能更好地规避抖音平台的自动化检测。

建议:除非有特殊需求,推荐使用默认端口 40821,让项目自行管理浏览器实例以获得最佳的反爬效果。

技术栈

  • puppeteer-core + puppeteer-extra-plugin-stealth:CDP 连接 + 反检测
  • @modelcontextprotocol/sdk:MCP 协议实现
  • 原生 Node.js HTTP:Daemon 微服务

License

AGPL-3.0

LINUX DO

本项目支持 LINUX DO 社区

Use Douyin Upload MCP Skill MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Douyin Upload MCP Skill is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Douyin Upload MCP Skill as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Douyin Upload MCP Skill MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "douyin-upload-mcp-skill": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Douyin Upload MCP Skill MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Douyin Upload MCP Skill MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Douyin Upload MCP Skill to help me with this task?
Douyin Upload MCP Skill
Sure. I read it.
Here is what I found using Douyin Upload MCP Skill.

Frequently asked questions

What is the Douyin Upload MCP Skill MCP server used for?

Douyin Upload MCP Skill is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Douyin Upload MCP Skill MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Douyin Upload MCP Skill with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Douyin Upload MCP Skill MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Douyin Upload MCP Skill connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Douyin Upload MCP Skill MCP to TypingMind?

Douyin Upload MCP Skill runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Douyin Upload MCP Skill MCP provide in TypingMind?

Douyin Upload MCP Skill exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Douyin Upload MCP Skill MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Douyin Upload MCP Skill requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇