YTDL RMCP
ai.dinglebearPublished by dinglebear.aiv1.0.2Updated Oct 24, 2026
Rust MCP server and CLI for yt-dlp search, downloads, metadata, transfers, and Plex playlists.
The publisher's own server: RMCP
Overview
A local Rust MCP server that lets an assistant search YouTube, download audio or video with yt-dlp, tag and transfer media, and sync Plex playlists.
- What you can do
- Search YouTube and open an interactive search UI, returning result URLs without downloading media, and probe titles, durations, uploaders and format counts read-only. Download audio, video or both from one or more URLs, with format, quality, resolution and container options. Tag audio metadata, identify local files through AcoustID/MusicBrainz fingerprints, and optionally write high-confidence tags back. Transfer results to local, SSH or rclone destinations, keep a repeat-safe download ledger, and retry failed transfers from a queue. Build or preview Plex audio playlists from successful download history, and summarize download stats.
- When to use it
- Useful for a personal media library workflow where you want an assistant to find YouTube media, fetch it into a trusted destination, tag it, and keep a Plex playlist in sync. Read-only search and probe paths are safe to try first; download and tag-writing paths are meant for trusted callers.
- Requirements
- Runs locally over stdio, typically via npx with Node.js. yt-dlp and ffmpeg are downloaded automatically on first run. Downloads need YTDLP_TARGET_PATH (and optionally YTDLP_VIDEO_TARGET_PATH); local targets also need YTDLP_ALLOW_LOCAL_TARGETS. SSH targets need key-based ssh and optionally rsync; rclone targets need a configured rclone remote. Plex sync needs YTDLP_PLEX_URL and YTDLP_PLEX_TOKEN; identification needs YTDLP_ACOUSTID_CLIENT_KEY and fpcalc.
Installation
In SourceWeft
- Open YTDL RMCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 12c47c0
Tools
0Version history
1- v1.0.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Rmcp integrations
RMCP
dev.rmcpOfficial publisher
A remote MCP directory server that lets an assistant search indexed MCP servers and tools, inspect their records and endpoints, and compare options.
Unraid RMCP
ai.dinglebear
Local MCP server and CLI that lets an assistant work with an Unraid server through its GraphQL API: NAS, Docker, VM and storage tasks.
Unraid RMCP
ai.dinglebear
A local Rust MCP server and CLI that lets an assistant query and manage an Unraid NAS through its GraphQL API, covering arrays, Docker, VMs and storage.
UniFi RMCP
ai.dinglebear
A local MCP server and CLI that lets an assistant read and, with admin scope, change UniFi Network controller data such as clients, devices, WLANs and health.
Tailscale RMCP
ai.dinglebear
Lets an assistant inspect and manage a Tailscale tailnet: list devices, routes, keys, ACL, DNS and users, authorize devices, and optionally delete them.