A Model Context Protocol server for FFmpeg media processing
Project description
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
- Caching — Same inputs produce the same job ID; completed jobs are reused unless
force_runis used.
Requirements
- Python 3.13+
- FFmpeg — Must be on your system PATH or set via
FFMPEG_PATH(see Configuration).
Installation
From the project root:
# With uv
uv sync
# Or with pip
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).
- Default: use
-
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)
# From project root (with src on PYTHONPATH)
uv run python -m MCP_ffmpeg.main
# Or after pip install
python -m MCP_ffmpeg.main
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.
Claude Desktop Integration
Add this to your %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"mcp-ffmpeg": {
"command": "mcp-ffmpeg",
"env": {
"FFMPEG_PATH": "C:\\path\\to\\your\\ffmpeg.exe"
}
}
}
}
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 helpers
- outputs/ — 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
Feel free to reach out for collaborations or if you encounter any issues!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_ffmpeg-0.1.4.tar.gz.
File metadata
- Download URL: mcp_ffmpeg-0.1.4.tar.gz
- Upload date:
- Size: 65.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b138d30014a58b5fcc3d3d4bd519cbc9dea5bb8bb2b511d23077d5248edb2950
|
|
| MD5 |
9979caa92c7ae8e190416a34a9e71623
|
|
| BLAKE2b-256 |
48e810e797a11afa44f6272c2db2d44cea4747295010af236ecb836af71b4136
|
Provenance
The following attestation bundles were made for mcp_ffmpeg-0.1.4.tar.gz:
Publisher:
publish.yml on priyanshum143/MCP-FFMPEG
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_ffmpeg-0.1.4.tar.gz -
Subject digest:
b138d30014a58b5fcc3d3d4bd519cbc9dea5bb8bb2b511d23077d5248edb2950 - Sigstore transparency entry: 1109195538
- Sigstore integration time:
-
Permalink:
priyanshum143/MCP-FFMPEG@08e0b36064146aea55147e438b22264eefae2a28 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/priyanshum143
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08e0b36064146aea55147e438b22264eefae2a28 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_ffmpeg-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mcp_ffmpeg-0.1.4-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
049fdad50fb7d6f4f030199c85a0bd500cf13ce7be7ae1e2fcf05f49779faa2a
|
|
| MD5 |
946b48b5423cba8d2fc50e0066c86912
|
|
| BLAKE2b-256 |
7a179a17783d41861d256d447961c2707ec4863b5261b01eac7128e1e5b49a3f
|
Provenance
The following attestation bundles were made for mcp_ffmpeg-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on priyanshum143/MCP-FFMPEG
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_ffmpeg-0.1.4-py3-none-any.whl -
Subject digest:
049fdad50fb7d6f4f030199c85a0bd500cf13ce7be7ae1e2fcf05f49779faa2a - Sigstore transparency entry: 1109195552
- Sigstore integration time:
-
Permalink:
priyanshum143/MCP-FFMPEG@08e0b36064146aea55147e438b22264eefae2a28 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/priyanshum143
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08e0b36064146aea55147e438b22264eefae2a28 -
Trigger Event:
release
-
Statement type: