home / mcp / ffmpeg mcp server
一个基于 Model Context Protocol (MCP) 的 FFmpeg 辅助工具,提供视频处理功能。
Configuration
View docs{
"mcpServers": {
"sworddut-mcp-ffmpeg-helper": {
"command": "node",
"args": [
"path/to/mcp-ffmpeg-helper/build/index.js"
]
}
}
}The MCP FFmpeg Helper is a lightweight server that exposes FFmpeg’s powerful video processing capabilities through the MCP protocol. You can use it to inspect, convert, extract, and compose video and audio workflows directly from your MCP-enabled assistant.
You interact with the server through your MCP client. Define the actions you want to perform (for example, getting video details, converting formats, extracting audio, or creating a video from images) and send them to the MCP FFmpeg Helper. The server will run FFmpeg commands under the hood and return the results. You can chain multiple operations in a workflow to automate common media processing tasks without leaving your MCP environment.
Typical workflows you can implement include: getting video metadata, converting video formats, extracting audio tracks, building videos from image sequences, trimming both video and audio, adding watermarks, and exporting frames from videos.
Prerequisites you need on your system to run the MCP FFmpeg Helper:
Step 1: Prepare your environment by installing Node.js and FFmpeg.
Step 2: Install dependencies and build (choose one installation path):
npm install
npm run buildStep 3: Configure MCP in your client for local or package-based usage.
Option A: Local Node server (manual build path) on Windows or macOS.
Windows
{
"mcp-ffmpeg-helper": {
"command": "cmd",
"args": [
"/c",
"node",
"path/to/mcp-ffmpeg-helper/build/index.js"
]
}
}Option B: Use the npm package directly with npx (recommended; no local build required).
Windows
{
"mcp-ffmpeg-helper": {
"command": "cmd",
"args": [
"/c",
"npx",
"@sworddut/mcp-ffmpeg-helper"
]
}
}macOS:
Configure to run the local node server or use npx as shown for Windows (adjust path/commands as appropriate for your environment).macOS
{
"mcp-ffmpeg-helper": {
"command": "node",
"args": [
"path/to/mcp-ffmpeg-helper/build/index.js"
]
}
}Option B for macOS: run via npm package with npx (no build step required).
macOS
{
"mcp-ffmpeg-helper": {
"command": "npx",
"args": [
"@sworddut/mcp-ffmpeg-helper"
]
}
}If you need to pass extra FFmpeg options, you can provide them via the options field in the MCP call or by extending your MCP configuration to include additional command-line arguments.
Run the MCP FFmpeg Helper with the minimum required permissions and restrict access to trusted MCP clients. Keep FFmpeg up to date and monitor resource usage when processing large media files.
Retrieve detailed information about a video file, including format, codecs, resolution, and frame rate.
Convert a video to a different format or apply encoding options.
Extract the audio track from a video file into a separate audio file.
Create a video from an image sequence with options for framerate, codec, and pixel format.
Trim a video to a specified start time and duration.
Add an image watermark to a video at a chosen position with adjustable opacity.
Trim an audio file to a specified start time and duration.
Extract frames from a video and save them as an image sequence.