
kush36agrawal/video_editor_mcp 是一个从 https://github.com/kush36agrawal/video_editor_mcp. 导入的 MCP 服务器候选
概览
kush36agrawal/video_editor_mcp 是一个从 https://github.com/kush36agrawal/video_editor_mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个强大的视频编辑MCP服务器,利用FFmpeg通过自然语言命令执行视频编辑操作。
组成部分
工具
服务器实现了一个主要工具:
execute_ffmpeg:执行带有进度跟踪的FFmpeg命令- 输入命令字符串
- 验证并执行FFmpeg操作
- 报告处理过程中的实时进展
- 处理错误并提供详细反馈
- 支持所有FFmpeg操作,包括:
- 修剪/切割
- 视频合并
- 格式转换
- 调整速度
- 添加音频轨道
- 提取音频
- 添加字幕
- 基本滤镜(亮度、对比度等)
配置
先决条件
- FFmpeg 必须安装并访问在您的系统 PATH 中
- Python 3.9或更高版本
- 必备的 Python 包:
安装
-
如果还没安装FFmpeg,请安装:
-
安装视频编辑器包:
Claude桌面集成
在你的Claude Desktop配置文件中配置:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
Windows版:%APPDATA%/Claude/claude_desktop_config.json
发展
建设与出版
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Video Editor MCP Server
A powerful video editing MCP server that leverages FFmpeg to perform video editing operations through natural language commands.
Components
Tools
The server implements one main tool:
execute_ffmpeg: Executes FFmpeg commands with progress tracking- Takes a command string as input
- Validates and executes FFmpeg operations
- Reports real-time progress during processing
- Handles errors and provides detailed feedback
- Supports all FFmpeg operations including:
- Trimming/cutting
- Merging videos
- Converting formats
- Adjusting speed
- Adding audio tracks
- Extracting audio
- Adding subtitles
- Basic filters (brightness, contrast, etc.)
Configuration
Prerequisites
- FFmpeg must be installed and accessible in your system PATH
- Python 3.9 or higher
- Required Python packages:
mcp httpx
Installation
-
Install FFmpeg if not already installed:
# On macOS with Homebrew brew install ffmpeg # On Windows with Chocolatey choco install ffmpeg # On Ubuntu/Debian sudo apt install ffmpeg -
Install the video editor package:
uv add video-editor
Claude Desktop Integration
Configure in your Claude Desktop config file:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"video-editor": {
"command": "uv",
"args": ["run", "video-editor"]
}
}
}
Development
Building and Publishing
-
Sync dependencies:
uv sync -
Build package:
uv build -
Publish to PyPI:
uv publish
Note: Set PyPI credentials via:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
For the best debugging experience, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/video_editor run video-editor
Example Usage
Once connected to Claude Desktop, you can make natural language requests like:
- “Trim video.mp4 from 1:30 to 2:45”
- “Convert input.mp4 to WebM format”
- “Speed up video.mp4 by 2x”
- “Merge video1.mp4 and video2.mp4”
- “Extract audio from video.mp4”
- “Add subtitles.srt to video.mp4”
The server will:
- Parse your request
- Generate the appropriate FFmpeg command
- Execute it with progress tracking
- Provide feedback on completion
Error Handling
The server includes robust error handling for:
- Invalid input files
- Malformed FFmpeg commands
- Runtime execution errors
- Progress tracking issues
All errors are reported back to the client with detailed messages for debugging.
Security Considerations
- Only processes files in explicitly allowed directories
- Validates FFmpeg commands before execution
安装
npx @modelcontextprotocol/inspector uv --directory /path/to/video_editor run video-editor配置
{
"mcpServers": {
"video-editor": {
"command": "uv",
"args": ["run", "video-editor"]
}
}
}