FFmpeg MCP Server
Enables video processing tasks such as resizing, audio extraction, and metadata inspection using FFmpeg, with base64 input/output for stateless and portable operation.
README
FFmpeg MCP Server
MCP server providing FFmpeg video processing via base64 I/O. Stateless, portable, zero external dependencies.
Tools
get_ffmpeg_version
Returns FFmpeg version information.
resize_video
Resize video to standard resolutions (360p, 480p, 720p, 1080p). Outputs H.264/AAC.
Parameters:
videoBase64(string): Base64 encoded videoresolutions(array): Target resolutionsoutputFormat(string, optional): mp4 or webm (default: mp4)
Returns: Base64 encoded video for each resolution
extract_audio
Extract audio track from video.
Parameters:
videoBase64(string): Base64 encoded videoformat(string): mp3, aac, wav, or ogg
Returns: Base64 encoded audio
get_video_info
Inspect video metadata: format, duration, bitrate, resolution, codecs, streams.
Parameters:
videoBase64(string): Base64 encoded video
Returns: Formatted metadata
Design
Base64 I/O: All inputs and outputs are base64 encoded. No file paths, S3 URLs, or database storage.
Why:
- Stateless: No persistent storage, cleanup, or orphaned files
- Portable: Works in any Node.js environment
- Simple: Single request/response cycle
Constraints:
- Payload limits: ~4-6 MB depending on runtime
- Best for: Thumbnails, previews, short clips, audio extraction
- Not for: Feature films, 4K processing
Processing flow:
- Decode base64 input → temp file
- Execute FFmpeg
- Read output → buffer
- Delete temp files
- Encode buffer → base64
Installation
FFmpeg binaries install automatically via ffmpeg-static and @ffprobe-installer/ffprobe.
npm install @windsornguyen/ffmpeg-mcp
Configuration
Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"ffmpeg": {
"command": "npx",
"args": ["-y", "@windsornguyen/ffmpeg-mcp"]
}
}
}
VS Code
.vscode/mcp.json:
{
"servers": {
"ffmpeg": {
"command": "npx",
"args": ["-y", "@windsornguyen/ffmpeg-mcp"]
}
}
}
Development
# Install dependencies
bun install
# Build
bun run build
# Test
bun test
# Run STDIO transport
bun run dev:stdio
# Run HTTP transport
bun run dev:shttp
Environment Variables
PORT: HTTP server port (default: 3002)NODE_ENV: development | production
Testing
# Run all tests
bun test
# Run with output artifacts (kept in tests/output/)
bun test --keep-artifacts
# Single test file
bun test tests/ffmpeg.test.ts
Tests verify base64 round-trip encoding, resolution accuracy, and codec compliance. Output artifacts saved to tests/output/ when --keep-artifacts is set.
Architecture
- Client (
src/client.ts): FFmpeg execution with base64 I/O - Tools (
src/tools/ffmpeg.ts): MCP tool definitions - Server (
src/server.ts): Request routing - Transport (
src/transport/): STDIO and HTTP support
License
MIT License. See LICENSE file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.