- mcp-ffmpeg-tools
mcp-ffmpeg-tools
mcp-ffmpeg-tools is an open-source Python MCP (Model-Command Protocol) server that enables LLMs to perform media processing tasks by interpreting natural language instructions. It automatically generates and executes FFmpeg commands, then validates results using `ffprobe` or screenshots. The tool also supports querying FFmpeg source code to verify command correctness, making it ideal for intelligent, language-driven media workflows across platforms.
Content
mcp-ffmpeg-tools
An open-source Python MCP (Model-Command Protocol) server designed to enable Large Language Models (LLMs) to execute FFmpeg commands, receive execution results, and validate commands against FFmpeg source code.
Prerequisites
Before installing mcp-ffmpeg-tools, you need to have FFmpeg installed on your system:
Windows
- Download FFmpeg from ffmpeg.org
- Extract the archive to a location of your choice
- Add the
bindirectory to your system PATH
macOS
brew install ffmpeg
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install ffmpeg
Linux (Fedora)
sudo dnf install ffmpeg
Features
- Execute FFmpeg commands through an MCP interface
- Receive detailed execution results and error messages
- Access FFmpeg source code for command correction
- Cross-platform support (Windows, macOS, Linux)
- Environment management using uv
Installation
- Clone the repository:
git clone https://github.com/gamhoi/mcp-ffmpeg-tools.git
cd mcp-ffmpeg-tools
- Install using uv:
uv venv
uv pip install -e .
The installation process will:
- Verify that FFmpeg is installed and accessible in your system PATH
- Download the corresponding FFmpeg source code for validation
- Install the Python package and its dependencies
If FFmpeg is not found or the source code download fails, the installation will fail.
Usage
Usage with Claude Desktop
Add the following configuration to your Claude Desktop settings:
{
"mcpServers": {
"mcp-ffmpeg-tools": {
"command": "uv",
"args": [
"--directory",
"PATH_TO/mcp-ffmpeg-tools",
"run",
"ffmpeg-tools"
]
}
}
}
Running Tests
uv run python3 client/test.py
Prompt Examples
Base prompt
Help me perform media conversion tasks using FFmpeg. You can:
- use tool:execute_ffmpeg to run FFmpeg commands
- use tool:execute_ffprobe to inspect results (e.g., resolution, bitrate)
- use tool:get_screenshot to inspect results (e.g., video layout, quality)
- use tool:ls_ffmpeg_source_code and tool:get_ffmpeg_source_code to validate commands using FFmpeg source code
Extract video and audio
Extract all media streams from the file 'YOU_FILE_PATH' and save outputs to 'YOU_OUTPUT_PATH'
Overlay 2 videos
Overlay file1 'YOU_FILE_PATH_1' and file2 'YOU_FILE_PATH_2', using file1 as the background. Scale file2 down to half its original resolution and position it at the top-right corner of file1. Save the output to 'YOUR_OUTPUT_PATH'.
Server Config
{
"mcpServers": {
"mcp-ffmpeg-tools": {
"command": "uv",
"args": [
"--directory",
"PATH_TO/mcp-ffmpeg-tools",
"run",
"ffmpeg-tools"
]
}
}
}Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code