mcpField
F
ffmpeg-mcp

ffmpeg-mcp

Local
github.com/PedroMarianoAlmeidaMedia & Design2Updated 2w ago

About ffmpeg-mcp

ffmpeg-mcp is an FFmpeg-based MCP server for AI assistants performing local audio and video tasks. It offers editing and conversion tools while restricting file access to a configured workspace.

Key features

  1. 01Audio and video conversion
  2. 02Cut video segments
  3. 03Concatenate videos
  4. 04Convert images to video
  5. 05Detect and remove silence
  6. 06Restricted FFmpeg commands

Use cases

  1. 01Convert MOV to MP4
  2. 02Extract audio from a video
  3. 03Cut a specified video segment
  4. 04Remove silence from a podcast recording

MCP support

It exposes tools for media conversion, editing, concatenation, silence removal, and restricted FFmpeg commands to MCP clients. File operations are confined to the configured local workspace.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"pedromarianoalmeida-ffmpeg": {
"command": "npx",
"args": [
"-y",
"ffmpeg-mcp-server"
]
}
}
}
Run commandnpx -y ffmpeg-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmffmpeg-mcp-server1.0.2

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
durationstringYesDuration (e.g., '00:00:30' or '30')
inputPathstringYesPath to input video file
startTimestringYesStart time (e.g., '00:01:30' or '90')
outputPathstringYesPath for output video file

Details

From the project 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)
npm install -g ffmpeg-mcp-server
From source
git clone https://github.com/PedroMarianoAlmeida/ffmpeg-mcp
cd ffmpeg-mcp
npm install
npm 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:

{
  "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:

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

Add to your Claude Code MCP settings:

{
  "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

# Install dependencies
npm install

# Build
npm run build

# Project structure
src/
  index.ts    # MCP server setup and tool registrations
  lib.ts      # FFmpeg operations

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.