Get the FREE Ultimate OpenClaw Setup Guide →

mcp-youtube

A Model-Context Protocol Server for YouTube

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio anaisbetts-mcp-youtube npx -y @anaisbetts/mcp-youtube \
  --env YTDLP_PATH="path to yt-dlp if not in PATH"

How to use

This MCP server uses yt-dlp to fetch YouTube subtitles and exposes them through the Model Context Protocol so Claude can access video subtitles and context. You can ask Claude to summarize or analyze a video by providing the YouTube URL, for example: 'Summarize the YouTube video https://www.youtube.com/watch?v=abc123'. The server will download available subtitles via yt-dlp and pass the content to Claude as model context for the requested task. Supported capabilities include retrieving subtitles, selecting language, and generating a summary or analysis based on the video transcript. Ensure yt-dlp is installed and available in your environment so the server can fetch subtitles on demand.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • yt-dlp installed and accessible in your PATH (e.g., via Homebrew on macOS or WinGet on Windows)

Installation steps:

  1. Install yt-dlp (if not already installed):

    • macOS: brew install yt-dlp
    • Windows: winget install yt-dlp
    • Linux: typically available via your distro's package manager or via python -m pip install -U yt-dlp
  2. Install the MCP server via mcp-installer (or your preferred MCP workflow):

    • Install mcp-installer if you don't have it: npm i -g mcp-installer
    • Install this MCP server package: mcp-installer install @anaisbetts/mcp-youtube
  3. Run the MCP server:

    • Run using npx (as intended by the package): npx -y @anaisbetts/mcp-youtube

Note: Ensure your environment variables are set if the server requires the path to yt-dlp or other tools. You can configure YTDLP_PATH or other relevant vars as needed by your setup.

Additional notes

Tips:

  • The server relies on yt-dlp to fetch YouTube subtitles; ensure it is up to date for best subtitle support.
  • If you encounter issues with subtitle languages, check that the desired language code is supported by yt-dlp and request subtitles accordingly.
  • When debugging, run the server in a verbose or debug mode if available and verify that npx can resolve @anaisbetts/mcp-youtube from your environment.
  • If using behind a firewall or proxy, ensure yt-dlp and Node can access YouTube endpoints.
  • Environment variables: YTDLP_PATH can be set to the explicit path to the yt-dlp executable if it isn’t in your system PATH.

Related MCP Servers

Sponsor this space

Reach thousands of developers