douyin-favorites-mcp
douyin-favorites-mcp · 抖音收藏夹 MCP 서비스
抖音 즐겨찾기 / 抖音 즐겨찾기용 Model Context Protocol (MCP) 서버 — 로그인된 브라우저 세션을 통해 자신의 계정의 抖音 즐겨찾기(기본 즐겨찾기), 즐겨찾기 폴더 / 앨범(예: "학습")을 읽고, 구조화된 데이터를 AI 어시스턴트(Claude / WorkBuddy 등)에서 사용할 수 있도록 내보냅니다.
English: An MCP server that reads your personal Douyin (抖音) favorites and collection folders (收藏夹/专辑) via a logged-in browser session, for use with Claude / WorkBuddy and other MCP clients.
⚠️ 개인 승인 용도: 이 도구는 현재 로그인된 계정의 즐겨찾기 데이터만 읽으며, 타인 데이터 수집, 캡차 우회 또는 서명 해독 기능을 제공하지 않습니다.
기능
도구 | 설명 |
| 유휴 Chrome을 열어 抖音 QR 코드 로그인 (세션이 로컬 profile에 저장됨) |
| 현재 session이 유효한지 확인 (sessionid cookie 기반) |
| 로컬 브라우저 profile 삭제 |
| 헬스 체크 |
| 현재 로그인 계정의 기본 정보 가져오기 (닉네임/uid/팔로워/팔로잉/좋아요 수) |
| 기본 "즐겨찾기" 폴더의 동영상 목록 가져오기 |
| 모든 즐겨찾기 폴더(앨범) 나열: id, 이름, 동영상 수 |
| 지정된 즐겨찾기 폴더(앨범)의 동영상/이미지 텍스트 가져오기 |
| 단일 동영상 상세 정보 및 상호작용 데이터 가져오기 |
지원 콘텐츠 유형: 동영상 + 이미지 텍스트(장문), 제목 / 작성자 / 상호작용 데이터 / 표지 / 재생 시간을 모두 추출할 수 있습니다.
Related MCP server: Bilibili MCP Server
작동 원리
抖音 웹 API는 런타임 서명 보호 기능이 있어 API 호출을 직접 위조할 수 없습니다. 이 서비스는 다음을 사용합니다:
Playwright로 실제 Chrome 실행 (영구 profile 사용);
QR 코드로 한 번 로그인하면 session cookie가 로컬에 저장됩니다;
페이지 UI를 구동하여("즐겨찾기" 탭 클릭 후 "즐겨찾기 폴더" 하위 탭 클릭), XHR 응답을 가로챕니다;
구조화된 데이터를 파싱하여 반환합니다.
검증된 API (2026-08):
즐겨찾기 폴더 목록:
GET /aweme/v1/web/collects/list/즐겨찾기 폴더 콘텐츠:
GET /aweme/v1/web/collects/video/list/?collects_id=...&cursor=0&count=10전체 즐겨찾기:
POST /aweme/v1/web/aweme/listcollection/(cursor는 POST body에 있음)
설치
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -e .
playwright install chromium구성 (WorkBuddy / Claude Desktop)
MCP 구성에 추가 (예: ~/.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_DIR은 브라우저 profile(로그인 상태)이 저장되는 위치이므로 버전 관리에 포함하지 마세요.
최초 사용
# 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>"})로그인 상태는 세션 간에 유지되며, 일반적으로 몇 주에 한 번만 QR 코드를 다시 스캔하면 됩니다.
테스트
pytest tests/ -v
python scripts/verify.py # 端到端验证(需要登录态)
python scripts/verify_collects.py # 列收藏夹 + 第一个收藏夹的视频주의사항 및 알려진 제한 사항
로그인 상태 감지는 session cookie 기반입니다 (
sessionid/sessionid_ss/sid_guard/sid_tt). DOM 요소로 판단하지 마세요 (抖音 홈페이지는 비로그인 상태에서도 작성자 아바타가 많아 오판할 수 있습니다).抖音 홈페이지는
networkidle에 도달하지 않으므로 모든 탐색은domcontentloaded를 사용합니다.즐겨찾기 페이지네이션은 실제 마우스 휠로 트리거됩니다 (먼저
mouse.move로 콘텐츠 영역으로 이동한 후wheel).window.scrollTo는 작동하지 않습니다."즐겨찾기" 탭은 클릭해야 트리거됩니다.
?showTab=favoriteURL 매개변수만으로는 작동하지 않습니다.get_video_detail은 抖音 상세 API 개편으로 일시적으로 사용하지 못할 수 있습니다.
면책 조항
이 프로젝트는 개인 학습, 연구 및 데이터 정리 목적으로만 사용됩니다. 본 도구를 사용함으로써 다음 사항에 동의하는 것으로 간주됩니다:
본인에게 완전한 접근 권한이 있는 抖音 계정 데이터에만 접근합니다;
본 도구를 대량 크롤링, 데이터 판매, 조작 또는 기타 불법/위반 행위에 사용하지 않습니다;
抖音 API는 수시로 변경될 수 있으며 도구가 일시적으로 작동하지 않을 수 있음을 이해합니다.
위 조항 또는 관련 법률/규정을 위반하여 발생하는 모든 결과는 사용자 본인의 책임입니다.
라이선스
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.
Related MCP Connectors
Douyin short video, Xiaohongshu (RedNote) notes, comments & creator profile scraper remote MCP API.
Douyin short video, Xiaohongshu (RedNote) notes, comments & creator profile scraper remote MCP API.
MCP server for Hailuo (MiniMax) AI video generation
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP 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