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-mcpCut 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
| Name | Required | Description | Default |
|---|---|---|---|
| inputPaths | Yes | Array of video file paths to concatenate | |
| outputPath | Yes | Path for output video file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description discloses no behavioral traits such as whether it overwrites the output file, supports specific codecs, or the order of concatenation. This leaves the agent uninformed about side effects or requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that directly conveys the tool's purpose. No unnecessary information, though a bit more detail could be added without sacrificing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and no output schema, the description is minimally adequate. However, it lacks details on error handling, output format, or any behavioral important for the agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers both parameters with descriptions. The tool description adds no further meaning beyond the schema, but the schema coverage is complete, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool concatenates multiple videos into one, using a specific verb and resource. It distinguishes from siblings like cut_video or convert, but could be improved by mentioning ordering or format compatibility.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives like ffmpeg_raw or convert. The description does not mention prerequisites or scenarios where concatenation is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
convertB
Convert media between formats (audio-to-audio, video-to-video, or video-to-audio). Format is auto-detected from file extension.
| Name | Required | Description | Default |
|---|---|---|---|
| inputPath | Yes | Path to input media file | |
| outputPath | Yes | Path for output file (extension determines format) | |
| audioBitrate | No | Audio bitrate (e.g., '192k', '320k') | |
| videoBitrate | No | Video bitrate (e.g., '2M', '5M') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description only mentions auto-detection of format from extension, which adds some value, but fails to disclose crucial behavioral traits like whether it overwrites existing files, supported formats, or any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the main action and supported conversions. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite schema covering parameters, the description lacks context on expected behavior (e.g., return value, error handling, supported formats) and no output schema. For a conversion tool, it is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover 100% of parameters, so baseline is 3. The description adds that format is auto-detected, reinforcing outputPath semantics but not providing new meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it converts media between formats with specific combinations (audio-to-audio, video-to-video, video-to-audio). It is distinct from sibling tools like concat_videos or cut_video, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like ffmpeg_raw or image_to_video. Lacks explicit context for usage or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cut_videoB
Extract a segment from a video file
| Name | Required | Description | Default |
|---|---|---|---|
| duration | Yes | Duration (e.g., '00:00:30' or '30') | |
| inputPath | Yes | Path to input video file | |
| startTime | Yes | Start time (e.g., '00:01:30' or '90') | |
| outputPath | Yes | Path for output video file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It only states the action without disclosing behavioral traits such as file handling (non-destructive due to input/output paths), codec support, or error responses. The minimal description fails to inform the agent of important behaviors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no extraneous words. It efficiently communicates the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description lacks context about return values, success criteria, or limitations (e.g., supported video formats). With 4 required parameters and no output schema, the agent needs more information to invoke the tool correctly, such as expected output format or error handling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, providing descriptions for all 4 parameters. The tool description adds no additional meaning beyond the schema, such as format examples or constraints. Baseline 3 is appropriate given the schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Extract a segment from a video file' uses a specific verb and resource, clearly identifying the tool's function. It distinguishes itself from siblings like concat_videos, convert, and remove_silence by focusing on segment extraction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidelines are provided. The description does not indicate when to use this tool versus alternatives, nor does it specify prerequisites or limitations. The agent must infer context from the sibling list without explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | Limited FFmpeg arguments, for example ['-i', 'input.mp4', '-c:v', 'libx264', 'output.mp4'] |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses key restrictions (local only, no network, no filters, workspace paths) but omits whether the command writes files, potential overwrites, error handling, or execution return details. This is useful but incomplete for a command-execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose then restrictions. No wasted words, and the critical constraints are clearly separated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter tool with no output schema or annotations, the description covers restrictions and workspace path requirements but doesn't explain return behavior, error modes, or whether execution is synchronous. It is adequate but leaves gaps an agent might need for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single 'args' parameter has full schema coverage, including an example, so the schema itself provides adequate semantics. The description adds no further meaning about the parameter beyond reiterating input/output path constraints, which is baseline 3 given the high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs a restricted local FFmpeg command, specifying verb and resource. It doesn't explicitly differentiate from sibling tools like convert or cut_video, but the 'raw' nature and restrictions imply a lower-level, general-purpose alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists what is not supported (network protocols, filters, arbitrary options) and the workspace path requirement, which helps avoid misuse. However, it doesn't explicitly state when to use this tool instead of the more specific siblings, leaving the agent to infer that it's for custom FFmpeg operations not covered by them.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
image_to_videoB
Convert a static image to a video with fixed duration
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second | |
| duration | Yes | Duration in seconds | |
| imagePath | Yes | Path to input image file | |
| outputPath | Yes | Path for output video file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, and the description does not disclose behavioral traits beyond the basic operation. It does not mention if files are overwritten, required permissions, or how errors are handled. The description carries the full burden but provides minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no unnecessary words. It is front-loaded with the essential purpose and efficiently communicates the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 4 parameters and no output schema or annotations, the description provides a minimal overview but omits details like supported input formats, aspect ratio handling, and output codec. It is adequate for a straightforward conversion but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The description adds limited value by reiterating 'fixed duration', but does not elaborate on parameter constraints like valid image formats or the effect of fps on output quality.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Convert'), the resource ('static image to a video'), and a key constraint ('fixed duration'). It distinguishes from sibling tools like concat_videos and ffmpeg_raw.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, limitations, or context in which image_to_video is preferred over concat_videos or ffmpeg_raw.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remove_silenceB
Detect and remove silent segments from a video, keeping only non-silent parts
| Name | Required | Description | Default |
|---|---|---|---|
| inputPath | Yes | Path to input video file | |
| outputPath | Yes | Path for output video file | |
| noiseThreshold | No | Audio level threshold for silence detection (e.g., '-30dB') | -30dB |
| minSilenceDuration | No | Minimum duration in seconds to consider as silence |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description carries full burden but only states basic functionality. Missing details on how silent segments are removed (e.g., splicing, speed changes), output consequences, or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no redundancy. However, it could include additional useful context without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations. Description lacks explanations of return value, behavior for edge cases, or how parameters interact. Incomplete for a tool with 4 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds no additional meaning beyond the parameter descriptions already present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool detects and removes silent segments from a video, keeping only non-silent parts. It uses specific verbs and resource, and distinguishes from siblings like cut_video which cuts by time or frames.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like cut_video or ffmpeg_raw. Does not mention prerequisites, when not to use, or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.3- Changed
ffmpeg_raw1 field changed- changed
Input schema / properties / args / descriptionPrevious value: -"Array of FFmpeg arguments (e.g., ['-i', 'input.mp4', '-vf', 'scale=1280:720', 'output.mp4'])"New value: +"Limited FFmpeg arguments, for example ['-i', 'input.mp4', '-c:v', 'libx264', 'output.mp4']"
6 tool updates
v1.0.2- First observed
concat_videos - First observed
convert - First observed
cut_video - First observed
ffmpeg_raw - First observed
image_to_video - First observed
remove_silence
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
- RendobarOAuthcom.rendobar
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
- AlicenseAqualityCmaintenanceEnables video and audio processing through FFmpeg, supporting format conversion, compression, trimming, audio extraction, frame extraction, video merging, and subtitle burning through natural language commands.8107 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.21-