home / mcp / youtube subtitle mcp server

YouTube Subtitle MCP Server

A Model Context Protocol (MCP) server for fetching YouTube video subtitles/transcripts with support for multiple output formats (SRT, VTT, TXT, JSON).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "guangxiangdebizi-youtube-subtitle-mcp": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

You can fetch YouTube video subtitles in multiple formats and languages through an MCP server designed for easy integration with MCP clients. It supports local stdio interaction for quick use and an HTTP endpoint for deployment in a server environment, making it ideal for research, analysis, or data extraction tasks involving subtitles.

How to use

You use an MCP client to communicate with the YouTube Subtitle MCP Server. The server accepts requests to fetch subtitles from public YouTube videos and returns them in formats such as JSON, SRT, VTT, or TXT. Your client sends a request describing the video (URL or ID) and optionally the language and format, and then you receive the structured subtitle data for further processing in your workflow.

How to install

Prerequisites: you need Node.js installed on your system. You also work with npm or npx as your package manager.

# Quick start in stdio mode for local use
npx -y youtube-subtitle-mcp

To run in HTTP server mode, clone the project, install dependencies, build, and start the HTTP server.

# Clone repository
git clone https://github.com/guangxiangdebizi/youtube-subtitle-mcp.git
cd youtube-subtitle-mcp

# Install dependencies
npm install

# Build
npm run build

# Start HTTP server
npm run start:http

Configuration and usage details

You can choose between two deployment modes depending on your needs. For local development and quick testing, use stdio mode. For server deployments, use HTTP mode and point your MCP client to the server URL.

# Example stdio mode configuration for a client
{
  "mcpServers": {
    "youtube-subtitle": {
      "command": "npx",
      "args": ["-y", "youtube-subtitle-mcp"]
    }
  }
}

Additional configuration (HTTP mode)

If you are running the server in HTTP mode, configure the client to connect via the HTTP endpoint.

{
  "mcpServers": {
    "youtube-subtitle": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "timeout": 600
    }
  }
}

Available tools

fetch_youtube_subtitles

Main tool that retrieves subtitles from a YouTube video. It accepts the video URL or ID, an optional language code, and an optional output format. It returns timestamped subtitle data in the requested format (JSON, SRT, VTT, or TXT).