mcpField
F
FFmpeg MCP Server

FFmpeg MCP Server

Local
github.com/Ashutos1997Media & Design2Updated 6d ago

About FFmpeg MCP Server

FFmpeg MCP Server lets AI tools process local video and audio with FFmpeg and FFprobe. Its typed tools cover common editing and conversion tasks, and it can return thumbnails and waveforms as images for vision models.

Key features

  1. 01Inspect media metadata with FFprobe
  2. 02Convert, trim, compress, and join media
  3. 03Extract audio and generate thumbnails
  4. 04Reformat video for social aspect ratios
  5. 05Remove silence and adjust playback speed
  6. 06Create split screens and add subtitles

Use cases

  1. 01Prepare landscape clips as vertical social videos
  2. 02Trim pauses from speech recordings
  3. 03Inspect thumbnails or waveforms with vision models

MCP support

The MCP server exposes 13 typed tools that invoke local FFmpeg and FFprobe operations for AI clients, returning image data for thumbnail and waveform inspection.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ashutos1997-ffmpeg": {
"command": "npx",
"args": [
"-y",
"@ash_j1997/ffmpeg-mcp-server"
]
}
}
}
Run commandnpx -y @ash_j1997/ffmpeg-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@ash_j1997/ffmpeg-mcp-server0.5.0

Tools

17

Saved tool list · updated 6d ago

ParameterTypeRequiredDescription
inputPathstringYesPath to the media file to inspect (e.g. './video.mp4')

Details

From the project README

ffmpeg-mcp-server

CI Release License: MIT npm version Glama

A Model Context Protocol (MCP) server that gives AI tools access to FFmpeg and FFprobe to process video and audio locally.

Supports Apple Silicon hardware encoding and returns image previews directly to models with vision.


Why This Exists

When AI agents process media, they often hallucinate invalid flags, syntax errors, or incompatible pixel formats.

This server provides 13 typed tools using Zod schemas. The AI passes parameters (such as { inputPath: "video.mov", preset: "web_mp4" }), and the server runs the valid FFmpeg command locally.


Key Features

  • Hardware Encoding: Uses VideoToolbox on macOS for faster exports with low CPU usage.
  • Image Responses: Returns base64 images so vision models can inspect thumbnails and waveforms.
  • Social Formats: Reformats landscape video to 9:16 vertical video with blurred background padding.
  • Split Screen: Stacks two videos top-and-bottom for Reels and TikTok, with optional subtitles and audio mixing.
  • Silence Removal: Detects and trims pauses from speech recordings.

Included Tools (13 Total)

ToolDescriptionKey Parameters
media_probeInspects media files with ffprobe. Returns metadata, streams, codecs, resolution, and duration as JSON.inputPath
media_convertConverts video and audio formats. Includes presets for web MP4, WebM, and animated GIF.inputPath, outputPath, preset, crf, resolution, fps, hardwareAcceleration
trim_mediaCuts a segment from a video or audio file using stream copy or re-encoding.inputPath, outputPath, startTime, endTime, duration, accurateReencode
extract_audioRips audio tracks from video. Includes a 16kHz mono WAV preset for Whisper speech recognition.inputPath, outputPath, format, bitrate
extract_thumbnailCaptures a still image at a timestamp or midpoint. Returns base64 image data for vision models.inputPath, outputPath, timestamp, resolution, includeBase64
compress_videoCompresses video to fit target sizes (such as GitHub PRs under 10MB or Discord under 25MB).inputPath, outputPath, targetSizeMB, preset, crf, maxWidth, hardwareAcceleration
reformat_aspect_ratioChanges video ratio to 9:16 vertical, 1:1 square, or 4:5 portrait with blurred borders or center crop.inputPath, outputPath, targetRatio, mode, blurAmount, padColor
create_split_screenStacks two videos top-and-bottom (9:16 Reels/TikTok) or side-by-side with audio mixing and subtitles.firstVideoPath, secondVideoPath, outputPath, layout, audioSource, subtitlesPath
trim_silenceDetects and removes silent pauses from recordings. Reports duration and seconds saved.inputPath, outputPath, mode, thresholdDb, minDurationSeconds
concat_mediaJoins multiple video or audio files in order using stream copy or re-encoding.inputPaths, outputPath, mode
generate_waveformGenerates a PNG waveform image. Returns base64 image data for vision models.inputPath, outputPath, width, height, color, scale, includeBase64
add_subtitlesEmbeds SRT or VTT subtitle tracks into video files without re-encoding video.videoPath, subtitlesPath, outputPath, language, title
change_speedAdjusts playback speed (such as 2x fast forward or 0.5x slow motion) with pitch correction.inputPath, outputPath, speed, muteAudio

Requirements

  • Node.js >= 18.0.0
  • FFmpeg & FFprobe installed locally:
    • macOS: brew install ffmpeg
    • Linux (Ubuntu/Debian): sudo apt update && sudo apt install ffmpeg
    • Windows: winget install Gyan.FFmpeg or choco install ffmpeg

Installation

Quick Start (Claude Desktop, Cursor, Antigravity)

Run directly with npx (no manual cloning or building required):

{
  "mcpServers": {
    "ffmpeg": {
      "command": "npx",
      "args": ["-y", "@ash_j1997/ffmpeg-mcp-server"]
    }
  }
}
Configuration File Locations:
  • Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json
  • Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json
  • Antigravity IDE: ~/.gemini/config/mcp_config.json
  • Cursor / Windsurf: Add as a stdio server with command npx and args `["-y", "@ash_j1997/ffmpeg-mcp-server"]

Local Development

  1. Install dependencies:

    npm install
    
  2. Build TypeScript:

    npm run build
    
  3. Run tests:

    node test-tools.js
    

License

MIT © Ashutos1997

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.