🚀 MCP Video & Audio Text Extraction Server
An MCP server that offers text extraction capabilities from diverse video platforms and audio files. It implements the Model Context Protocol (MCP) to provide standardized access to audio transcription services.
🚀 Quick Start
This MCP server is designed to extract text from various video platforms and audio files. It adheres to the Model Context Protocol, enabling standardized access to audio transcription services.
✨ Features
- High - quality speech recognition based on Whisper
- Multi - language text recognition
- Support for various audio formats (mp3, wav, m4a, etc.)
- MCP - compliant tools interface
- Asynchronous processing for large files
📦 Installation
Using uv (recommended)
When using uv, no specific installation is required. We'll use uvx to directly run the video extraction server:
curl -LsSf https://astral.sh/uv/install.sh | sh
Install FFmpeg
FFmpeg is essential for audio processing. You can install it via different methods:
sudo apt update && sudo apt install ffmpeg
sudo pacman -S ffmpeg
brew install ffmpeg
choco install ffmpeg
scoop install ffmpeg
💻 Usage Examples
Configure for Claude/Cursor
Add the following to your Claude/Cursor settings:
"mcpServers": {
"video-extraction": {
"command": "uvx",
"args": ["mcp-video-extraction"]
}
}
Available MCP Tools
- Video download: Download videos from supported platforms
- Audio download: Extract audio from videos on supported platforms
- Video text extraction: Extract text from videos (download and transcribe)
- Audio file text extraction: Extract text from audio files
📚 Documentation
Supported Platforms
This service supports downloading videos and extracting audio from various platforms, including but not limited to:
- YouTube
- Bilibili
- TikTok
- Instagram
- Twitter/X
- Facebook
- Vimeo
- Dailymotion
- SoundCloud
For a complete list of supported platforms, please visit [yt - dlp supported sites](https://github.com/yt - dlp/yt - dlp/blob/master/supportedsites.md).
Core Technology
This project uses OpenAI's Whisper model for audio - to - text processing through MCP tools. The server exposes four main tools:
- Video download: Download videos from supported platforms
- Audio download: Extract audio from videos on supported platforms
- Video text extraction: Extract text from videos (download and transcribe)
- Audio file text extraction: Extract text from audio files
MCP Integration
This server is built using the Model Context Protocol, which provides:
- A standardized way to expose tools to LLMs
- Secure access to video content and audio files
- Integration with MCP clients like Claude Desktop
Tech Stack
- Python 3.10+
- Model Context Protocol (MCP) Python SDK
- yt - dlp (YouTube video download)
- openai - whisper (Core audio - to - text engine)
- pydantic
System Requirements
- FFmpeg (Required for audio processing)
- Minimum 8GB RAM
- Recommended GPU acceleration (NVIDIA GPU + CUDA)
- Sufficient disk space (for model download and temporary files)
Configuration
The service can be configured through environment variables:
Whisper Configuration
WHISPER_MODEL
: Whisper model size (tiny/base/small/medium/large), default: 'base'
WHISPER_LANGUAGE
: Language setting for transcription, default: 'auto'
YouTube Download Configuration
YOUTUBE_FORMAT
: Video format for download, default: 'bestaudio'
AUDIO_FORMAT
: Audio format for extraction, default: 'mp3'
AUDIO_QUALITY
: Audio quality setting, default: '192'
Storage Configuration
TEMP_DIR
: Temporary file storage location, default: '/tmp/mcp - video'
Download Settings
DOWNLOAD_RETRIES
: Number of download retries, default: 10
FRAGMENT_RETRIES
: Number of fragment download retries, default: 10
SOCKET_TIMEOUT
: Socket timeout in seconds, default: 30
Performance Optimization Tips
-
GPU Acceleration:
- Install CUDA and cuDNN
- Ensure the GPU version of PyTorch is installed
-
Model Size Adjustment:
- tiny: Fastest but lower accuracy
- base: Balanced speed and accuracy
- large: Highest accuracy but requires more resources
-
Use SSD storage for temporary files to improve I/O performance
Notes
- The Whisper model (approximately 1GB) needs to be downloaded on the first run.
- Ensure sufficient disk space for temporary audio files.
- A stable network connection is required for YouTube video downloads.
- A GPU is recommended for faster audio processing.
- Processing long videos may take considerable time.
MCP Integration Guide
This server can be used with any MCP - compatible client, such as:
- Claude Desktop
- Custom MCP clients
- Other MCP - enabled applications
For more information about MCP, visit Model Context Protocol.
Documentation
For the Chinese version of this documentation, please refer to README_zh.md
🔧 Technical Details
The project uses OpenAI's Whisper model through MCP tools for audio - to - text processing. The server is built on the Model Context Protocol, which standardizes tool access for LLMs, provides secure access to media files, and enables integration with MCP clients.
📄 License
MIT