M
MCP Video Editor
by @chandler767
MCP server for video editing with FFmpeg and OpenAI Whisper
Created 2/12/2026
Updated about 21 hours ago
README
Repository documentation and setup instructions
MCP Video Editor (Go)
A high-performance Model Context Protocol (MCP) server for professional video editing operations using FFmpeg. Implemented in Go for speed, reliability, and easy deployment.
🚀 Quick Start
Installation
# Clone the repository
git clone https://github.com/chandler767/mcp-video-editor.git
cd mcp-video-editor
# Build the binary
go build -o bin/mcp-video-editor ./cmd/mcp-video-editor
# Run the server
./bin/mcp-video-editor
Requirements
- Go 1.23+ (for building from source)
- FFmpeg installed on your system
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt-get install ffmpeg - Windows: Download from ffmpeg.org
- macOS:
📦 Features
Core Video Operations (10 tools)
- get_video_info - Extract metadata (duration, resolution, codec, fps, bitrate)
- trim_video - Cut video segments by start/end time
- concatenate_videos - Join multiple videos together
- extract_audio - Save audio track from video
- convert_video - Convert between formats with custom quality settings
- resize_video - Change video resolution/dimensions
- extract_frames - Get screenshots at specific timestamps or intervals
- adjust_speed - Speed up or slow down playback
- transcode_for_web - Optimize videos for web sharing
- get_config / set_config / reset_config - Configuration management
Visual Effects (7 tools)
- apply_blur_effect - Gaussian, box, motion, radial blur
- apply_color_grade - Brightness, contrast, saturation, temperature, tint
- apply_chroma_key - Green screen removal
- apply_ken_burns - Zoom/pan effect on still images
- apply_vignette - Edge darkening effect
- apply_sharpen - Sharpen video with adjustable strength
Compositing (3 tools)
- create_picture_in_picture - Overlay smaller video with customizable position
- create_split_screen - Multiple layouts (horizontal, vertical, 2x2, 3x3 grid)
Transitions (2 tools)
- add_transition - 25+ transition types (fade, wipe, slide, dissolve, etc.)
- crossfade_videos - Smooth video and audio crossfade
Text & Overlays (5 tools)
- add_text_overlay - Static text overlays with positioning
- add_animated_text - Animated text with effects
- burn_subtitles - Embed subtitles from SRT files
- add_image_overlay - Image overlays with positioning and opacity
- add_shape - Draw shapes (rectangles, circles, lines)
Audio Operations (5 tools)
- extract_audio - Extract audio to separate file
- adjust_volume - Change audio volume
- normalize_audio - Normalize audio levels
- fade_audio - Fade in/out
- remove_audio - Remove audio track
Timeline System (8 tools)
- create_timeline - Create new timeline for multi-operation editing
- add_to_timeline - Queue operations on timeline
- undo_operation - Undo last operation
- redo_operation - Redo undone operation
- view_timeline - View timeline state and history
- jump_to_timeline_point - Jump to specific point in timeline
- list_timelines - List all timelines
- get_timeline_stats - Get timeline statistics
Multi-Take Editing (8 tools)
- create_multi_take_project - Create project for managing multiple takes
- add_takes_to_project - Add video takes to project
- analyze_takes - Analyze quality of all takes
- get_project_analysis - Get detailed analysis results
- select_best_takes - Automatically select best takes
- assemble_best_takes - Assemble final video from best takes
- export_final_video - Export final assembled video
- list_multi_take_projects - List all projects
AI Vision Analysis (5 tools) - Requires OpenAI API Key
- analyze_video_content - Get frame-by-frame descriptions and summary
- search_visual_content - Find specific objects, people, scenes, or text
- describe_scene - Get detailed description at specific timestamp
- find_objects_in_video - Track when specific objects appear
- compare_video_frames - Detect changes between two moments
Diagram Generation (4 tools)
- generate_flowchart - Create flowchart diagrams from data
- generate_timeline - Create timeline diagrams
- generate_org_chart - Create organization charts
- generate_mind_map - Create mind map diagrams
Total: 60 MCP Tools
🛡️ Safety Features
- Source file protection - Original files are never modified
- Overwrite detection - Prevents accidentally using same input/output path
- Quality matching - Outputs automatically match input quality
- Type-safe operations - Go's type system prevents common errors
📊 Testing
Run the comprehensive test suite:
# Run all tests
go test ./...
# Run with verbose output
go test -v ./...
# Run specific package tests
go test -v ./pkg/video
go test -v ./pkg/visual
go test -v ./pkg/server
Test Coverage:
- ✅ 19 comprehensive tests
- ✅ 100% pass rate
- ✅ Tests cover video operations, visual effects, and MCP handlers
🔧 Configuration
Configuration file: ~/.mcp-video-config.json
{
"ffmpegPath": "/usr/local/bin/ffmpeg",
"ffprobePath": "/usr/local/bin/ffprobe",
"openaiApiKey": "sk-...",
"defaultQuality": "medium",
"tempDir": "/tmp/mcp-video"
}
Environment Variables:
OPENAI_API_KEY- For vision analysis and transcription featuresFFMPEG_PATH- Custom FFmpeg binary pathFFPROBE_PATH- Custom FFprobe binary path
📖 Documentation
- README-GO.md - Detailed Go implementation guide
- GO-TEST-REPORT.md - Comprehensive test results
- GO-PORT-SUMMARY.md - Port completion details
- TRANSCRIPT_FEATURES.md - Transcript editing guide
- VISION.md - Vision analysis guide
🏗️ Architecture
mcp-video-editor/
├── cmd/
│ └── mcp-video-editor/ # Main application
├── pkg/
│ ├── config/ # Configuration management
│ ├── ffmpeg/ # FFmpeg wrapper
│ ├── video/ # Video operations
│ ├── visual/ # Visual effects, compositing, transitions
│ ├── text/ # Text overlays
│ ├── timeline/ # Timeline management
│ ├── transcript/ # Transcription
│ ├── vision/ # GPT-4 Vision analysis
│ ├── multitake/ # Multi-take editing
│ ├── diagrams/ # Diagram generation
│ ├── elements/ # Visual elements
│ └── server/ # MCP server
├── go.mod # Go module definition
└── bin/
└── mcp-video-editor # Compiled binary (9.3 MB)
🚀 Performance
- Binary Size: 9.3 MB (self-contained, no dependencies)
- Memory Efficient: Minimal memory footprint
- Fast Startup: < 1 second initialization
- Concurrent Processing: Handles multiple operations efficiently
📝 Example Usage
Via MCP Client (Claude)
User: "Trim my video.mp4 from 10 to 30 seconds"
Claude: [Uses trim_video tool]
User: "Add a blur effect to output.mp4"
Claude: [Uses apply_blur_effect tool]
User: "Create a split screen with video1.mp4 and video2.mp4"
Claude: [Uses create_split_screen tool]
Direct API Usage
package main
import (
"context"
"github.com/chandler-mayo/mcp-video-editor/pkg/video"
"github.com/chandler-mayo/mcp-video-editor/pkg/ffmpeg"
)
func main() {
ffmpegMgr, _ := ffmpeg.NewManager("ffmpeg", "ffprobe")
videoOps := video.NewOperations(ffmpegMgr)
// Trim video
videoOps.Trim(context.Background(), video.TrimOptions{
Input: "input.mp4",
Output: "output.mp4",
StartTime: 10.0,
EndTime: &[]float64{30.0}[0],
})
}
🤝 Contributing
Contributions welcome! Please ensure all tests pass before submitting PRs:
go test ./...
go build -o bin/mcp-video-editor ./cmd/mcp-video-editor
📄 License
MIT License - See LICENSE file for details
🙏 Acknowledgments
- Built with mark3labs/mcp-go
- Powered by FFmpeg
- OpenAI integration via go-openai
Status: ✅ Production Ready | Version: 1.0.0 | Tests: 19/19 Passing
Quick Setup
Installation guide for this server
Install Package (if required)
npx @modelcontextprotocol/server-mcp-video-editor
Cursor configuration (mcp.json)
{
"mcpServers": {
"chandler767-mcp-video-editor": {
"command": "npx",
"args": [
"chandler767-mcp-video-editor"
]
}
}
}