YouTube Transcript to Markdown MCP Server
Generates Markdown documents from YouTube transcripts, including video title, URL, video ID, generation timestamp, and formatted transcript content with timestamps when available.
Extracts transcripts from YouTube videos using supported YouTube URL formats and saves the transcript content as a Markdown file.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
YouTube Transcript to Markdown MCP Server
An MCP (Model Context Protocol) server that converts YouTube video transcripts to Markdown format using the youtube-transcript-api Python package.
Features
Extract transcripts from YouTube videos
Convert transcripts to well-formatted Markdown
Include video metadata (title, URL) in output
Support multiple YouTube URL formats
Comprehensive error handling
MCP tool integration
Related MCP server: YouTube Transcript MCP Server
Installation
Prerequisites
Python 3.9 or higher
pip package manager
Install from Source
Clone this repository:
git clone <repository-url>
cd youtube-transcript-to-markdown-mcpCreate and activate a virtual environment (recommended):
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtOr install in development mode with test dependencies:
pip install -e ".[dev]"Quick Test
To quickly test the installation and basic functionality, you can run the test implementation (if available in your workspace):
python test_implementation.pyOr use the VS Code task if available.
MCP Integration
This server implements the Model Context Protocol (MCP) and can be used with any MCP-compatible client. The server runs using stdio transport for communication.
Adding to MCP Client Configuration
To use this server with an MCP client, add it to your client's configuration:
{
"mcpServers": {
"youtube-transcript": {
"command": "youtube-transcript-mcp",
"args": []
}
}
}For development or if installed from source:
{
"mcpServers": {
"youtube-transcript": {
"command": "python",
"args": ["-m", "youtube_transcript_mcp.server"]
}
}
}Usage
As MCP Server
The server provides a get_youtube_transcript tool that can be called by MCP clients.
Tool Schema
{
"name": "get_youtube_transcript",
"description": "Extract transcript from YouTube video and save as Markdown file",
"inputSchema": {
"type": "object",
"properties": {
"youtube_url": {
"type": "string",
"description": "YouTube video URL (supports various formats like youtube.com/watch?v=ID or youtu.be/ID)"
},
"output_filename": {
"type": "string",
"description": "Local filename to save the Markdown transcript (will be sanitized and .md extension added if missing)"
}
},
"required": ["youtube_url", "output_filename"]
}
}Example Usage
{
"youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"output_filename": "transcript.md"
}Running the Server
youtube-transcript-mcpOr run directly:
python -m youtube_transcript_mcp.serverConfiguration
The server supports the following command-line options:
--debug: Enable debug logging--transport: Transport type (default: stdio)
Example:
youtube-transcript-mcp --debugSupported YouTube URL Formats
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://youtube.com/watch?v=VIDEO_IDhttps://m.youtube.com/watch?v=VIDEO_ID
Output Format
The generated Markdown file includes:
Video title as main header
Video metadata block with URL, video ID, and generation timestamp
Formatted transcript content with timestamps (if available)
Generator attribution
Example output:
# Video Title Here
> **Video URL:** https://www.youtube.com/watch?v=VIDEO_ID
> **Video ID:** `VIDEO_ID`
> **Generated:** 2025-07-20 10:30:45
---
## 📝 Transcript
[00:00] First line of transcript...
[00:05] Second line of transcript...
---
> *This transcript was generated using the YouTube Transcript to Markdown MCP Server.*Error Handling
The server handles various error scenarios:
Invalid YouTube URLs
Videos without available transcripts
Private or unavailable videos
Network connectivity issues
File system permission errors
Development
Running Tests
Run the test suite:
pytestRun tests with coverage:
pytest --cov=youtube_transcript_mcpRun a specific test file:
pytest tests/test_transcript_extractor.pyCode Formatting
Format code with Black:
black src/ tests/Sort imports with isort:
isort src/ tests/Type Checking
mypy src/Project Structure
youtube-transcript-to-markdown-mcp/
├── src/
│ └── youtube_transcript_mcp/
│ ├── __init__.py # Package initialization
│ ├── server.py # MCP server implementation
│ ├── transcript_extractor.py # YouTube transcript extraction
│ ├── markdown_generator.py # Markdown formatting
│ └── utils.py # Utility functions
├── tests/ # Test suite
├── pyproject.toml # Project configuration
├── requirements.txt # Dependencies
└── README.md # This fileDependencies
mcp: Model Context Protocol Python SDKyoutube-transcript-api: YouTube transcript extractionpydantic: Data validation and settings managementtyping-extensions: Type hint extensions
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Ensure all tests pass
Submit a pull request
Troubleshooting
Common Issues
"No transcript available": Some videos don't have transcripts, they may be disabled, or only auto-generated captions are available
"Video not found": The URL may be invalid, the video may be private/deleted, or region-restricted
Permission errors: Ensure you have write permissions to the output directory
Import errors: Make sure all dependencies are installed and you're using Python 3.9+
MCP connection issues: Verify the server is running and the MCP client configuration is correct
Debug Mode
Enable debug logging to get more detailed error information:
youtube-transcript-mcp --debugSupport
For issues and questions, please open an issue on the GitHub repository.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your YouTube library, in the AI tools you already use: Claude, ChatGPT, Cursor, any MCP client.
Clipscript MCP: transcripts of YouTube, TikTok, Instagram, Facebook and X videos from a link.
Fetch public YouTube transcripts as text, Markdown, SRT, WebVTT or JSON via OAuth or API key.
Transcripts of YouTube videos, playlists and channels with timestamps; SRT or WebVTT too.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables users to extract, search, and analyze YouTube video transcripts directly within MCP-compatible clients. It supports advanced features like time-chunked summaries, keyword searching with surrounding context, and batch processing for multiple videos.4MIT
- AlicenseNot gradedqualityDmaintenanceFetches YouTube video transcripts with timestamps and provides them to LLM agents via MCP, enabling natural language access to video content.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to fetch YouTube video transcripts via a single MCP tool, with support for multiple languages and OAuth-protected access.-
- AlicenseBqualityBmaintenanceEnables fetching timestamped YouTube transcripts and compiling them into structured Cursor SKILL.md workflows through MCP tools.21MIT