ffmpeg-mcp
Provides video and audio manipulation tools using FFmpeg, enabling format conversion, video editing, audio processing, and raw FFmpeg command execution.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ffmpeg-mcp Cut the first 30 seconds from video.mp4"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 requiredFormat 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
Related MCP server: FFmpeg MCP
Available Tools
Tool | Description |
| Extract a segment from a video using start time and duration |
| Convert a static image to a video with fixed duration |
| Join multiple videos into one |
| Convert between media formats (auto-detects from file extension) |
| Detect and remove silent segments from video |
| Run a restricted local FFmpeg command |
Installation
From npm (recommended)
npm install -g ffmpeg-mcp-serverFrom source
git clone https://github.com/PedroMarianoAlmeida/ffmpeg-mcp
cd ffmpeg-mcp
npm install
npm run buildConfiguration
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 toolConvert formats
"Convert video.mov to mp4"
"Extract audio from video.mp4 as mp3"
→ Uses convert toolRemove 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 optionsDevelopment
# Install dependencies
npm install
# Build
npm run build
# Project structure
src/
index.ts # MCP server setup and tool registrations
lib.ts # FFmpeg operationsLicense
MIT
Available Tools
6 toolsconcat_videosC
Concatenate multiple videos into one
Inputs: inputPaths (required), outputPath (required).
convertB
Convert media between formats (audio-to-audio, video-to-video, or video-to-audio). Format is auto-detected from file extension.
Inputs: inputPath (required), outputPath (required), audioBitrate, videoBitrate.
cut_videoB
Extract a segment from a video file
Inputs: duration (required), inputPath (required), startTime (required), outputPath (required).
ffmpeg_rawA
Run a restricted local FFmpeg command. Inputs and the final output must be workspace paths; network protocols, filters, and arbitrary FFmpeg options are not supported.
Inputs: args (required).
image_to_videoB
Convert a static image to a video with fixed duration
Inputs: duration (required), imagePath (required), outputPath (required), fps.
remove_silenceB
Detect and remove silent segments from a video, keeping only non-silent parts
Inputs: inputPath (required), outputPath (required), noiseThreshold, minSilenceDuration.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The specialized tools (concat_videos, convert, cut_video, image_to_video, remove_silence) have clearly distinct media operations. ffmpeg_raw is a generic escape hatch that could overlap with several specialized tools, but its stated restrictions reduce the ambiguity.
Most tools follow a verb_noun pattern such as concat_videos, cut_video, and remove_silence. However, convert is a bare verb, image_to_video uses a noun_to_noun form, and ffmpeg_raw has a prefixed noun_raw style, so conventions are mixed but still readable.
Six tools is a well-scoped set for an FFmpeg helper server. Each tool covers a distinct common media operation without excessive surface area.
Core media workflows are covered: conversion, concatenation, cutting, image-to-video, and silence removal. Minor gaps remain, such as probing metadata, extracting frames or thumbnails, and resizing/cropping, which are unavailable because filters are not supported.
Maintenance
Related MCP Connectors
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Video, audio, and image processing for AI agents: convert, transcribe, upscale - 150+ operations.
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
Trim, convert, resize, compress, and remix audio and video.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides 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.2789MIT
- AlicenseAqualityDmaintenanceEnables video and audio processing through FFmpeg, supporting format conversion, compression, trimming, audio extraction, frame extraction, video merging, and subtitle burning through natural language commands.8135 PyPI28MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to perform video and audio processing tasks such as format conversion, cutting, merging, and adding effects via FFmpeg, with hardware acceleration support.193-
- FlicenseNot gradedqualityDmaintenanceEnables comprehensive video/audio processing, analysis, and streaming via natural language by exposing 40+ FFmpeg tools as MCP tools.22-