Skip to main content
Glama

yt-dlp-mcp

A tiny standalone MCP server that wraps yt-dlp so any MCP-compatible client — Claude Desktop, Claude Code, HomeBot, or anything else — can look up video metadata and download videos.

Tools

Tool

Description

Confirmation

get_video_info

Title, uploader, duration, view count, thumbnail, available qualities. Read-only.

Not required

download_video

Downloads a video to ~/Downloads (or a chosen sub-folder). Quality: best / 1080p / 720p / 480p / audio_only. Refuses playlists unless allow_playlist is set.

Recommended — tool is annotated readOnlyHint: false so any host that respects MCP tool annotations should confirm before running it.

Related MCP server: MCP YouTube-DLP

Requirements

  • Node.js 18+

  • yt-dlp installed separately and on PATH:

    • Windows: winget install yt-dlp.yt-dlp

    • macOS: brew install yt-dlp

    • Any OS: pip install yt-dlp

This server does not bundle yt-dlp. If it's missing, both tools return a clear error telling the user how to install it instead of failing silently.

Using it from an MCP client

Point any MCP host at this repo with npx — no npm publish or local clone needed:

{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "github:kingithegreat/yt-dlp-mcp"]
    }
  }
}
  • Claude Desktop / Claude Code: add the block above to your MCP config file.

  • HomeBot: add the same shape to your mcp-servers.json (type: "stdio", command: "npx", args: ["-y", "github:kingithegreat/yt-dlp-mcp"]).

Local development

npm install
npm run build     # compiles src/ -> dist/
npm test          # jest, mocks child_process — no real yt-dlp calls in CI
npm start          # run the server on stdio directly

Safety notes

  • All yt-dlp invocations use execFile with argv arrays — the URL is never interpolated into a shell string, so there's no shell-injection surface.

  • download_video writes are confined to the user's home directory (resolveOutputDir rejects anything that resolves outside of it).

  • Playlist URLs are refused by default (--no-playlist) unless allow_playlist is explicitly passed, to avoid an accidental mass-download.

  • A single download is capped at a 10-minute timeout.

License

MIT

Available Tools

2 tools
download_videoA

Download a video from a URL (YouTube and hundreds of other sites via yt-dlp) to disk. Saves into ~/Downloads by default. Refuses playlist URLs unless allow_playlist is set, to avoid downloading an entire playlist by accident. yt-dlp must be installed separately and reachable on PATH.

Inputs: url (required), quality, output_dir, allow_playlist.

get_video_infoA
Read-onlyIdempotent

Look up metadata for a video URL (YouTube and hundreds of other sites via yt-dlp) without downloading it. Returns title, uploader, duration, view count, thumbnail, and available video qualities. For playlist URLs, only the first video is inspected.

Inputs: url (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes—one retrieves metadata, the other downloads content—with no overlap in functionality.

    Naming Consistency5/5

    Both tool names follow a consistent verb_noun pattern (download_video, get_video_info), making them predictable and easy to distinguish.

    Tool Count4/5

    With only two tools, the set is minimal but sufficient for its core purpose of retrieving video info and downloading. A few more utility tools might enhance coverage, but the count is reasonable for a focused wrapper.

    Completeness4/5

    The tools cover the two primary actions (metadata retrieval and download) but lack features like format selection or playlist handling (only via flag). Gaps are minor given the scope.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers