MCP Video & Audio Text Extraction Server
An MCP server that downloads videos/extracts audio from various platforms like YouTube, Bilibili, and TikTok, then transcribes them to text using OpenAI's Whisper model.
README
MCP Video & Audio Text Extraction Server
An MCP server that provides text extraction capabilities from various video platforms and audio files. This server implements the Model Context Protocol (MCP) to provide standardized access to audio transcription services.
Supported Platforms
This service supports downloading videos and extracting audio from various platforms, including but not limited to:
- YouTube
- Bilibili
- TikTok
- Twitter/X
- Vimeo
- Dailymotion
- SoundCloud
For a complete list of supported platforms, please visit yt-dlp supported sites.
Core Technology
This project utilizes 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:
- Standardized way to expose tools to LLMs
- Secure access to video content and audio files
- Integration with MCP clients like Claude Desktop
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
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)
Important First Run Notice
Important: On first run, the system will automatically download the Whisper model file (approximately 1GB). This process may take several minutes to tens of minutes, depending on your network conditions. The model file will be cached locally and won't need to be downloaded again for subsequent runs.
Installation
Using uv (recommended)
When using uv no specific installation is needed. We will use uvx to directly run the video extraction server:
curl -LsSf https://astral.sh/uv/install.sh | sh
Install FFmpeg
FFmpeg is required for audio processing. You can install it through various methods:
# Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg
# Arch Linux
sudo pacman -S ffmpeg
# MacOS
brew install ffmpeg
# Windows (using Chocolatey)
choco install ffmpeg
# Windows (using Scoop)
scoop install ffmpeg
Usage
Configure for Claude/Cursor
Add 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
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: 10FRAGMENT_RETRIES: Number of fragment download retries, default: 10SOCKET_TIMEOUT: Socket timeout in seconds, default: 30
Performance Optimization Tips
-
GPU Acceleration:
- Install CUDA and cuDNN
- Ensure 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
- Whisper model (approximately 1GB) needs to be downloaded on first run
- Ensure sufficient disk space for temporary audio files
- Stable network connection required for YouTube video downloads
- GPU 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 Chinese version of this documentation, please refer to README_zh.md
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。