MCP FFmpeg Helper is a lightweight server that exposes FFmpeg's powerful video processing capabilities to AI assistants through the Model Context Protocol (MCP). It enables operations like retrieving video details, converting formats, extracting audio, creating videos from image sequences, trimming videos, adding watermarks, and more.
You can download FFmpeg from the FFmpeg official download page.
To verify your FFmpeg installation, run:
ffmpeg -version
This method doesn't require cloning the repository or manually building the server:
For Windows:
{
"mcp-ffmpeg-helper": {
"command": "cmd",
"args": [
"/c",
"npx",
"@sworddut/mcp-ffmpeg-helper"
]
}
}
For macOS:
{
"mcp-ffmpeg-helper": {
"command": "npx",
"args": [
"@sworddut/mcp-ffmpeg-helper"
]
}
}
npm install
npm run build
For Windows:
{
"mcp-ffmpeg-helper": {
"command": "cmd",
"args": [
"/c",
"node",
"path/to/mcp-ffmpeg-helper/build/index.js"
]
}
}
For macOS:
{
"mcp-ffmpeg-helper": {
"command": "node",
"args": [
"path/to/mcp-ffmpeg-helper/build/index.js"
]
}
}
Note: For Windows users, the configuration file is typically located at: %APPDATA%/.codeium/windsurf/mcp_config.json
In Windsurf console, enter:
Please help me check the video information for "path/to/video.mp4"
In Windsurf console, enter:
Please help me convert "path/to/input.avi" to "path/to/output.mp4"
In Windsurf console, enter:
Please help me extract audio from "path/to/video.mp4" to "path/to/audio.mp3"
In Windsurf console, enter:
Please help me create a video at "path/to/output.mp4" from images at "path/to/images/%05d.jpg"
In Windsurf console, enter:
Please help me trim "path/to/input.mp4" to "path/to/output.mp4", starting at 00:00:00 and ending at 00:01:00
In Windsurf console, enter:
Please help me add a watermark to "path/to/input.mp4" saving to "path/to/output.mp4", using "path/to/watermark.png" as the watermark, positioned at [bottom-right/top-left/center], with opacity [value between 0-1]
In Windsurf console, enter:
Please help me trim "path/to/input.mp3" to "path/to/output.mp3", starting at 00:00:10 and continuing for 30 seconds
In Windsurf console, enter:
Please help me extract frames from "path/to/video.mp4" to "path/to/frames" folder, using PNG format for highest quality
Retrieves detailed information about a video file, including format, codecs, resolution, and frame rate.
Parameters:
Example:
get_video_info({
filePath: "path/to/video.mp4"
})
Converts a video to a different format or applies specific encoding options.
Parameters:
Example:
convert_video({
inputPath: "path/to/input.avi",
outputPath: "path/to/output.mp4",
options: "-c:v libx264 -crf 23 -preset medium"
})
Extracts audio track from a video file.
Parameters:
Example:
extract_audio({
inputPath: "path/to/video.mp4",
outputPath: "path/to/audio.mp3",
format: "mp3"
})
Creates a video file from a sequence of images.
Parameters:
Cuts a video to a specified time segment.
Parameters:
Adds an image watermark to a video.
Parameters:
Cuts an audio file to a specified time segment.
Parameters:
Extracts frames from a video and saves them as an image sequence.
Parameters:
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.