Offers full containerization support with Docker deployment options, including health checks, Docker Compose configuration, and container registry distribution via GitHub Container Registry.
Integrates with ESLint for code style enforcement and quality control in the development workflow.
Integrates with GitHub for issue tracking, documentation hosting, and container registry distribution through GitHub Container Registry.
Distributed as an npm package for easy installation and integration, with both global CLI usage and programmatic API access.
Built with TypeScript for full type safety, providing strongly-typed interfaces for transcript data and programmatic usage of the service.
Extracts and processes YouTube video transcripts with support for single videos, bulk processing, and playlists. Provides transcript data in multiple formats (text, JSON, SRT) and supports multi-language extraction.
🎬 YouTube Transcript DL MCP Server
A comprehensive MCP (Model Context Protocol) server for extracting YouTube video transcripts with support for multiple transports (stdio, SSE, HTTP), Docker deployment, and npm package distribution.
✨ Features
- 🎯 Multiple Transport Support: stdio, Server-Sent Events (SSE), and HTTP
- 📹 Comprehensive Transcript Extraction: Single videos, bulk processing, and playlists
- 🌍 Multi-language Support: Extract transcripts in different languages
- 📝 Multiple Output Formats: Text, JSON, and SRT subtitle formats
- 🚀 High Performance: Built-in caching and rate limiting
- 🐳 Docker Ready: Full containerization support
- 📦 npm Package: Easy installation and distribution
- 🧪 Test-Driven Development: Comprehensive test suite with 90%+ coverage
- 🔧 TypeScript: Full type safety and modern JavaScript features
📦 Installation
🔧 As an npm package
🛠️ From source
🐳 Docker
🚀 Usage
🖥️ MCP Server
Start the MCP server in different modes:
💻 CLI Tool
Test the server with a sample video:
🔧 Programmatic Usage
🛠️ MCP Tools
The server provides the following MCP tools:
get_transcript
Extract transcript from a single YouTube video.
Parameters:
videoId
(required): YouTube video ID or URLlanguage
(optional): Language code (default: 'en')format
(optional): Output format - 'text', 'json', or 'srt' (default: 'json')
get_bulk_transcripts
Extract transcripts from multiple YouTube videos.
Parameters:
videoIds
(required): Array of YouTube video IDs or URLslanguage
(optional): Language code (default: 'en')outputFormat
(optional): Output format - 'text', 'json', or 'srt' (default: 'json')includeMetadata
(optional): Include metadata in response (default: true)
get_playlist_transcripts
Extract transcripts from all videos in a YouTube playlist.
Parameters:
playlistId
(required): YouTube playlist ID or URLlanguage
(optional): Language code (default: 'en')outputFormat
(optional): Output format - 'text', 'json', or 'srt' (default: 'json')includeMetadata
(optional): Include metadata in response (default: true)
format_transcript
Format existing transcript data into different formats.
Parameters:
transcript
(required): Transcript data arrayformat
(required): Output format - 'text', 'json', or 'srt'
get_cache_stats
Get cache statistics and performance metrics.
clear_cache
Clear the transcript cache.
⚙️ Configuration
🌍 Environment Variables
📝 Configuration File
Create a config.json
file:
🐳 Docker Deployment
🐙 Docker Compose
Health Checks
The Docker container includes built-in health checks:
Development
Setup
Running Tests
Building
Testing the MCP Server
API Documentation
Response Format
All transcript responses follow this structure:
Error Handling
The server handles various error scenarios:
- Video not found: Returns empty transcript with error in metadata
- Private videos: Graceful error handling with descriptive messages
- Rate limiting: Built-in delays and retry logic
- Network errors: Automatic retries with exponential backoff
Performance
Benchmarks
- Single video extraction: < 5 seconds
- Bulk processing: < 2 seconds per video
- Concurrent requests: 90%+ success rate for 10 concurrent requests
- Memory usage: < 512MB under normal load
- Cache hit ratio: 70%+ for repeated requests
Optimization
- LRU Cache: Configurable TTL and size limits
- Rate Limiting: Prevents API abuse
- Concurrent Processing: Optimized for bulk operations
- Memory Management: Efficient garbage collection
Troubleshooting
Common Issues
- Video not found: Check if video is public and has captions
- Rate limiting: Reduce concurrent requests or increase delays
- Memory issues: Reduce cache size or clear cache regularly
- Network errors: Check internet connection and firewall settings
Debug Mode
Enable debug logging:
Logs
Check logs in the logs/
directory:
Contributing
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Submit a pull request
Code Style
- Use TypeScript for all code
- Follow ESLint configuration
- Write comprehensive tests
- Add JSDoc comments for public APIs
- Use conventional commit messages
License
MIT License - see LICENSE file for details.
Support
- GitHub Issues: Report bugs and feature requests
- Documentation: Full API documentation
- Examples: Usage examples
Changelog
v1.0.0
- Initial release
- MCP server with stdio, SSE, and HTTP transports
- Single video and bulk transcript extraction
- Docker containerization
- Comprehensive test suite
- TypeScript support
- Caching and rate limiting
- Multiple output formats (text, JSON, SRT)
This server cannot be installed
A comprehensive MCP server for extracting YouTube video transcripts with support for multiple transports, languages, and output formats.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables retrieval of transcripts from YouTube videos. This server provides direct access to video transcripts and subtitles through a simple interface, making it ideal for content analysis and processing.Last updated -144422TypeScriptMIT License
- -securityFlicense-qualitySimple MCP server that returns the transcription of a Youtube video using url and desired language.Last updated -Python
- -securityAlicense-qualityAn experimental MCP server that makes YouTube playlist transcripts available for AI assistants, enabling search and conversation about video content.Last updated -1PythonApache 2.0
- AsecurityFlicenseAqualityAn MCP server that provides AI assistants with powerful tools to interact with YouTube, including video searching, transcript extraction, comment retrieval, and more.Last updated -815Python