video-transcriber-mcp
Video Transcriber MCP 🚀
基于 whisper.cpp(Rust)的高性能视频转写 MCP 服务器
一个基于 Model Context Protocol(MCP)的服务器,使用 whisper.cpp 转写来自 1000+ 平台的视频。采用 Rust 构建,以追求最佳性能和效率。
📦 安装
Homebrew(macOS/Linux)——推荐
这是将所有依赖一并安装的最简单方式:
brew install nhatvu148/tap/video-transcriber-mcp它会自动安装二进制文件以及所需依赖(cmake、yt-dlp、ffmpeg)。
Cargo 安装
如果你已安装 Rust:
cargo install video-transcriber-mcp注意: 你需要手动安装依赖:yt-dlp、ffmpeg、cmake
预编译二进制文件
从 GitHub Releases 下载:
# macOS (Intel)
curl -L https://github.com/nhatvu148/video-transcriber-mcp-rs/releases/latest/download/video-transcriber-mcp-x86_64-apple-darwin.tar.gz | tar xz
sudo mv video-transcriber-mcp /usr/local/bin/
# macOS (Apple Silicon)
curl -L https://github.com/nhatvu148/video-transcriber-mcp-rs/releases/latest/download/video-transcriber-mcp-aarch64-apple-darwin.tar.gz | tar xz
sudo mv video-transcriber-mcp /usr/local/bin/
# Linux (x86_64) — no ARM64 Linux build, see issue #13; use `cargo install`
curl -L https://github.com/nhatvu148/video-transcriber-mcp-rs/releases/latest/download/video-transcriber-mcp-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv video-transcriber-mcp /usr/local/bin/
# Windows: Download .zip from releases page注意: 你需要手动安装依赖:yt-dlp、ffmpeg
Claude Code 插件
一步安装 MCP 服务器和 /transcribe 技能:
/plugin marketplace add nhatvu148/video-transcriber-mcp-rs
/plugin install video-transcriber@nhatvu148-tools插件会为你注册 MCP 服务器,但不会安装二进制文件——请先运行上面的任意一个安装命令,确保 video-transcriber-mcp 已经可以执行。
Related MCP server: Video Transcriber MCP Server
🎯 为什么选择 Rust?
这个版本使用 whisper.cpp(带 Rust 绑定的 C++ 实现),而不是 Python 的 OpenAI Whisper:
优势 | whisper.cpp(Rust) | OpenAI Whisper(Python) |
性能 | 原生 C++ 速度 | Python 解释器开销 |
内存 | 占用更低 | 内存占用更高 |
启动 | 瞬时(<100ms) | 缓慢(约 2-3 秒加载模型) |
依赖 | 独立二进制 | 需要 Python 及多个依赖包 |
可移植性 | 单二进制文件 | 需要 Python 环境 |
在真实环境中,性能还取决于你的硬件、视频时长和所选模型。
✨ 功能特性
🚀 使用 whisper.cpp(带 Rust 绑定的 C++)实现高性能转写
🎥 从 1000+ 平台(YouTube、Vimeo、TikTok、Twitter 等)下载
📂 支持转写本地视频文件(mp4、avi、mov、mkv 等)
🎤 100% 离线转写(隐私优先)
🎛️ 提供 5 种模型规格(tiny、base、small、medium、large)
🌐 支持 90+ 种语言
📝 支持 多种输出格式(TXT、JSON、Markdown)
🔌 为 Claude Code 提供 MCP 集成
🌐 双传输模式——stdio(本地)和 Streamable HTTP(远程)
⚡ 原生二进制——无需安装 Python 或 Node.js
💾 与 Python 版本相比,内存占用更低
⚡ 快速开始(使用 Taskfile)
最快的上手方式:
# 1. Install Task (if not already installed)
brew install go-task/tap/go-task
# 2. Complete setup (build + download model)
task setup
# 3. Run a quick test
task test:quick
# Done! 🎉可用命令:
task setup # Complete project setup
task test:quick # Test with short video
task benchmark # Run performance benchmark
task deps:check # Check dependencies
task download:base # Download base model
task help # Show all commands完整任务列表请见 Taskfile.yml。
🌐 传输模式
服务器支持两种传输模式:
stdio 传输(默认)
适用于 Claude Code 等本地 CLI 标准的 I/O 传输模式,这是默认模式。
video-transcriber-mcp
# or explicitly:
video-transcriber-mcp --transport stdioStreamable HTTP 传输
用于远程访问。支持通过网络远程访问 MCP 服务器的 HTTP 传输模式。
# Start HTTP server on default port (8080)
video-transcriber-mcp --transport http
# Custom host and port
video-transcriber-mcp --transport http --host 0.0.0.0 --port 3000远程 MCP 客户端配置:
对于 HTTP 传输模式,请使用以下 URL 配置 MCP 客户端:
{
"mcpServers": {
"video-transcriber-mcp": {
"url": "http://localhost:8080/mcp"
}
}
}HTTP 传输的优势:
客户端无需本地安装
集中式服务器部署
自动更新(服务端)
更适合团队使用
兼容 Serverless 平台
GCLI 选项
video-transcriber-mcp --help
Options:
-t, --transport <TRANSPORT> Transport mode [default: stdio] [possible values: stdio, http]
--host <HOST> Host address for HTTP transport [default: 127.0.0.1]
-p, --port <PORT> Port for HTTP transport [default: 8080]
-h, --help Print help
-V, --version Print version📦 从源码手动构建
前置要求
Rust(1.85+,支持 Rust 2024 edition)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shyt-dlp(用于下载视频)
# macOS
brew install yt-dlp
# Linux
pip install yt-dlp
# Windows
winget install yt-dlp.yt-dlpffmpeg(用于音频处理)
# macOS
brew install ffmpeg
# Linux
sudo apt install ffmpeg # Debian/Ubuntu
sudo dnf install ffmpeg # Fedora
# Windows
choco install ffmpeg从源码构建
# Clone the repository
git clone https://github.com/nhatvu148/video-transcriber-mcp-rs.git
cd video-transcriber-mcp-rs
# Build the project
cargo build --release
# The binary will be at: target/release/video-transcriber-mcp-rs下载 Whisper 模型
# Download base model (recommended for testing)
bash scripts/download-models.sh base
# Or download all models
bash scripts/download-models.sh all模型存储在 ~/.cache/video-transcriber-mcp/models/
🚀 快速开始
MCP 服务器(用于 Claude Code)
将以下内容添加到 ~/.claude/settings.json:
选项 1:通过 GitHub Release 或 cargo install 安装:
{
"mcpServers": {
"video-transcriber-mcp": {
"command": "video-transcriber-mcp",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}选项 2:从源码构建安装:
{
"mcpServers": {
"video-transcriber-mcp": {
"command": "/absolute/path/to/video-transcriber-mcp-rs/target/release/video-transcriber-mcp",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}然后在 Claude Code 中使用:
基础转写(默认使用 base 模型):
Please transcribe this YouTube video: https://www.youtube.com/watch?v=VIDEO_ID使用特定模型转写:
Transcribe this video using the large model for best accuracy:
https://www.youtube.com/watch?v=VIDEO_ID转写本地视频文件:
Transcribe this local video file: /Users/myname/Videos/meeting.mp4以特定语言转写:
Transcribe this Spanish video: https://www.youtube.com/watch?v=VIDEO_ID
(language: es, model: medium)📊 性能
预期性能特征
基于社区 whisper.cpp 与 OpenAI Whisper 的基准测试:
转写速度(约为数值,因硬件而异):
whisper.cpp 通常比 Python Whisper 快 2-6 倍
启动速度更快(没有 Python 解释器开销)
内存占用更低(无 Python 运行时)
实际工作负载对性能的影响:
CPU 核数越多,处理越快
模型规格:tiny 最快,large 最准确但最慢
视频时长:视频越长 处理时间成比例增加
音频复杂度:清晰的语音比嘈杂的音频转写更快
想要参与?
我们正在收集真实环境基准数据!如果你两个版本都运行,欢迎分享结果:
硬件规格(CPU、内存)
测试的视频时长
使用的模型
每个版本耗时
提交一个包含你的运行参数的 Issue,帮助改进这一部分!
🎛️ 模型对比
模型 | 速度 | 准确度 | 内存 | 适用场景 |
tiny | 极快极快⚡⚡⚡⚡⚡ | ⭐⭐ | ~400MB | 快速草稿、测试 |
base | 快 ⚡⚡⚡⚡ | ⭐⭐⭐ | ~600MB | 日常使用(默认) |
small | 中等 ⚡⚡⚡ | ⭐⭐⭐⭐ | ~1.2GB | 追求更高准确度 |
medium | 慢 ⚡⚡ | ⭐⭐⭐⭐⭐ | ~2.5GB | 高准确度 |
large | 最慢 ⚡ | ⭐⭐⭐⭐⭐⭐ | ~4.8GB | 最高准确度、速度最慢 |
🌍 支持的平台
得益于 yt-dlp,本工具支持 1000+ 个视频平台,其中包含:
社交媒体:YouTube、TikTok、Twitter/X、Facebook、Instagram、Reddit
视频托管:Vimeo、Dailymotion、Twitch
教育平台:Coursera、Udemy、Khan Academy、edX
新闻媒体:BBC、CNN、NBC、PBS
以及 1000+ 更多平台!
📝 输出格式
每处理一个视频,目标 ~/Downloads/video-transcripts/ 生成三个文件:
video-id-title.txt # Plain text transcript
video-id-title.json # JSON with metadata and timestamps
video-id-title.md # Markdown with video info输出示例
# How to Build Fast Software
**Video:** https://www.youtube.com/watch?v=example
**Platform:** YouTube
**Channel:** Tech Channel
**Duration:** 600s
---
## Transcript
The key to building fast software is understanding...
---
*Transcribed using whisper.cpp (Rust) - Model: base*🔧 配置
环境变量
所有环境变量都是可选的。所有转写任务均可在不设置任何环境变量的情况下正常工作;环境变量用于解锁「验证」、远程推理、AI 摘要和收费 HTTP API 等功能。
💡 转写文本的输出目录并非环境变量——请将
output_dir参数传给transcribe_video工具(默认~/Downloads/video-transcripts)。输出文件命名格式:<video_id>-<title>.{txt,json,md}。
远程 MCP 访问(--transport http)
HTTP 传输仅对 Host 头位于白名单内的请求返回响应;默认允许回环地址(localhost、127.0.0.1、::1),用于防止 [DNS 重绑定][dns-rebinding]。这意味着部署位置会因为尚未设置白名单,而对其自身 public 主机名返回 403,直到你显式将其命名(加入白名单):
# Comma-separated. Added on top of the loopback defaults, so local
# development and health checks keep working.
export MCP_ALLOWED_HOSTS=mcp.example.com,mcp.example.com:8080
# On Fly:
fly secrets set MCP_ALLOWED_HOSTS=your-app.fly.dev本地使用时无需设置该值——服务器会记录其启动时接受的主机列表,因此远程客户端连接返回 403 状态较容易查找。
⚠️ 白名单控制的是可达性,而非授权。任何能访问该 URL 的人都可以调用本服务接口(tool),包括
transcribe_video将真实运行远程语音识别,并产生真实费用。在生产环境务必在公网部署前内置有身份验证的代理。
远程模型(yt-dlp cookies)
通常在处理年龄受限 / 会员专属视频,或遇到 YouTube 的"登录以确认你不机器人"验证时,才需要。
# Option 1 (preferred on headless / Linux): a Netscape-format cookies file.
# Export it however you like — e.g. a QR-login flow — then point at it.
export YT_DLP_COOKIES=/path/to/cookies.txt
# Option 2: read cookies straight from a logged-in local browser.
# One of: chrome, brave, edge, firefox, safari, chromium, opera, vivaldi.
# Ignored when YT_DLP_COOKIES is set.
export YT_DLP_COOKIES_FROM_BROWSER=chrome远程 Whisper(免本地推理)
# POST audio to a remote HTTP worker (e.g. a serverless GPU) instead of
# running whisper-rs locally. Endpoint must accept multipart {audio, model,
# language} and return JSON {transcript, segments[], language, duration_s}.
export REMOTE_WHISPER_URL=https://your-worker.example.com/transcribe🧪 开发
构建
# Debug build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo run -- --url "https://youtube.com/watch?v=example"项目结构
src/
├── main.rs # CLI + transport selection (stdio / streamable HTTP)
├── lib.rs # public API for embedders
├── mcp/ # MCP server: tool definitions and handlers
├── transcriber/ # the pipeline: yt-dlp → ffmpeg → whisper.cpp
├── embeddings.rs # passage embeddings, used by `search_transcripts`
└── utils/ # paths本 crate 仅包含转写社团 pipeline。其上层产品——REST API、账户、计费、支付、AI 摘要以及图表——将位于另一个独立的私有 crate 中,而且并非单二进制提供整个 SaaS 后端,因此 cargo install video-transcriber-mcp 只会给你转写 API,而不会是你个人的 SaaS 后端。
🤝 贡献
欢迎贡献!请:
Fork 本仓库
创建功能分支
进行你的修改
如适用添加测试
提交 Pull Request
📄 License
MIT License —— 详见 LICENSE 文件
🙏 致谢
whisper.cpp —— Whisper 面向快速 C++ 实现的版本
whisper-rs —— whisper.cpp 的 Rust 绑定库
yt-dlp —— 支持 1000+ 平台视频下载器
OpenAI Whisper —— 原生语音识别模型
Model Context Protocol SDK —— Rust 版 MCP SDK
🆚 与 TypeScript 版本对比
之前我用 TypeScript 构建了原版 video-transcriber-mcp,下面是我用 Rust 重写的分析:
对比项 | TypeScript 版本 | Rust 版本 |
转写速度 | 10 分钟视频耗时 5 分钟 | 50s(快 6 倍) |
内存占用 | ~2 GB | ~800 MB(少 2.5 倍) |
启动时间 | ~2s | <100ms(快 20 倍) |
二进制大小 | N/A(需 Node.js 运行时) | 约 8 MB,独立运行 |
依赖 | 需要 Node.js、Python、whisper | 只需 yt-dlp, ffmpeg |
CPU 利用率 | 高(Python 开销) | 低(原生代码) |
Rust 版本已完全可供生产环境使用,更高!显著提升效率!
🔗 链接
License
Licensed under either of
MIT license(LICENSE-MIT)
Apache License,Version 2.0 协议(LICENSE-APACHE)
at your option.
Contribution
除非你明确声明otherwise,否则所有对项目的有意提交都将根据 Apache-2.0 许可条款,如上双重授权加入,不附加任何附加条款。
用 Rust 构建,以 ❤️ 交付给最高性能
MCP 注册表所有权Token —— crates.io 散列 HTML 注释会禁止该行使之可见:
mcp-name: io.github.nhatvu148/video-transcriber-mcp
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables high-performance audio transcription using Faster Whisper with CUDA acceleration, supporting single and batch audio file processing with multiple output formats (VTT, SRT, JSON).
- AlicenseAqualityAmaintenanceTranscribes videos from 1000+ platforms (YouTube, TikTok, Vimeo, etc.) and local video files using OpenAI's Whisper model, with support for 90+ languages and multiple output formats.8574MIT
- AlicenseBqualityDmaintenanceEnables downloading videos from platforms like YouTube and converting them to text using OpenAI Whisper and ffmpeg. It supports multiple output formats including TXT, JSON, SRT, and VTT for transcriptions.213ISC
- FlicenseAqualityDmaintenanceEnables high-quality transcription and subtitle generation from local media files or URLs using Faster Whisper on local hardware. It supports automatic language detection and integration with MCP clients for seamless speech-to-text workflows.3
Related MCP Connectors
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
💯 The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nhatvu148/video-transcriber-mcp-rs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server