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.
Clone this repository:
git clone https://github.com/setkyar/youtube-subtitles-mcp.git
cd youtube-subtitles-mcp
Build and run with Docker:
docker build -t mcp/youtube-subtitles .
Clone this repository:
git clone https://github.com/setkyar/youtube-subtitles-mcp.git
cd youtube-subtitles-mcp
Install dependencies:
pip install "mcp[cli]>=1.2.0" yt-dlp
Install ffmpeg:
sudo apt-get install ffmpeg
brew install ffmpeg
Run the server:
python youtube_subtitles_server.py
Open Claude Desktop
Click on the Claude menu and select "Settings"
Click on "Developer" in the left sidebar
Click on "Edit Config"
Update the configuration to include your MCP server:
{
"mcpServers": {
"youtube-subtitles": {
"command": "docker",
"args": ["run", "-i", "mcp/youtube-subtitles"]
}
}
}
Save the file and restart Claude Desktop
Once integrated with an MCP client like Claude Desktop, you can:
Get video information: Ask "What's the title and upload date of this YouTube video: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
List available subtitle languages: Ask "What subtitle languages are available for this video: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Download and analyze subtitles: Ask "Can you get the English subtitles for this video and summarize what it's about? https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Translate subtitles: Ask "Get the Spanish subtitles for this video and translate them to English: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
The server exposes three main tools to MCP clients:
All operations are performed using yt-dlp, a powerful YouTube-dl fork with better support for subtitles and formats.
Docker logs can be viewed with:
docker logs youtube-subtitles-mcp
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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