YTDL RMCP
ai.dinglebear由 dinglebear.ai 發布v1.0.2更新於 Oct 24, 2026
Rust MCP server and CLI for yt-dlp search, downloads, metadata, transfers, and Plex playlists.
發布方自己的服務:RMCP
概覽
在本機執行的 Rust MCP 伺服器,讓助理搜尋 YouTube、用 yt-dlp 下載音訊或影片、寫入標籤並傳輸媒體,以及同步 Plex 播放清單。
- 可以做什麼
- 搜尋 YouTube 並提供可互動的搜尋介面,回傳結果連結而不下載媒體;以唯讀方式探查標題、長度、上傳者和格式數量。從一個或多個連結下載音訊、影片或兩者,可設定格式、音質、解析度和容器。寫入音訊中繼資料標籤,透過 AcoustID/MusicBrainz 指紋辨識本機檔案,並可選擇把高信賴度標籤寫回檔案。把結果傳輸到本機、SSH 或 rclone 目標,維護可重複安全的下載紀錄,並從佇列重試失敗的傳輸。依成功下載紀錄建立或預覽 Plex 音訊播放清單,並彙總下載統計。
- 適用情境
- 適合個人媒體庫工作流程:希望助理尋找 YouTube 媒體、下載到可信目標、寫入標籤並讓 Plex 播放清單保持同步。唯讀的搜尋與探查路徑可先試用;下載與寫標籤路徑則供可信呼叫方使用。
- 執行需求
- 透過 stdio 在本機執行,通常以 npx 和 Node.js 啟動。首次執行會自動下載 yt-dlp 和 ffmpeg。下載需要 YTDLP_TARGET_PATH(可選 YTDLP_VIDEO_TARGET_PATH);本機目標還需 YTDLP_ALLOW_LOCAL_TARGETS。SSH 目標需要以金鑰為基礎的 ssh,可選 rsync;rclone 目標需要已設定的 rclone 遠端。Plex 同步需要 YTDLP_PLEX_URL 和 YTDLP_PLEX_TOKEN;辨識需要 YTDLP_ACOUSTID_CLIENT_KEY 和 fpcalc。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 YTDL RMCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ytdl-rmcp
yt-dlp search, download, metadata, delivery, and Plex workflows over MCP and CLI.
Written in Rust on the rmcp crate. yt-dlp
and ffmpeg are auto-downloaded into a per-user cache on first run, so the host
needs neither pre-installed — the one binary is the whole install.
30-second path: npx -y @dinglebear/rytdl setup -> configure a target path ->
call youtube_search or youtube_probe; use youtube_download only after the
destination and trust boundary are clear.
Status: production personal-media MCP server. Read-only search/probe/stats paths are safe; download, playlist, queue-drain, and tag-writing paths create or move state and are intended for trusted callers.
Not for: a generic web-downloader SaaS, a multi-tenant media ingestion boundary, a replacement for yt-dlp's upstream site handling, or an arbitrary filesystem writer for untrusted MCP callers.
Contents
- Naming
- Capabilities And Boundaries
- Install
- Quickstart
- Client Configuration
- Runtime Surfaces
- MCP Tool Reference
- CLI Reference
- Configuration
- Authentication
- Safety And Trust Model
- Architecture
- Distribution Contract
- Development
- Verification
- Deployment
- Troubleshooting
- Related Servers
- Documentation
- License
Naming
The crate and npm package use the *-rmcp family naming pattern, while the
repository and runtime binary are rytdl so local shells get a short
Rust-native command.
Capabilities And Boundaries
- Searches YouTube through yt-dlp without downloading media.
- Downloads audio, video, or both into a staging tree, tags audio metadata, and transfers the result to local, SSH, or rclone destinations.
- Optionally fingerprints audio through AcoustID/MusicBrainz and syncs completed audio downloads into a Plex playlist.
- Builds Plex playlists from successful transfer history and drains server-made retained-staging transfer manifests.
- Exposes an MCP App search UI for hosts that can render embedded widgets.
- Keeps a JSONL ledger for repeat-safe downloads and stats.
Features
- Audio, video, or both — audio-first by default, with separate targets for audio and video.
- Proper tagging — embeds title / artist / album / date and cover art, and
organizes output as
Artist/Title [id].extso media servers (Plex, etc.) index it cleanly. A non-greedyArtist - Titleparse recovers the artist from free-form video titles. Source.info.json, thumbnail, and description sidecars are preserved next to the media for future retagging/indexing. Common YouTube title noise like(Official Video),[Official Audio], and trailing channel handles is stripped from embedded title metadata by default. - Self-contained paths — the binary downloads/caches yt-dlp + ffmpeg when run directly; the container image bakes in ffmpeg, fpcalc, SSH, and rsync for media-host batch jobs.
- Self-installing —
ytdl-rmcp setupregisters the server into Claude Code, Codex, and/or Gemini CLI via each tool's ownmcp add. - Robust transfers — local paths (
/path) are copied in-process by the binary itself, SSH targets (host:/path) usersync -a --partial --protect-argswith anscpfallback whenrsyncis missing, and rclone targets (remote:pathorrclone:remote:/path) userclone copy. On transfer failure the local staging copy is kept for retry and recorded as a drainable manifest foryoutube_transfer_queue. - Repeat-safe —
use_archiverecords downloaded IDs (per mode) and skips them on later runs; YouTube mix/radio URLs are auto-cleaned to the seed video. - Stats-ready ledger — every completed download call appends a JSONL entry with timestamp, destinations, files, bytes, uploader, and transfer status.
- Plex playlist sync — when Plex credentials are configured, downloaded
audio is added to
yt-dlp Downloadsby default.
MCP Tool Reference
youtube_download parameters
When Plex credentials are configured, successful downloads that produced audio
files search Plex for each downloaded track, create the target playlist if
needed, and add missing tracks while skipping entries already present. The
default playlist is yt-dlp Downloads; set YTDLP_PLEX_PLAYLIST or pass
plex_playlist to override it. Plex errors are reported as
plex_playlist_error and do not make the completed download fail. JSON
responses include a plex_playlist summary with matched, added,
already_present, and missing counts.
Canonical metadata matching through MusicBrainz/AcoustID is documented in
docs/musicbrainz-acoustid.md. youtube_download automatically runs
high-confidence MusicBrainz retagging for downloaded audio when
YTDLP_ACOUSTID_CLIENT_KEY is configured; youtube_identify remains available
for previewing or repairing existing library files, with manual tag writes
enabled by write_tags=true.
youtube_download JSON response
With response_format=json, the call returns a single object describing the
batch:
Each items[].status is one of:
ok— succeeded with files.partial— an error occurred but some files were still produced.failed— errored with no files.skipped— nothing new (already in the archive).
Optional keys are attached only when the relevant stage ran:
metadata_retag— MusicBrainz/AcoustID auto-retag summary (attempted,matched,written,skipped,errors, or anerrorstring); present whenYTDLP_ACOUSTID_CLIENT_KEYis configured.plex_playlist— Plex playlist summary (playlist,matched,added,already_present,missing);plex_playlist_erroris set instead if the Plex update failed (a Plex failure does not fail the download).history_error— set when the download succeeded but the JSONL ledger append failed.
youtube_probe takes urls and response_format.
youtube_plex_playlist
Build or preview Plex audio playlists from successful ytdl-rmcp download history.
Actions:
Candidates are history-derived and audio-only. Failed or retained-staging transfers are intentionally excluded.
apply can return plexamp_url, plex_web_url, and
playback_link_status. plexamp_url is a best-effort generated
listen.plex.tv playback link, not an official Plexamp API guarantee. The
regular Plex playlist API calls use the official Plex Media Server API.
youtube_transfer_queue
List and drain server-created transfer failure manifests.
Actions:
The queue never accepts arbitrary filesystem paths. Retry uses the original target paths recorded at failure time and re-checks local target policy before transfer. Manifests are created by the local server when a transfer fails while the staging directory, manifest ID, file list, and original targets still match.
youtube_identify parameters
youtube_identify runs Chromaprint fpcalc, sends the fingerprint to AcoustID,
and returns MusicBrainz recording candidates. When the best candidate is
high-confidence, it also fetches the MusicBrainz recording/release data and
includes a retag_preview showing the canonical artist, title, release, release
date, release type, track number, and MusicBrainz IDs. By default it is
preview-only. With write_tags=true, it writes the preview to the file with
Lofty, including common title/artist/album/date/track fields plus MusicBrainz
recording, release, release-group, and release-type tags. It requires
YTDLP_ACOUSTID_CLIENT_KEY; set FPCALC_PATH if fpcalc is not on PATH.
youtube_search parameters
youtube_search_ui accepts the same input and returns the same search payload,
plus MCP App metadata for hosts that can render the embedded UI. Hosts without
app rendering still receive the normal search result text and structured data.
MCP App pattern
youtube_search_ui is the widget-backed entry point for this repo:
- The tool descriptor advertises
_meta.ui.resourceUri. - The server exposes
ui://ytdl-rmcp/youtube-search.htmlthroughresources/listandresources/read. - The resource uses
text/html;profile=mcp-appand an explicit CSP metadata block. .mcpb/.dxtpackaging installs the local server; UI resources are still advertised through the MCP tools/resources protocol and are host-rendered.
youtube_stats parameters
JSON stats include total_downloads, total_files, total_bytes,
skipped_entries, by_kind, by_uploader, and recent. Bucket fields include
downloads (compatibility alias for call count), calls, items, files,
bytes, and human-readable size. Malformed ledger lines are skipped and
counted instead of failing the whole stats call. If a download succeeds but the
ledger append fails, the download response still succeeds and includes
history_error in JSON output.
CLI Reference
The CLI owns process setup and diagnostics; media operations are exposed as MCP tools.
The npm launcher exposes the same binary:
Install
Run the guided installer through npm:
Or install the command globally:
The npm package downloads the matching GitHub Release binary during
postinstall; the installed command is the Rust binary served through a tiny
Node launcher. You can also use the one-line installer:
Or download the binary tarball for your platform from Releases, or build it (see below). The guided setup fetches yt-dlp + ffmpeg, prompts for your audio/video target paths, detects which agent CLIs are present, and registers the server into the ones you pick.
Quickstart
After setup, prove the read-only path first:
For raw MCP clients, call a read-only tool with JSON-RPC tools/call:
Then probe a known URL before downloading:
Use youtube_download only after YTDLP_TARGET_PATH or
YTDLP_VIDEO_TARGET_PATH points at a destination you are comfortable letting
trusted MCP callers write into.
Client Configuration
Run without subcommands, npx -y @dinglebear/rytdl serves MCP over stdio. Register it
yourself:
If you already installed a standalone binary with npm i -g @dinglebear/rytdl,
scripts/install.sh, or a release tarball, you can use that binary path in
place of npx -y @dinglebear/rytdl.
For raw MCP JSON configs, include the required target path env var and the YouTube extractor override:
The checked-in .mcp.json is also a complete raw MCP profile: it declares the
same user_config keys used by the plugin/bundle manifests, supplies defaults
for local gateway imports, and maps every setting into the server environment.
For reliable YouTube search/probe behavior it defaults
YTDLP_EXTRACTOR_ARGS to youtube:player_client=android; official music-video
results frequently reject yt-dlp's default YouTube clients during metadata
extraction.
Runtime Surfaces
Distribution Contract
- npm launcher —
npx -y @dinglebear/rytdldownloads and runs the matching GitHub Release binary. Run without subcommands, it serves MCP over stdio;npx -y @dinglebear/rytdl setupruns the guided installer. Stable releases publish the package from GitHub Actions with npm provenance. - Claude Code plugin —
.claude-plugin/plugin.jsonprompts for config viauserConfig;.mcp.jsonlaunchesnpx -y @dinglebear/rytdl, which downloads the matching GitHub Release binary through npm. - Gemini CLI extension —
gemini-extension.json; install withgemini extensions install https://github.com/dinglebear-ai/rytdl. MCP clients should prefer the npm launcher command,npx -y @dinglebear/rytdl. - Container image —
ghcr.io/dinglebear-ai/rytdl:mainis published on every push tomain, or build locally withdocker build -t ytdl-rmcp:local .. It includesffmpeg,fpcalc,openssh-client,rclone, andrsync. Seedocs/container.mdfor MCP and mounted-library examples. - MCP bundle (
.mcpb/.dxt) —mcpb/manifest.jsondefines abinary-type bundle for one-click install in MCPB-capable desktop hosts. Every main release publishesytdl-rmcp.mcpbplus a legacyytdl-rmcp.dxtalias; both contain the same linux + windows binaries. The bundle defaults optional config values to empty strings so Claude Desktop can install it before you fill in the destination settings. Configure at least the target path in the extension settings before downloading. Build one locally from prebuilt binaries withscripts/build-mcpb.sh(needs Node for the@anthropic-ai/mcpbCLI).
Configuration
Only one value is required for downloads: YTDLP_TARGET_PATH.
YTDLP_VIDEO_TARGET_PATH is required only when video files should land
somewhere different from audio. youtube_search, youtube_probe, and
youtube_identify do not need a destination. The install manifests default
YTDLP_EXTRACTOR_ARGS to youtube:player_client=android because that client
survives common YouTube metadata blocks that make official music-video search
results look unavailable.
Target path forms:
/path/to/library— local directory. Copied by the binary's own filesystem copy (no external tool); a destination nested inside the staging source is rejected. RequiresYTDLP_ALLOW_LOCAL_TARGETS=truebecause local paths let MCP callers choose write locations.host:/path/to/library— SSH target. Uses the existing rsync/scp flow and honorsYTDLP_SSH_OPTS.remote:path/to/library— rclone target with a relative remote path. Usesrclone copy;rclonemust be configured onPATHfor the server process.rclone:remote:/path/to/library— explicit rclone target for an absolute remote path; without therclone:prefix,host:/pathremains SSH by design.
Maintainers: this table is maintained by hand.
scripts/check-packaging.shcross-checks the machine-readable config surfaces (the Claude plugin,.mcp.jsonuser_config,gemini-extension.json, andmcpb/manifest.json) and verifies this README mentions every mapped env var name. It does not compare README descriptions or defaults. When you add, rename, or remove aYTDLP_*,FFMPEG_*,FPCALC_PATH, orYTDLP_LOGenv var, update this table manually.
Authentication
This server speaks stdio only — it opens no network listener, binds no port, and has no HTTP auth layer. Access is whatever the local MCP client grants to the process it launches. External credentials live in operator-controlled environment variables, local config, SSH agents, rclone config, or Plex/AcoustID variables.
MCP callers never provide Plex tokens, SSH keys, rclone credentials, hash pins, or downloader binary paths in tool arguments. Tool arguments carry media URLs, search/probe inputs, output mode choices, and destination selectors that are validated against the process configuration.
Safety And Trust Model
Bootstrap trust model
By default, first run resolves tools in this order: explicit env override,
PATH, cache, then HTTPS download from the upstream release source. Set
YTDLP_SHA256 and/or FFMPEG_SHA256 to require an exact executable digest
after resolution or download. These pins verify bytes on disk, but they do not
fetch upstream signatures or automatically discover trusted digests; operators
who need a fully pinned supply chain should provide known-good binaries through
YTDLP_PATH / FFMPEG_PATH plus matching SHA-256 pins, or disable yt-dlp
auto-update.
For stricter bootstrap control, combine YTDLP_PATH / FFMPEG_PATH with
matching YTDLP_SHA256 / FFMPEG_SHA256 pins. Hash pins verify the resolved
executable bytes; they are not upstream signature verification.
Security posture
This server is designed to run with trusted callers and operator-supplied config — it is not a hardened multi-tenant boundary.
- Tool-call URLs reach yt-dlp. Whatever
urlsan MCP caller passes are handed to yt-dlp, a powerful extraction tool. Only point callers at it that you trust. Tool-call URLs are validated ashttp/httpsbefore they reach yt-dlp, and every positional is passed after a--end-of-options separator so a--prefixed value can't be parsed as a flag; the trust assumption above still holds regardless. - SSH is key-only and non-interactive. SSH targets force
BatchMode=yesandStrictHostKeyChecking=accept-new, so a TTY-less server fails fast instead of prompting; there is no password auth. Auth comes from your SSH key/agent and any options you add viaYTDLP_SSH_OPTS. - Target paths are validated. Local and SSH paths must be absolute and may
not contain traversal or control characters. SSH remotes also reject
option-like and whitespace/control-bearing values before anything reaches
ssh/rsync/scp; remote paths are single-quote-escaped for the remote shell. Rclone targets must beremote:pathor explicitrclone:remote:/pathand reject control characters.
Requirements
- rsync is recommended for SSH transfers and falls back to scp when absent. Local transfers need no external tool — the binary copies the tree itself.
- ssh plus passwordless key-based auth when using
host:/pathtargets. - rclone plus a configured rclone remote when using
remote:pathorrclone:remote:/pathtargets. - yt-dlp and ffmpeg are fetched automatically (override with
YTDLP_PATH/FFMPEG_PATH, or just have them onPATH). youtube_identifyadditionally needsfpcalc; the container image includes it vialibchromaprint-tools.
Development
Build and test from source:
On devhost/local shells, ~/.local/bin/cargo is a wrapper that can break
cargo xwin; use the real rustup cargo for local Windows rehearsals:
CI (.github/workflows/) runs fmt + clippy + tests and a Windows cross-build on
every push/PR, and publishes both binaries to a GitHub Release on v* tags.
This single-crate workspace uses Rust edition 2024 with MSRV 1.97.1.
Verification
Use these checks before releasing README, package, or runtime changes:
For a live MCP smoke, register with a temporary config and call
youtube_search or youtube_probe before running youtube_download.
Architecture
Bare invocation serves MCP over stdio; setup runs the installer. A
youtube_download call:
- Resolves yt-dlp + ffmpeg (env override → PATH → cache → download) and verifies SHA-256 pins when configured.
- Cleans mix/radio URLs, then runs yt-dlp per mode into a staging tree
(
staging/audio,staging/video) with metadata/thumbnail/archive flags, source metadata sidecars, and theArtist/Title [id]output template. - (optional) When
YTDLP_ACOUSTID_CLIENT_KEYis set, fingerprints the downloaded audio and writes high-confidence MusicBrainz/AcoustID tags in-place — before transfer, so the target copy carries the canonical tags. - Transfers each kind's subtree to its target: local in-process copy, SSH
rsync/scp, or
rclone copy. - (optional) When Plex credentials are configured and the transfer succeeded, adds the downloaded audio tracks to the target Plex playlist.
- Appends the completed call to the JSONL download ledger.
- Returns a markdown or JSON summary listing files, sizes, and the actual destination(s).
See CLAUDE.md for architecture, conventions, and gotchas.
Deployment
- Local clients should use
npx -y @dinglebear/rytdlor the installedrytdlbinary over stdio. - Shared runtime jobs can use the container image when ffmpeg, fpcalc, SSH, rclone, and rsync should be present without host-level installs.
- Host deployments should set destination, Plex, AcoustID, SSH, and rclone credentials in process env or host config before exposing the MCP server to callers.
- Keep
YTDLP_ALLOW_LOCAL_TARGETS=0unless trusted callers are allowed to write to local filesystem paths selected through tool arguments.
Troubleshooting
- YouTube metadata looks unavailable: set
YTDLP_EXTRACTOR_ARGS=youtube:player_client=androidor use the checked-in client/plugin configs, which already default it. - Downloads succeed but transfers fail: inspect
staging_kept_ator theyoutube_transfer_queuelist, then retry after fixing SSH, rclone, or local target permissions. - Plex playlist updates are missing: confirm
YTDLP_PLEX_URL,YTDLP_PLEX_TOKEN, and that Plex can see the transferred files. - Tool bootstrap is too loose for your environment: pin
YTDLP_PATHandFFMPEG_PATHwith matching SHA-256 variables, or disable yt-dlp auto-update.
Related Servers
- soma - RMCP runtime for provider-backed MCP servers.
- unifi-rmcp - UniFi controller REST API bridge.
- tailscale-rmcp - Tailscale API bridge for devices, users, and tailnet operations.
- unraid - Unraid GraphQL bridge for NAS and server management.
- apprise-rmcp - Apprise notification fan-out bridge for many delivery backends.
- gotify-rmcp - Gotify push notification bridge for sends, messages, apps, and clients.
- arcane-rmcp - Arcane Docker management bridge for containers and related resources.
- yarr - Media-stack bridge for Sonarr, Radarr, Prowlarr, Plex, and related services.
- synapse-rmcp - Local Synapse workflow server for scout and flux actions.
- cortex - Syslog and homelab log aggregation MCP server.
- axon - RAG, crawl, scrape, extract, and semantic search project.
- labby - Homelab control plane and MCP gateway project.
- lumen - Local semantic code search MCP server.
Documentation
This README is the curated operator entry point. The generated or
machine-readable source of truth lives in the package, plugin, and bundle
manifests that scripts/check-packaging.sh cross-checks.
License
Original Dinglebear-authored portions of this project are licensed under AGPL-3.0-only. Separate commercial licensing is available for organizations that need terms outside the AGPL. Third-party material remains under its original license. See LICENSING.md.
Rust MCP naming pattern
This repo follows the Rust MCP server naming convention:
- Repo:
dinglebear-ai/rytdl - Cargo crate:
ytdl-rmcp - CLI alias:
rytdl - npm package:
@dinglebear/rytdl
來源:README.md,提交 12c47c0
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Rmcp 整合
RMCP
dev.rmcp官方發布者
一個遠端 MCP 目錄伺服器,讓助理搜尋已收錄的 MCP 伺服器與工具、檢視其記錄和端點,並比較候選方案。
Unraid RMCP
ai.dinglebear
本機 MCP 伺服器兼 CLI,讓助理透過 Unraid 的 GraphQL API 處理 NAS、Docker、虛擬機與儲存相關工作。
Unraid RMCP
ai.dinglebear
在本機執行的 Rust MCP 伺服器兼命令列工具,讓助理透過 Unraid 的 GraphQL API 查詢與管理 NAS,涵蓋陣列、Docker、虛擬機與儲存。
UniFi RMCP
ai.dinglebear
本機 MCP 伺服器兼 CLI,讓助理讀取 UniFi Network 控制器的用戶端、裝置、WLAN 與健康狀態,並在具備管理員權限時執行變更操作。
Tailscale RMCP
ai.dinglebear
讓助理檢視與管理 Tailscale 網路:列出裝置、路由、金鑰、ACL、DNS 與使用者,授權裝置,並可選擇刪除裝置。