loading…
Search for a command to run...
loading…
Enables automated Douyin video uploads and account management using Playwright for browser simulation. It supports QR code login, cookie persistence, and automa
Enables automated Douyin video uploads and account management using Playwright for browser simulation. It supports QR code login, cookie persistence, and automated metadata handling for publishing videos through natural language or API commands.
基于 Playwright 模拟浏览器操作实现的抖音 (Douyin) MCP 服务器,支持视频上传功能。
douyin-mcp/
├── server-playwright.js # MCP HTTP 服务器 (端口 18062)
├── login-playwright.js # 扫码登录工具
├── package.json # 依赖配置
├── cookies.json # 登录状态 (自动生成)
└── README.md # 使用文档
cd douyin-mcp
npm install
Playwright 浏览器会自动安装。
# 在 douyin-mcp 目录
npm run login
# 或
node login-playwright.js
运行后会打开浏览器窗口,显示二维码:
登录成功后会自动保存 cookies。
# 在 douyin-mcp 目录
npm start
# 或
node server-playwright.js
服务器运行在 http://localhost:18062
使用 curl 调用 API:
curl -X POST http://localhost:18062/api/v1/publish \
-H "Content-Type: application/json" \
-d '{
"title": "视频标题",
"content": "视频简介",
"video_path": "/path/to/video.mp4",
"tags": ["标签 1", "标签 2"],
"visibility": "public"
}'
GET http://localhost:18062/health
GET http://localhost:18062/api/v1/login/status
GET http://localhost:18062/api/v1/login/qrcode
POST http://localhost:18062/api/v1/publish
Content-Type: application/json
{
"title": "视频标题",
"content": "视频简介",
"video_path": "/path/to/video.mp4",
"tags": ["标签 1", "标签 2"],
"visibility": "public"
}
参数说明:
title - 视频标题content - 视频简介video_path - 本地视频文件绝对路径tags - 标签数组visibility - public(公开) 或 private(私密)在 MCP 配置中添加:
{
"mcpServers": {
"douyin": {
"command": "node",
"args": ["/path/to/douyin-mcp/server-playwright.js"]
}
}
}
抖音 cookies 有一定的有效期,如果发布时提示未登录,需要重新运行登录工具:
node login-playwright.js
MIT
本项目仅供学习和个人使用,请遵守抖音的使用条款和社区规范。
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"douyin-mcp": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.