douyin-favorites-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@douyin-favorites-mcp Show me my Douyin favorites"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
douyin-favorites-mcp · Douyin Favorites MCP Service
Model Context Protocol (MCP) server for Douyin Favorites / Douyin Collections — reads the Douyin favorites (default favorites), collection folders / albums (e.g., "Learning") of your own account via a logged-in browser session, and exports structured data for AI assistants (Claude / WorkBuddy, etc.) to use.
English: An MCP server that reads your personal Douyin (抖音) favorites and collection folders (favorites/albums) via a logged-in browser session, for use with Claude / WorkBuddy and other MCP clients.
⚠️ Personal authorized use: This tool only reads the favorites data of the currently logged-in account; it does not provide scraping of others' data, CAPTCHA bypass, or signature cracking.
Features
Tool | Description |
| Open headed Chrome to log in to Douyin via QR code (session saved in local profile) |
| Check whether the current session is valid (based on the sessionid cookie) |
| Clear the local browser profile |
| Health check |
| Get basic info of the currently logged-in account (nickname/uid/followers/following/likes) |
| Fetch the video list of the default "Favorites" folder |
| List all collection folders (albums): id, name, video count |
| Fetch videos/image-text posts in a specified collection folder (album) |
| Get details and interaction data for a single video |
Supported content types: videos + image-text posts (long articles); both allow extracting title / author / interaction data / cover / duration.
Related MCP server: Bilibili MCP Server
How It Works
The Douyin web API has runtime signature protection, so API calls cannot be directly forged. This service uses:
Use Playwright to launch a real Chrome (persistent profile);
Scan the QR code to log in once; the session cookie is saved locally;
Drive the page UI (click the "Favorites" tab, then the "Collection folders" sub-tab), intercept XHR responses;
Parse and return structured data.
Verified endpoints (2026-08):
Collection folder list:
GET /aweme/v1/web/collects/list/Collection folder contents:
GET /aweme/v1/web/collects/video/list/?collects_id=...&cursor=0&count=10All favorites:
POST /aweme/v1/web/aweme/listcollection/(cursor is in the POST body)
Installation
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -e .
playwright install chromiumConfiguration (WorkBuddy / Claude Desktop)
Add to the MCP configuration (e.g., ~/.workbuddy/mcp.json):
{
"mcpServers": {
"douyin-favorites": {
"command": "C:/absolute/path/to/douyin-favorites/.venv/Scripts/python.exe",
"args": ["-m", "douyin_favorites.server"],
"env": {
"DOUYIN_DATA_DIR": "C:/Users/<you>/.douyin-favorites"
}
}
}
}
DOUYIN_DATA_DIRis the location where the browser profile (login state) is stored; do not include it in version control.
First-Time Usage
# 1. 登录(弹出 Chrome,扫码后自动关闭)
python scripts/verify.py
# 2. 或通过 MCP 调用:
# douyin_login_start
# douyin_login_status -> {"logged_in": true}
# list_collects -> 列出收藏夹(id + 名称 + 数量)
# get_collect_videos({"collects_id": "<id>"})The login state persists across sessions; you usually only need to scan the QR code again every few weeks.
Testing
pytest tests/ -v
python scripts/verify.py # 端到端验证(需要登录态)
python scripts/verify_collects.py # 列收藏夹 + 第一个收藏夹的视频Notes and Known Limitations
Login state detection is based on session cookies (
sessionid/sessionid_ss/sid_guard/sid_tt); do not use DOM elements to determine it (the Douyin homepage shows many author avatars even when not logged in, which would cause false positives).The Douyin homepage never reaches
networkidle; usedomcontentloadedfor all navigation.Pagination on the favorites page is triggered by the real mouse wheel (first
mouse.moveto the content area, thenwheel);window.scrollTodoes not work.The "Favorites" tab must be triggered by clicking; the
?showTab=favoriteURL parameter alone has no effect.get_video_detailmay be temporarily unavailable because Douyin has revamped its detail API.
Disclaimer
This project is for personal learning, research, and data organization only. By using this tool, you confirm that:
You only access data from Douyin accounts over which you have full access rights;
You will not use this tool for bulk scraping, data resale, engagement boosting, or other illegal/non-compliant activities;
You understand that Douyin's APIs may change at any time, causing the tool to become temporarily non-functional.
Any consequences arising from violation of the above terms or applicable laws and regulations shall be borne by the user.
License
MIT
Available Tools
9 toolsdouyin_health_checkA
Return login status and profile health for diagnostics.
Inputs: no named parameters.
douyin_login_startA
Open a headed Chrome window for the user to scan QR code and login to Douyin.
Inputs: no named parameters.
douyin_login_statusB
Check whether the stored Douyin browser session is still valid.
Inputs: no named parameters.
douyin_logoutA
Clear the stored Douyin browser profile and force re-login next time.
Inputs: no named parameters.
get_collect_videosB
List videos inside a specific Douyin collection folder by collects_id.
Inputs: collects_id (required), limit.
get_self_user_infoB
Get basic info of the currently logged-in Douyin account.
Inputs: no named parameters.
get_video_detailB
Get detailed metadata and stats for a Douyin video by aweme_id or share_url.
Inputs: aweme_id, share_url.
list_collection_videosC
List videos from the default Douyin 'favorite' collection.
Inputs: limit, cursor.
list_collectsA
List the logged-in user's Douyin collection folders (收藏夹/专辑), with id, name and video count.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target distinct actions (login, logout, list, get detail), but douyin_login_status and douyin_health_check substantially overlap since health_check also reports login status. The rest are clearly separable.
Four tools use a douyin_ prefix while five use bare verb_noun, and there is confusing terminology drift between 'collection'/'collect' (list_collects, get_collect_videos). Readable but not a single consistent pattern.
Nine tools is well-scoped for a login-plus-collections server, with each tool earning its place and no bloat.
The surface is essentially read-only for a 'favorites' server: no add/remove-favorite, save-to-collection, or search operations, so agents cannot actually manage favorites as the name implies. Core listing and detail reads are covered.
Maintenance
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
MCP server for Kling AI video generation
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP server enabling AI agents to generate AI videos and images, analyze video content, and download videos from Douyin and Xiaohongshu.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server powered by public Bilibili APIs so AI agents can search videos and read public video and creator metadata.MIT
- FlicenseBqualityDmaintenanceMCP server wrapping social-auto-upload CLI for AI clients to verify cookies and publish videos/notes to Chinese social platforms (Douyin, Kuaishou, Xiaohongshu, Bilibili).10-
- AlicenseBqualityDmaintenanceA local MCP server that reads Douyin creator data from the browser and provides tools to query, compare, and analyze video performance metrics for AI agents.131AGPL 3.0