视频编辑器 MCP 服务器
一个强大的视频编辑 MCP 服务器,利用 FFmpeg 通过自然语言命令执行视频编辑操作。
成分
工具
该服务器实现了一个主要工具:
execute_ffmpeg
带有进度跟踪的 FFmpeg 命令将命令字符串作为输入
验证并执行 FFmpeg 操作
报告处理过程中的实时进度
处理错误并提供详细的反馈
支持所有 FFmpeg 操作,包括:
修剪/切割
合并视频
转换格式
调整速度
添加音轨
提取音频
添加字幕
基本滤镜(亮度、对比度等)
配置
先决条件
必须在系统 PATH 中安装并可访问 FFmpeg
Python 3.9 或更高版本
所需的 Python 包:
mcp httpx
安装
如果尚未安装,请安装 FFmpeg:
# On macOS with Homebrew brew install ffmpeg # On Windows with Chocolatey choco install ffmpeg # On Ubuntu/Debian sudo apt install ffmpeg安装视频编辑器包:
uv add video-editor
Claude 桌面集成
在您的 Claude Desktop 配置文件中进行配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
发展
构建和发布
同步依赖项:
uv sync构建包:
uv build发布到 PyPI:
uv publish
注意:通过以下方式设置 PyPI 凭据:
令牌:
--token
或UV_PUBLISH_TOKEN
或用户名/密码:
--username
/UV_PUBLISH_USERNAME
和--password
/UV_PUBLISH_PASSWORD
调试
为了获得最佳调试体验,请使用 MCP Inspector:
示例用法
一旦连接到 Claude Desktop,您就可以发出自然语言请求,例如:
“将 video.mp4 从 1:30 剪辑到 2:45”
“将 input.mp4 转换为 WebM 格式”
“将 video.mp4 加速 2 倍”
“合并 video1.mp4 和 video2.mp4”
“从视频.mp4中提取音频”
“将 subtitles.srt 添加到 video.mp4”
服务器将:
解析您的请求
生成适当的 FFmpeg 命令
使用进度跟踪执行
完成时提供反馈
错误处理
该服务器包括强大的错误处理功能:
无效的输入文件
格式错误的 FFmpeg 命令
运行时执行错误
进度跟踪问题
所有错误都会连同详细的调试信息一起报告给客户端。
安全注意事项
仅处理明确允许的目录中的文件
在执行之前验证 FFmpeg 命令
清理所有输入参数
报告与安全相关的问题的详细错误消息
贡献
欢迎贡献!请按以下步骤操作:
分叉存储库
创建你的功能分支
进行更改
提交拉取请求
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
使用由 FFmpeg 提供支持的自然语言命令实现视频编辑,支持修剪、合并、格式转换等操作,并具有实时进度跟踪和错误处理功能。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA lightweight server that exposes FFmpeg's video processing capabilities to AI assistants through the Model Context Protocol (MCP), supporting operations like video format conversion, audio extraction, and adding watermarks.Last updated -84716MIT License
- AsecurityAlicenseAqualityProvides powerful video and audio editing capabilities through FFmpeg, enabling AI assistants to perform professional-grade operations including format conversion, trimming, overlays, transitions, and advanced audio processing.Last updated -2736MIT License
- -securityFlicense-qualityWeb-based video editing platform that provides direct editing functionality through a Model Context Protocol server, supporting media file management, timeline editing, and advanced transformation effects.Last updated -6
- AsecurityFlicenseAqualityEnables comprehensive video file metadata management including reading, editing, and batch processing of video properties like title, description, tags, and technical specifications. Supports multiple video formats with intelligent caching and search capabilities.Last updated -891