Ffmpeg Mcp

io.github.PedroMarianoAlmeida由 GitHub 账号 PedroMarianoAlmeida 发布v1.0.2更新于 Oct 24, 2026

FFmpeg video/audio tools: cut, convert, concat, remove silence, and raw commands.

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,为助手提供 FFmpeg 工具,可在工作区内剪切、转换、拼接视频音频并去除静音。

可以做什么
  • 按起始时间和时长截取视频片段,或将静态图片转为固定时长视频
  • 将多个视频拼接为一个文件
  • 在 mp4、mp3、wav、mov 等格式间转换,包括从视频中提取音频
  • 自动检测并移除视频或播客音频中的静音片段
  • 以本地输入、单一输出路径和少量编解码与时间参数运行受限的 FFmpeg 命令
适用场景
适合让助手对本地文件做日常媒体处理,例如裁剪片段、转换格式、合并视频或去除静音;由于内置 FFmpeg 二进制,无需在系统中单独安装。
运行要求
作为本地进程运行,可通过 npm 包 ffmpeg-mcp-server 安装或用 Node.js 从源码构建,已内置 FFmpeg 二进制。可选设置 FFMPEG_MCP_WORKSPACE 指定媒体目录,未设置时使用服务器当前工作目录。运行工具前需先创建输出目录。
安装前请注意
工具会写入文件,建议将 FFMPEG_MCP_WORKSPACE 指向专用媒体目录;所有输入输出必须位于该目录内,URL 协议、越界路径和符号链接输出会被拒绝。原始命令工具虽受限(仅本地输入、单一输出及有限编解码与时间选项),但仍会在本机执行 FFmpeg。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Ffmpeg Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

FFmpeg MCP Server

A Model Context Protocol (MCP) server that provides video and audio manipulation tools powered by FFmpeg. This server enables AI assistants to perform media operations like cutting videos, converting formats, removing silence, and more.

Features

  • Self-contained - Includes bundled FFmpeg binary via ffmpeg-static, no system installation required
  • Format conversion - Convert between audio/video formats (mp4, mp3, wav, mov, etc.)
  • Video editing - Cut segments, concatenate multiple videos, convert images to video
  • Audio processing - Detect and remove silent segments automatically
  • Local by default - Inputs and outputs stay inside a configured workspace

Available Tools

ToolDescription
cut_videoExtract a segment from a video using start time and duration
image_to_videoConvert a static image to a video with fixed duration
concat_videosJoin multiple videos into one
convertConvert between media formats (auto-detects from file extension)
remove_silenceDetect and remove silent segments from video
ffmpeg_rawRun a restricted local FFmpeg command

Installation

From npm (recommended)

bash
npm install -g ffmpeg-mcp-server

From source

bash
git clone https://github.com/PedroMarianoAlmeida/ffmpeg-mcpcd ffmpeg-mcpnpm installnpm run build

Configuration

Workspace and safety

Every input and output must be inside FFMPEG_MCP_WORKSPACE. If it is unset, the server's current working directory is used. The server resolves symlinks before reading and rejects URL schemes, traversal outside the workspace, and symlink outputs. Create output directories before running a tool.

ffmpeg_raw is deliberately restricted. It accepts local -i inputs, one final local output path, and a small set of codec and timing options. It does not accept filters, forced formats, or arbitrary FFmpeg flags because those options can load extra files or use network protocols.

For example, set a dedicated media directory in your MCP configuration:

json
{  "mcpServers": {    "ffmpeg": {      "command": "npx",      "args": ["ffmpeg-mcp-server"],      "env": {        "FFMPEG_MCP_WORKSPACE": "/absolute/path/to/media-workspace"      }    }  }}

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "ffmpeg": {      "command": "npx",      "args": ["ffmpeg-mcp-server"]    }  }}

Claude Code

Add to your Claude Code MCP settings:

json
{  "mcpServers": {    "ffmpeg": {      "command": "npx",      "args": ["ffmpeg-mcp-server"]    }  }}

Usage Examples

Cut a video segment

"Cut the first 30 seconds from video.mp4"→ Uses cut_video tool

Convert formats

"Convert video.mov to mp4""Extract audio from video.mp4 as mp3"→ Uses convert tool

Remove silence

"Remove silent parts from my podcast recording"→ Uses remove_silence tool (detects silence > 2s at -30dB by default)

Restricted raw operations

"Convert input.mp4 to output.mp4 using libx264"→ Uses ffmpeg_raw with local paths and supported codec options

Development

bash
# Install dependenciesnpm install
# Buildnpm run build
# Project structuresrc/  index.ts    # MCP server setup and tool registrations  lib.ts      # FFmpeg operations

License

MIT

来源:README.md,提交 518b13c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分