YouTube Subtitles MCP server

Integrates with YouTube to enable subtitle retrieval and analysis for content summarization, translation, or accessibility enhancement.
Back to servers
Setup instructions
Provider
Set Kyar
Release date
Mar 03, 2025
Language
Python
Stats
1 star

This YouTube Subtitles MCP server allows AI assistants like Claude to download and analyze YouTube video subtitles. It provides a seamless way to retrieve video information, list available subtitle languages, and download subtitles in various languages for analysis.

Features

  • Download YouTube Subtitles: Get subtitles from any YouTube video
  • Language Support: Download subtitles in any available language
  • Video Information: Retrieve video metadata (title, duration, upload date, etc.)
  • Multiple Language Detection: List all available subtitle languages for a video
  • Seamless AI Integration: Works with Claude and other MCP-compatible assistants
  • Docker Support: Easy deployment with Docker

Requirements

  • Python 3.10+
  • yt-dlp
  • ffmpeg
  • MCP-compatible client (like Claude Desktop)
  • Docker (optional, for containerized deployment)

Installation

Using Docker (Recommended)

  1. Clone this repository:

    git clone https://github.com/setkyar/youtube-subtitles-mcp.git
    cd youtube-subtitles-mcp
    
  2. Build and run with Docker:

    docker build -t mcp/youtube-subtitles .
    

Manual Installation

  1. Clone this repository:

    git clone https://github.com/setkyar/youtube-subtitles-mcp.git
    cd youtube-subtitles-mcp
    
  2. Install dependencies:

    pip install "mcp[cli]>=1.2.0" yt-dlp
    
  3. Install ffmpeg:

    • On Ubuntu/Debian: sudo apt-get install ffmpeg
    • On macOS (Homebrew): brew install ffmpeg
    • On Windows: Download from ffmpeg.org
  4. Run the server:

    python youtube_subtitles_server.py
    

Integration with Claude Desktop

  1. Open Claude Desktop

  2. Click on the Claude menu and select "Settings"

  3. Click on "Developer" in the left sidebar

  4. Click on "Edit Config"

  5. Update the configuration to include your MCP server:

    {
      "mcpServers": {
        "youtube-subtitles": {
          "command": "docker",
          "args": ["run", "-i", "mcp/youtube-subtitles"]
        }
      }
    }
    
  6. Save the file and restart Claude Desktop

Usage Examples

Once integrated with an MCP client like Claude Desktop, you can:

How It Works

The server exposes three main tools to MCP clients:

  • get_video_info: Retrieves basic metadata about a YouTube video
  • list_subtitle_languages: Shows available subtitle languages for a video
  • download_subtitles: Downloads and formats subtitles in a specific language

All operations are performed using yt-dlp, a powerful YouTube-dl fork with better support for subtitles and formats.

Troubleshooting

Common Issues and Solutions

  • Subtitles not available: Not all YouTube videos have subtitles. Try another video.
  • Missing languages: Some videos only have auto-generated subtitles in the original language.
  • Docker connection problems: Ensure the container is running and Claude Desktop is configured correctly.

Logs

Docker logs can be viewed with:

docker logs youtube-subtitles-mcp

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "youtube-subtitles" '{"command":"docker","args":["run","-i","mcp/youtube-subtitles"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "youtube-subtitles": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "mcp/youtube-subtitles"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "youtube-subtitles": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "mcp/youtube-subtitles"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later