yt-subs
Extracts clean text transcripts from YouTube videos using subtitles (auto-generated or manual) via the YouTube platform.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yt-substranscript of https://youtu.be/dQw4w9WgXcQ"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YouTube Subtitles MCP Server
An MCP (Model Context Protocol) server that extracts clean text transcripts from YouTube videos using their subtitles.
Features
Extract English subtitles (auto-generated or manual) from YouTube videos
Convert subtitle files to clean, deduplicated plain text
Save transcripts to local files or return them directly
Works with any MCP-compatible client (Claude Desktop, etc.)
Related MCP server: Youtube2Text
Prerequisites
Before using this MCP server, you must have the following tools installed:
Required Dependencies
yt-dlp - YouTube video downloader
# Install via Homebrew (macOS) brew install yt-dlp # Or via pip pip install yt-dlpffmpeg - Media file converter
# Install via Homebrew (macOS) brew install ffmpeg # Or via apt (Linux) sudo apt install ffmpegNode.js - Version 18 or higher
# Check your version node --version # Install via Homebrew (macOS) brew install node
Installation
Quick Start (Using npx)
No installation required! Just add to your MCP client configuration:
{
"mcpServers": {
"yt-subs": {
"command": "npx",
"args": ["-y", "yt-subs-mcp"]
}
}
}Note: You still need to have yt-dlp and ffmpeg installed on your system (see Prerequisites above).
Claude Desktop Configuration
Edit your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server to the mcpServers section:
Option 1: Using npx (recommended)
{
"mcpServers": {
"yt-subs": {
"command": "npx",
"args": ["-y", "yt-subs-mcp"],
"env": {
"YT_SUBS_DOWNLOAD_DIR": "/path/to/your/transcripts"
}
}
}
}Option 2: Using local installation
{
"mcpServers": {
"yt-subs": {
"command": "node",
"args": ["/absolute/path/to/yt-subs/index.js"]
}
}
}For Local Development
Clone this repository
Install dependencies:
npm installMake the script executable:
chmod +x index.js
Usage
Once configured in your MCP client, you can use the get_youtube_transcript tool:
Tool: get_youtube_transcript
Extracts the subtitle/transcript text from a YouTube video URL.
Parameters:
url(required): The YouTube video URLsave_to_file(optional): Whether to save the transcript to a file (default: true)
Examples:
// Get transcript and save to file
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"save_to_file": true
}
// Get transcript without saving
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"save_to_file": false
}Response:
{
"success": true,
"video_id": "dQw4w9WgXcQ",
"transcript": "Never gonna give you up\nNever gonna let you down...",
"saved_to": "/Users/yourname/Downloads/yts/dQw4w9WgXcQ.txt",
"message": "Transcript extracted and saved to /Users/yourname/Downloads/yts/dQw4w9WgXcQ.txt"
}Configuration
Environment Variables
YT_SUBS_DOWNLOAD_DIR: Custom directory for saving transcript files
If not set, defaults to
~/Downloads/yts/Must be an absolute path
Directory will be created if it doesn't exist
Example:
export YT_SUBS_DOWNLOAD_DIR="/path/to/your/transcripts"Setting Environment Variables in Claude Desktop
To use a custom download directory, add the env property to your server configuration:
{
"mcpServers": {
"yt-subs": {
"command": "node",
"args": ["/absolute/path/to/yt-subs/index.js"],
"env": {
"YT_SUBS_DOWNLOAD_DIR": "/path/to/your/transcripts"
}
}
}
}Output Location
By default, transcript files are saved to:
~/Downloads/yts/Or to the directory specified by YT_SUBS_DOWNLOAD_DIR environment variable.
Each transcript is saved with the video ID as the filename:
VIDEO_ID.txtHow It Works
Extracts the video ID from the provided YouTube URL
Downloads English subtitles (VTT format) using yt-dlp
Converts VTT to SRT format using ffmpeg
Extracts and deduplicates text content
Cleans up temporary files
Returns the clean transcript text
Troubleshooting
"Missing required dependencies" error
Make sure yt-dlp and ffmpeg are installed and available in your PATH:
which yt-dlp
which ffmpeg"Failed to download subtitle" error
The video may not have English subtitles available. Try a different video or check if subtitles exist on YouTube.
"Could not extract video ID" error
Ensure you're providing a valid YouTube URL format:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_ID
Development
Running Locally
npm startThe server will run on stdio and wait for MCP protocol messages.
Testing
You can test the server using an MCP client or by sending JSON-RPC messages via stdio.
Publishing to npm
If you want to publish your own version to npm:
Update the package name in
package.jsonto something uniqueUpdate the repository URLs to your GitHub repository
Add your author information
Login to npm:
npm loginPublish:
npm publish
Before publishing, make sure to:
Test the package locally using
npm packandnpm install -g ./yt-subs-mcp-1.0.0.tgzUpdate the version number following semver
Ensure README is up to date
Add appropriate tags and keywords
License
MIT
Credits
Based on the yt-subs bash script for extracting YouTube subtitles.
Available Tools
1 toolget_youtube_transcriptA
Extract the subtitle/transcript text from a YouTube video URL. Always use this tool when:
User provides a YouTube URL and wants to read/analyze the video content
User asks what a YouTube video is about or wants a summary
User needs to extract quotes or information from a YouTube video
User wants to search through video content without watching
User needs the transcript saved to a file for reference
Returns the clean text content of the video's English subtitles (auto-generated or manual).
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The YouTube video URL (e.g., https://www.youtube.com/watch?v=VIDEO_ID) | |
| save_to_file | No | Whether to save the transcript to a file (default: true). Files are saved to the directory specified by YT_SUBS_DOWNLOAD_DIR environment variable, or ~/Downloads/yts/ if not set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It does state the return value ('clean text content of the video's English subtitles') and mentions saving to a file in the use cases. However, it does not disclose the default file-saving side effect (save_to_file defaults to true) or failure behavior when no subtitles are available.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core purpose is front-loaded, and the bulleted triggers are scannable and actionable. Some bullets overlap semantically, but the structure remains efficient and each bullet contributes to routing an agent to the correct tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool, the description covers what it does, when to use it, and what it returns. Minor gaps like default file-writing behavior and no-subtitle error handling are either represented in the schema or are edge cases that do not prevent correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already fully documented in the input schema. The description adds only general context about the URL and file-saving use case, not new syntax or format details, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Extract the subtitle/transcript text from a YouTube video URL.' The bulleted use cases further clarify exactly what the tool is for, making its purpose unambiguous even without sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit 'Always use this tool when' triggers covering summarization, quoting, searching, and saving transcripts. It lacks explicit when-not-to-use guidance or named alternatives, but no sibling tools exist, so the positive triggers give clear routing context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.6- First observed
get_youtube_transcript
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between tool purposes. The tool's function is clearly distinct and unambiguous.
The single tool name follows a clear verb_noun pattern (get_youtube_transcript), which is consistent and predictable.
The server has only one tool, which is on the thin side for a general-purpose media analysis server. However, for a focused transcript-extraction niche, it is borderline acceptable.
The tool fully covers the core operation of fetching YouTube transcripts. Some minor gaps exist, such as lack of language selection or support for non-English subtitles, but these are workarounds rather than critical dead ends.
Maintenance
Related MCP Connectors
Fetch the full transcript of any YouTube video as clean text. No API key, no signup.
Clean YouTube transcripts for agents: single videos, channels, playlists, plus AI caption cleanup.
Verbatim transcription of public video/audio URLs to clean text, SRT, and timestamped records.
Extract YouTube transcripts, search what was said, and read on-screen frames with cited timestamps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables extraction of transcript text from YouTube videos by providing the video URL, supporting standard, shortened, and embed URL formats.17 npm2-
- AlicenseNot gradedqualityCmaintenanceA powerful text extraction service that converts YouTube video content into clean, timestampless transcripts for content analysis, research, and processing workflows.3Apache 2.0
- AlicenseAqualityFmaintenanceRetrieves transcripts from YouTube videos with support for multiple languages, timestamp control, and language detection. Enables video content analysis, summarization, and quote extraction without manually downloading or watching videos.275 npm15MIT
- AlicenseAqualityBmaintenanceExtract YouTube transcripts for AI agents, RAG pipelines, and LLM workflows. Supports any YouTube URL. Returns clean text or timestamped segments. No API keys required.14MIT