
Video Convert MCP
A professional video format conversion tool based on MCP protocol that supports multiple formats, batch processing, and quality control for video files.
README
🎬 Video Convert MCP
🚀 基于MCP协议的高性能视频格式转换工具,支持多种主流视频格式之间的无缝转换
✨ 特性
- 🎯 多格式支持 - 支持MP4、AVI、MOV、WMV、MKV、WEBM、M4V等主流视频格式
- ⚡ 高性能转换 - 基于FFmpeg引擎,转换速度快,质量可靠
- 🔧 灵活配置 - 支持自定义分辨率、码率、帧率等参数
- 📦 批量处理 - 支持批量视频转换,提高工作效率
- 🛡️ 类型安全 - 完整的TypeScript类型定义
- 🔌 MCP协议 - 基于Model Context Protocol,易于集成到AI应用中
📋 系统要求
- Node.js >= 16.0.0
- FFmpeg (需要安装并添加到系统PATH)
FFmpeg 安装指南
Windows:
# 使用 Chocolatey
choco install ffmpeg
# 或下载预编译版本
# https://ffmpeg.org/download.html#build-windows
macOS:
# 使用 Homebrew
brew install ffmpeg
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install ffmpeg
🚀 安装
全局安装
npm install -g @pickstar-2002/video-convert-mcp
项目依赖
npm install @pickstar-2002/video-convert-mcp
🛠️ 使用方式
1. 命令行启动
# 全局安装后直接启动
video-convert-mcp
# 或使用 npx
npx @pickstar-2002/video-convert-mcp
2. 在 Claude Desktop 中使用
在 Claude Desktop 的配置文件中添加:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"video-convert": {
"command": "npx",
"args": ["@pickstar-2002/video-convert-mcp"]
}
}
}
3. 在其他 MCP 客户端中使用
任何支持MCP协议的客户端都可以连接到此服务器:
# 启动服务器
npx @pickstar-2002/video-convert-mcp
4. 编程方式集成
import VideoMcpServer from '@pickstar-2002/video-convert-mcp';
const server = new VideoMcpServer();
await server.start();
🔧 支持的格式
格式 | 扩展名 | 描述 | 推荐用途 |
---|---|---|---|
MP4 | .mp4 | 最常用的视频格式 | 网络分享、移动设备 |
AVI | .avi | 经典的视频容器格式 | 桌面播放 |
MOV | .mov | Apple QuickTime格式 | Mac系统、专业编辑 |
WMV | .wmv | Windows Media Video | Windows系统 |
MKV | .mkv | 开源的多媒体容器 | 高质量存储 |
WEBM | .webm | Web优化的视频格式 | 网页播放 |
M4V | .m4v | iTunes兼容格式 | Apple生态系统 |
📖 API 文档
convert_video
转换单个视频文件格式
参数:
{
inputPath: string; // 输入视频文件路径
outputFormat: string; // 目标输出格式 (mp4, avi, mov, wmv, mkv, webm, m4v)
outputPath?: string; // 输出文件路径 (可选)
quality?: string; // 质量预设: low/medium/high/ultra
resolution?: string; // 分辨率,如 "1920x1080"
videoBitrate?: number; // 视频码率 (kbps)
audioBitrate?: number; // 音频码率 (kbps)
frameRate?: number; // 帧率 (fps)
overwrite?: boolean; // 是否覆盖已存在文件
}
示例:
{
"tool": "convert_video",
"arguments": {
"inputPath": "/path/to/input.mp4",
"outputFormat": "avi",
"quality": "high",
"resolution": "1920x1080"
}
}
get_video_info
获取视频文件详细信息
参数:
{
filePath: string; // 视频文件路径
}
返回:
{
filePath: string;
format: string;
size: number; // 文件大小 (字节)
duration: number; // 时长 (秒)
video?: {
codec: string;
width: number;
height: number;
frameRate: number;
bitrate: number;
};
audio?: {
codec: string;
sampleRate: number;
channels: number;
bitrate: number;
};
}
batch_convert
批量转换视频文件
参数:
{
inputFiles: string[]; // 输入文件列表
outputFormat: string; // 目标格式
outputDir: string; // 输出目录
quality?: string; // 质量预设
overwrite?: boolean; // 是否覆盖已存在文件
}
💡 使用示例
基本转换
将MP4文件转换为AVI格式:
{
"tool": "convert_video",
"arguments": {
"inputPath": "/Users/username/video.mp4",
"outputFormat": "avi"
}
}
高质量转换
转换为高质量的MKV格式:
{
"tool": "convert_video",
"arguments": {
"inputPath": "/Users/username/input.mp4",
"outputFormat": "mkv",
"quality": "high",
"resolution": "1920x1080",
"videoBitrate": 5000,
"audioBitrate": 192,
"frameRate": 30
}
}
批量转换
将多个视频文件批量转换为WEBM格式:
{
"tool": "batch_convert",
"arguments": {
"inputFiles": [
"/path/to/video1.mp4",
"/path/to/video2.avi",
"/path/to/video3.mov"
],
"outputFormat": "webm",
"outputDir": "/path/to/output",
"quality": "medium"
}
}
获取视频信息
{
"tool": "get_video_info",
"arguments": {
"filePath": "/path/to/video.mp4"
}
}
🎯 质量预设说明
预设 | 描述 | 适用场景 |
---|---|---|
low |
低质量,文件小 | 快速预览、网络传输 |
medium |
中等质量 | 日常使用、社交分享 |
high |
高质量 | 专业用途、长期存储 |
ultra |
超高质量 | 专业制作、无损转换 |
🔧 开发
环境设置
# 克隆仓库
git clone https://github.com/pickstar-2002/video-convert-mcp.git
cd video-convert-mcp
# 安装依赖
npm install
# 构建项目
npm run build
# 开发模式
npm run dev
项目结构
src/
├── types/ # TypeScript类型定义
│ └── index.ts # 核心类型接口
├── services/ # 核心服务
│ └── validator.js # 参数验证服务
├── tools/ # MCP工具实现
│ └── index.js # 工具注册和处理器
└── index.ts # 服务器入口文件
🤝 贡献
欢迎提交Issue和Pull Request!
- Fork 项目
- 创建特性分支 (
git checkout -b feature/AmazingFeature
) - 提交更改 (
git commit -m 'Add some AmazingFeature'
) - 推送到分支 (
git push origin feature/AmazingFeature
) - 打开Pull Request
📄 许可证
本项目基于 MIT 许可证开源。
🙏 致谢
- FFmpeg - 强大的多媒体处理框架
- Model Context Protocol - 优秀的协议标准
- fluent-ffmpeg - FFmpeg的Node.js封装
📞 联系方式
如有问题或建议,欢迎联系:
微信: pickstar_loveXX
<div align="center"> <p>如果这个项目对您有帮助,请给它一个 ⭐️</p> <p>Made with ❤️ by pickstar-2002</p> </div>
推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。