mcp-ffmpeg
Provides tools for running FFmpeg video processing jobs such as trimming, format conversion, resolution changes, subtitle conversion, audio extraction, and transcript extraction.
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., "@mcp-ffmpeg trim the first 30 seconds of intro.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.
MCP-FFMPEG
An MCP (Model Context Protocol) server and CLI for running FFmpeg jobs via a job queue with configurable parallel workers.
Features
Job queue — Enqueue video jobs; workers process them in the background.
Parallel workers — Run multiple jobs at once (number set in config).
Two interfaces
CLI — Interactive menu to pick an action and enter parameters.
MCP server — Tools for AI assistants (e.g. Claude Desktop) to enqueue and check jobs.
Actions
Trim — Cut a segment from a video (start time + duration).
Change video format — Convert to another container (e.g. mp4 → mkv) without re-encoding.
Change resolution — Convert to another resolution, height and width provided by user.
Change Subtitle format — Convert to another subtitle format (e.g. srt -> vtt).
Extract Audio - Extract audio from an input video file
Extract video transcript - Extracts the transcript of a video file
Caching — Same inputs produce the same job ID; completed jobs are reused unless
force_runis used.
Related MCP server: MCP FFmpeg Helper
Requirements
Python 3.13+
FFmpeg — Must be on your system PATH or set via
FFMPEG_PATH(see Configuration).
Installation
Choose one of the following:
Option 1: Install from PyPI
pip install mcp-ffmpegOr with uv:
uv add mcp-ffmpegOption 2: Clone the repository
git clone https://github.com/priyanshum143/MCP-FFMPEG.git
cd MCP-FFMPEGThen install from the project root:
# With uv
uv sync
# Or with pip (editable install)
pip install -e .Configuration
FFmpeg path
Default: use
ffmpegfrom system PATH.Optional: set env var
FFMPEG_PATHto the full path of the FFmpeg executable (e.g. for Claude Desktop).
Worker and paths
Editsrc/MCP_ffmpeg/utils/variables.py(classCommonVariables):PARALLEL_EXECUTIONS_ALLOWED— Number of jobs that can run at once (default: 3).WORKER_RE_RUN_TIME— Seconds to wait between queue checks (default: 10).OUTPUT_DIR/LOGS_DIR— Where job outputs and logs are stored (default:outputs/andlogs/under project root).
Running
CLI (interactive)
You get a menu: choose an action, enter the requested parameters. Jobs are enqueued and processed by background workers. Logs show which worker picked which job.
If you installed from PyPI:
mcp-ffmpeg-cliIf you cloned the repo:
# With uv (from project root)
uv run python -m MCP_ffmpeg.main
# Or after pip install -e .
mcp-ffmpeg-cliMCP server (e.g. Claude Desktop)
Use the mcp-ffmpeg command so the MCP server runs over stdio.
If you installed from PyPI: use mcp-ffmpeg in your MCP config.
If you cloned the repo: after pip install -e ., use mcp-ffmpeg the same way. If you used uv sync, use uv run mcp-ffmpeg in the terminal, or in your MCP config use the path to your venv’s mcp-ffmpeg script so the server runs in that environment.
Add this to your %APPDATA%\Claude\claude_desktop_config.json (Windows) or the equivalent config for your MCP client:
{
"mcpServers": {
"mcp-ffmpeg": {
"command": "mcp-ffmpeg",
"env": {
"FFMPEG_PATH": "C:\\path\\to\\your\\ffmpeg.exe"
}
}
}
}On macOS/Linux, use your normal config path and set FFMPEG_PATH to the path of your ffmpeg binary if needed.
Project layout
src/MCP_ffmpeg/
├── main.py # CLI entrypoint
├── mcp_server.py # MCP server entrypoint + tool definitions
├── actions/ # FFmpeg actions (trim, change format)
├── jobs/ # Job queue, manager, worker
└── utils/ # Logging, paths, CLI helpersoutputs/ — One folder per job (by job ID), containing
job_details.json, output file, and optionalffmpeg_logs.log.logs/ — Application logs.
License
No license required, Clone/Fork the repo and enjoy.
Author
Priyanshu CSE 2025 Graduate | Software Engineer at Amagi Media Labs
GitHub: priyanshum143
LinkedIn: Priyanshu Mehta
Project Repository: MCP-FFMPEG
PyPi: MCP-FFmpeg
Feel free to reach out for collaborations or if you encounter any issues!
Available Tools
8 toolsget_job_resultA
Retrieve the final output of a completed job.
This tool should only be called after the job status is 'success'. If the job is still 'queued' or 'running', this will return the current status. If the job has 'failed', it will return the error details.
Inputs: job_id (required). Returns: result
get_job_statusB
Get the latest status for a job_id.
Inputs: job_id (required). Returns: result
start_audio_extractionA
Enqueue a EXTRACT_AUDIO job. Extract the audio from a given video and in the format requested by user Returns immediately with job_id + status.
input_file: path to input video file (must exist) target_format: target audio format (defaults to mp3) force_run: if True, run even when a cached result exists for the same inputs
Inputs: input_file (required), target_format, force_run. Returns: result
start_change_formatA
Enqueue a CHANGE_FORMAT job. Converts video to another container (e.g. mp4, mkv, avi) without re-encoding. Returns immediately with job_id + status.
input_file: path to input video file (must exist) output_format: desired output format (e.g., mp4, mkv, avi); dot is optional force_run: if True, run even when a cached result exists for the same inputs
Inputs: input_file (required), output_format (required), force_run. Returns: result
start_change_resolutionA
Enqueue a CHANGE_RESOLUTION job. Converts the video resolution according to the user's provided height and width. Returns immediately with job_id + status.
input_file: path to input video file (must exist) height: desired height of the video width: desired width of the video force_run: if True, run even when a cached result exists for the same inputs
Inputs: input_file (required), height (required), width (required), force_run. Returns: result
start_subtitle_format_changeA
Enqueue a CHANGE_SUBTITLE_FORMAT job. Converts the subtitle format according to the user's provided details. Returns immediately with job_id + status.
input_file: path to input video file (must exist) target_format: target subtitle format force_run: if True, run even when a cached result exists for the same inputs
Inputs: input_file (required), target_format (required), force_run. Returns: result
start_trimA
Enqueue a TRIM job. Returns immediately with job_id + status.
input_file: path to input video file (must exist) start_time: seconds (float) duration: seconds (float) force_run: if we need to force run a job or not ignoring cache
Inputs: input_file (required), start_time (required), duration (required), force_run. Returns: result
start_video_transcriptionA
Enqueue a transcript job using Whisper on a video or audio file. Returns immediately with job_id + status.
input_file: path to input media file (must exist) model: Whisper model name (tiny, base, small, medium, large, turbo) language: language code (e.g. en, hi) output_format: transcript format (txt, srt, vtt, json, tsv) force_run: if True, run even when a cached result exists for the same inputs
Inputs: input_file (required), model, language, output_format, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: status retrieval, result retrieval, and separate processing jobs for audio extraction, format change, resolution change, subtitle format change, trimming, and transcription. No overlap in functionality.
All tools follow a consistent verb_noun pattern: get_ for retrieval and start_ for job enqueuing. Underscores are used uniformly, making the naming predictable.
With 8 tools, the server covers a reasonable set of common FFmpeg operations without being overwhelming. The count is well-scoped for a media processing server.
The tool set covers core operations like status check, result retrieval, audio extraction, format conversion, resolution change, subtitle conversion, trimming, and transcription. Missing tools for video compression, frame extraction, or concatenation, but these are minor gaps given the common use cases.
Maintenance
Related MCP Connectors
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
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.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables video editing using natural language commands powered by FFmpeg, supporting operations like trimming, merging, format conversion, and more with real-time progress tracking and error handling.52-
- AlicenseAqualityDmaintenanceA lightweight server that exposes FFmpeg's video processing capabilities to AI assistants through the Model Context Protocol (MCP), supporting operations like video format conversion, audio extraction, and adding watermarks.853 npm25MIT
- 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.2790MIT
- 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.8170 PyPI28MIT