Skip to main content
Glama

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

Related MCP server: FFmpeg MCP

Available Tools

Tool

Description

cut_video

Extract a segment from a video using start time and duration

image_to_video

Convert a static image to a video with fixed duration

concat_videos

Join multiple videos into one

convert

Convert between media formats (auto-detects from file extension)

remove_silence

Detect and remove silent segments from video

ffmpeg_raw

Run a restricted local FFmpeg command

Installation

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

Available Tools

6 tools
concat_videosC

Concatenate multiple videos into one

NameRequiredDescriptionDefault
inputPathsYesArray of video file paths to concatenate
outputPathYesPath for output video file

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

NameRequiredDescriptionDefault
inputPathYesPath to input media file
outputPathYesPath for output file (extension determines format)
audioBitrateNoAudio bitrate (e.g., '192k', '320k')
videoBitrateNoVideo bitrate (e.g., '2M', '5M')

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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

NameRequiredDescriptionDefault
durationYesDuration (e.g., '00:00:30' or '30')
inputPathYesPath to input video file
startTimeYesStart time (e.g., '00:01:30' or '90')
outputPathYesPath for output video file

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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.

NameRequiredDescriptionDefault
argsYesLimited FFmpeg arguments, for example ['-i', 'input.mp4', '-c:v', 'libx264', 'output.mp4']

TDQS

A3.5/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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

NameRequiredDescriptionDefault
fpsNoFrames per second
durationYesDuration in seconds
imagePathYesPath to input image file
outputPathYesPath for output video file

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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

NameRequiredDescriptionDefault
inputPathYesPath to input video file
outputPathYesPath for output video file
noiseThresholdNoAudio level threshold for silence detection (e.g., '-30dB')-30dB
minSilenceDurationNoMinimum duration in seconds to consider as silence

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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. 1 tool updatev1.0.3
    • Changedffmpeg_raw1 field changed
      • changedInput schema / properties / args / description
        Previous 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']"
  2. 6 tool updatesv1.0.2
    • First observedconcat_videos
    • First observedconvert
    • First observedcut_video
    • First observedffmpeg_raw
    • First observedimage_to_video
    • First observedremove_silence

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count5/5

Six tools is a well-scoped set for an FFmpeg helper server. Each tool covers a distinct common media operation without excessive surface area.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers