home / mcp / 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).
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.
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.
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-mcpTo 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:httpYou 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"]
}
}
}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
}
}
}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).