FFmpeg-MCP is a server that allows you to perform various video operations through dialogue-based interactions. It leverages the FFmpeg command line tool to enable local video searching, trimming, concatenation, playback, and other video manipulation functions using the Model Context Protocol (MCP).
Before installing FFmpeg-MCP, ensure you have:
git clone https://github.com/video-creator/ffmpeg-mcp.git
cd ffmpeg-mcp
uv sync
{
"mcpServers": {
"ffmpeg-mcp": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "uv",
"args": [
"--directory",
"/path/to/your/ffmpeg-mcp",
"run",
"ffmpeg-mcp"
],
"transportType": "stdio"
}
}
}
Note: Replace /path/to/your/ffmpeg-mcp
with the actual directory where you downloaded the FFmpeg-MCP project.
Recursively searches for video files in a specified directory.
find_video_path
Parameters:
Returns the full path to the matching video file.
Retrieves detailed information about a video file.
get_video_info
Parameters:
Returns information such as duration, fps, codec, width, and height.
Trims a video to a specified segment.
clip_video
Parameters:
Returns the path to the trimmed video file.
Joins multiple video files into a single video.
concat_videos
Parameters:
Automatically uses quick mode if video properties (width, height, frame rate) are consistent.
Plays video or audio using ffplay.
play_video
Parameters:
Supports various formats like mov, mp4, avi, mkv, 3gp.
Places one video on top of another.
overlay_video
Parameters:
Resizes a video to specified dimensions.
scale_video
Parameters:
Extracts images from a video file.
extract_frames_from_video
Parameters:
Currently, FFmpeg-MCP only supports macOS platforms, including both ARM64 and x86_64 architectures.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.