yt-curator-mcp
Enables YouTube playlist curation including inventory, deduplication, merging, and deletion via MCP tools.
README
yt-curator 🎬🧹
YouTube playlist curation engine — inventory, deduplicate, merge, clean up, and reorganise thousands of playlists spanning 20 years.
┌────────────────────────────────────────────────────┐
│ yt-curator │
│ │
│ ┌─────────┐ ┌─────────┐ ┌────────────────────┐ │
│ │ CLI │ │ MCP │ │ Python Library │ │
│ │ (Click)│ │ (FastMCP)│ │ (import yt_curator)│ │
│ └────┬────┘ └────┬────┘ └─────────┬──────────┘ │
│ │ │ │ │
│ └──────┬─────┘─────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ YouTube Data │ │
│ │ API v3 + OAuth│ │
│ │ + Local SQLite │ │
│ └─────────────────┘ │
└────────────────────────────────────────────────────┘
Features
- Full inventory — scan all your playlists and every video in them into a local SQLite database
- Dead video detection — find deleted, private, and blocked videos across all playlists
- Cross-playlist deduplication — find every video that appears in 2+ playlists
- Intra-playlist dedup — remove duplicate copies within a single playlist
- Merge playlists — move all videos from one playlist into another, then delete the source
- Bulk delete — remove empty or unwanted playlists
- Merge suggestions — AI-free title-similarity analysis to find consolidation candidates
- Privacy audit — see which playlists are public vs private
- Dry-run everything — all destructive operations preview before executing
Three Interfaces
1. CLI (yt-curator)
# OAuth setup (one-time)
yt-curator auth
# Full inventory scan
yt-curator inventory
# Reports
yt-curator report
yt-curator find-dupes
yt-curator find-dead
# Curation (try --dry-run first!)
yt-curator merge PL_source_id PL_target_id --dry-run
yt-curator dedup PL_playlist_id --dry-run
yt-curator delete PL_playlist_id --dry-run
# Start MCP server
yt-curator serve-mcp
2. MCP Server (yt-curator-mcp)
Register as a backend for any MCP client (Claude Desktop, Hermes, Cursor, etc.).
stdio mode (default — plug-and-play with Claude Desktop):
{
"mcpServers": {
"yt-curator": {
"command": "yt-curator",
"args": ["serve-mcp"]
}
}
}
SSE mode (register with the mcp-gateway):
yt-curator serve-mcp --host 0.0.0.0 --port 39401
Then add to your gateway config:
backends:
- name: yt-curator
type: sse
url: http://127.0.0.1:39401
Available MCP tools:
| Tool | Description |
|---|---|
list_playlists() |
List all playlists in the inventory DB |
get_playlist_contents(id) |
List all videos in a specific playlist with status |
scan_inventory() |
Full scan — all playlists, items, and video status |
curation_report() |
Summary stats from inventory |
find_duplicates(min=2) |
Cross-playlist duplicate detection |
find_dead_videos() |
Dead/private/blocked videos |
find_empty_playlists() |
Zero-video playlists |
suggest_merges() |
Title-similarity merge candidates |
merge_playlists(src, dst, dry_run=True) |
Merge with dry-run mode |
delete_playlist(id, dry_run=True) |
Delete with dry-run mode |
remove_dead_videos(dry_run=True) |
Bulk dead video removal |
auth_status() |
Check OAuth credentials |
3. Python Library (import yt_curator)
from yt_curator.core.client import YouTubeClient
from yt_curator.core.inventory import scan_all
client = YouTubeClient()
report = scan_all(client)
print(f"Scanned {report.total_playlists} playlists")
Quota Budget
YouTube Data API v3 default: 10,000 units/day (free).
| Operation | Cost per call | Your 900-playlist scan |
|---|---|---|
playlists.list |
1 | ~18 calls |
playlistItems.list |
1 | ~900 calls |
videos.list (status check) |
1 | ~120 calls |
playlists.insert / .update |
50 | per operation |
playlistItems.insert / .delete |
50 | per operation |
| Full inventory scan | ~1,200 units ✅ |
A full scan uses ~12% of your daily quota, leaving 8,800 units for curation writes (about 175 write operations per day).
Setup
One-time: Google Cloud + OAuth
- Go to Google Cloud Console
- Create a project → Enable YouTube Data API v3
- APIs & Services → Credentials → Create Credentials → OAuth client ID
- Application type: Desktop app
- Download
client_secret.json
- Save it to
~/.config/yt-curator/client_secret.json - Run
yt-curator auth— opens a browser for Google login
Tip for headless servers: Run
yt-curator authonce on a desktop machine with a browser, then copy~/.config/yt-curator/token.jsonto the server.
NixOS Module
Add yt-curator to your flake inputs:
{
inputs.yt-curator = {
url = "github:telos-systems/yt-curator";
inputs.nixpkgs.follows = "nixpkgs";
};
}
Then enable the module:
{
imports = [ yt-curator.nixosModules.default ];
services.yt-curator = {
enable = true;
mcpServer.enable = true;
mcpServer.port = 39401;
credentials.clientSecretPath = config.sops.secrets."yt-curator/client_secret".path;
};
}
Or use the flake directly:
nix run github:telos-systems/yt-curator -- inventory
nix run github:telos-systems/yt-curator#mcp -- serve-mcp
Project Structure
yt-curator/
├── src/yt_curator/
│ ├── __init__.py # Package entry
│ ├── cli/app.py # Click CLI (11 commands)
│ ├── mcp/server.py # FastMCP server (12 tools)
│ ├── core/
│ │ ├── auth.py # OAuth 2.0 + token storage
│ │ ├── client.py # YouTube API client wrapper
│ │ ├── inventory.py # Full scan → SQLite
│ │ ├── curator.py # Merge, delete, dedup operations
│ │ ├── dedup.py # Cross-playlist dedup + suggestions
│ │ └── __init__.py # Data models (dataclasses)
│ └── db/schema.py # SQLite schema
├── nix/module.nix # NixOS module
├── flake.nix # Nix flake
├── pyproject.toml # Python project metadata
├── LICENSE # MIT
└── README.md
Why This Exists
YouTube's web UI has no bulk operations. If you have 900+ playlists accumulated over 20 years, there's no way to:
- Find which videos are dead across all playlists
- See which videos appear in 10 different playlists
- Merge similar playlists
- Delete 50 empty playlists in one go
Existing MCP servers for YouTube are read-only analytics tools or basic CRUD wrappers. None do inventory, dedup, merge, or bulk curation. This fills that gap.
Roadmap
- [x] Core: inventory, dedup, merge, delete, dead video removal
- [x] CLI: 11 commands with --dry-run
- [x] MCP server: 12 tools (stdio + SSE)
- [x] Nix flake + NixOS module
- [ ] AI-assisted reorganisation (local LLM via Ollama)
- [ ] Playlist-as-code (declarative YAML → desired state)
- [ ] GitHub release + PyPI publish
- [ ] Scheduled inventory drift detection (weekly cron)
License
MIT © 2026 Telos Systems / Danny Poulson
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。