Video editing MCP server for AI agents. 83 tools, 3 interfaces, rich CLI. Local, fast, free.
Project description
mcp-video
Video editing and creation for AI agents.
Edit existing video with FFmpeg. Create new video from code with Remotion.
Install • Quick Start • Tools • Full Reference • Agent Discovery • Contributing • Changelog
What is mcp-video?
An open-source video editing server built on the Model Context Protocol (MCP). It gives AI agents, developers, and video creators the ability to programmatically edit and create video files.
Two modes:
- Edit existing video with FFmpeg — trim, merge, overlay text, add audio, apply filters, stabilize, detect scenes, transcribe, and more.
- Create new video from code with Remotion — scaffold React-based video compositions, preview live, render to MP4, then post-process.
Three interfaces:
| Interface | Best For | Example |
|---|---|---|
| MCP Server | AI agents (Claude Code, Cursor) | "Trim this video and add a title" |
| Python Client | Scripts, automation, pipelines | editor.trim("v.mp4", start="0:30", duration="15") |
| CLI | Shell scripts, quick ops, humans | mcp-video trim video.mp4 -s 0:30 -d 15 |
Installation
Prerequisites: FFmpeg must be installed. For Remotion features, you also need Node.js 18+.
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
Install:
pip install mcp-video
# or run without installing:
uvx mcp-video
Verify your setup:
mcp-video doctor
mcp-video doctor --json
Quick Start
As an MCP Server (for AI agents)
Claude Code:
claude mcp add mcp-video -- uvx mcp-video
Claude Desktop:
{
"mcpServers": {
"mcp-video": {
"command": "uvx",
"args": ["mcp-video"]
}
}
}
Cursor:
{
"mcpServers": {
"mcp-video": {
"command": "uvx",
"args": ["mcp-video"]
}
}
}
Then just ask your agent: "Trim this video from 0:30 to 1:00, add a title card, and resize for TikTok."
As a Python Library
from mcp_video import Client
editor = Client()
info = editor.info("interview.mp4")
clip = editor.trim("interview.mp4", start="00:02:15", duration="00:00:30")
video = editor.merge(clips=["intro.mp4", clip.output_path, "outro.mp4"])
video = editor.add_text(video.output_path, text="EPISODE 42", position="top-center", size=48)
result = editor.resize(video.output_path, aspect_ratio="9:16")
As a CLI Tool
mcp-video info video.mp4
mcp-video trim video.mp4 -s 00:02:15 -d 30
mcp-video convert video.mp4 -f webm -q high
mcp-video template tiktok video.mp4 --caption "Check this out!"
MCP Tools
81 unique MCP tools across 12 categories, plus a search_tools meta-tool for fast discovery. All return structured JSON. See the full tool reference for complete details.
| Category | Count | Highlights |
|---|---|---|
| Core Video | 40 | trim, merge, text, audio, resize, convert, filters, stabilize, chroma key, subtitles, watermark, batch |
| AI-Powered | 8 | transcribe (Whisper), scene detect, stem separation (Demucs), upscale, color grade |
| Remotion | 8 | create project, scaffold, render, studio preview, pipeline |
| Audio Synthesis | 6 | generate waveforms, presets, sequences, effects — pure NumPy |
| Visual Effects | 5 | vignette, chromatic aberration, scanlines, noise, glow |
| Transitions | 3 | glitch, pixelate, morph |
| Layout & Motion | 7 | grid, pip, animated text, counters, progress bars, auto-chapters |
| Quality | 3 | brightness/contrast/audio checks, design analysis, auto-fix |
| Image Analysis | 3 | color extraction, palette generation, product analysis |
Remotion Integration
Create videos programmatically with Remotion — a React framework for video.
1. Create project -> remotion_create_project
2. Scaffold -> remotion_scaffold_template
3. Preview live -> remotion_studio
4. Render -> remotion_render
5. Post-process -> remotion_to_mcpvideo
See Remotion docs and the Python client reference.
Python Client
from mcp_video import Client
editor = Client()
See the full Python client reference for all methods and return types.
CLI Reference
mcp-video [command] [options]
See the full CLI reference for all commands and options.
Timeline DSL
For complex multi-track edits, describe everything in a single JSON object:
editor.edit({
"width": 1080,
"height": 1920,
"tracks": [
{
"type": "video",
"clips": [
{"source": "intro.mp4", "start": 0, "duration": 5},
{"source": "main.mp4", "start": 5, "trim_start": 10, "duration": 30},
{"source": "outro.mp4", "start": 35, "duration": 10},
],
"transitions": [
{"after_clip": 0, "type": "fade", "duration": 1.0},
],
},
{
"type": "audio",
"clips": [
{"source": "music.mp3", "start": 0, "volume": 0.7, "fade_in": 2},
],
},
],
"export": {"format": "mp4", "quality": "high"},
})
Templates
Pre-built templates for common social media formats:
from mcp_video.templates import tiktok_template, youtube_shorts_template
timeline = tiktok_template(video_path="clip.mp4", caption="Check this out!", music_path="bgm.mp3")
result = editor.edit(timeline)
Supports: TikTok, YouTube Shorts, Instagram Reels/Posts, YouTube Videos.
Error Handling
Structured, actionable errors with auto-fix suggestions:
{
"success": false,
"error": {
"type": "encoding_error",
"code": "unsupported_codec",
"message": "Codec error: vp9 — Auto-convert input from vp9 to H.264/AAC before editing",
"suggested_action": {
"auto_fix": true,
"description": "Auto-convert input from vp9 to H.264/AAC before editing"
}
}
}
Architecture
mcp_video/
client.py # Python Client API
server.py # MCP server (81 tools + 4 resources)
engine.py # Core FFmpeg engine
models.py # Pydantic models
errors.py # Error hierarchy + FFmpeg stderr parser
ffmpeg_helpers.py # Shared FFmpeg utilities
audio_engine.py # Procedural audio synthesis
effects_engine.py # Visual effects + motion graphics
transitions_engine.py # Clip transitions
ai_engine.py # AI features (Whisper, Demucs, Real-ESRGAN)
remotion_engine.py # Remotion CLI wrapper
image_engine.py # Image color analysis
quality_guardrails.py # Automated quality checks
Supported Formats
| Video | Audio (extraction) | Subtitles |
|---|---|---|
| MP4, WebM, MOV, GIF | MP3, AAC, WAV, OGG, FLAC | SRT, WebVTT |
Agent Discovery
llms.txt— compact project map for agentsdocs/AI_AGENT_DISCOVERY.md— richer positioning and integration snippets
Development
git clone https://github.com/pastorsimon1798/mcp-video.git
cd mcp-video
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Community & Support
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md (private reporting path)
- Help: SUPPORT.md or GitHub Discussions
- Code of Conduct: CODE_OF_CONDUCT.md
- Changelog: CHANGELOG.md
- Roadmap: ROADMAP.md
- Governance: GOVERNANCE.md
- Maintainers: MAINTAINERS.md
Testing
Tests are excluded from the PyPI package. To run locally:
pip install -e ".[dev]"
pytest tests/ -v -m "not slow and not remotion"
See docs/TESTING.md for full test categories and CI details.
License
Apache 2.0 — see LICENSE.
Built on FFmpeg, Remotion, and the Model Context Protocol.
See docs/LEGAL_REVIEW.md for dependency licensing notes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_video-1.2.3.tar.gz.
File metadata
- Download URL: mcp_video-1.2.3.tar.gz
- Upload date:
- Size: 476.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc78b9ba820558ef8fc1ebde5c7aba2e50223946d67974b39c97f6a67e0be4d
|
|
| MD5 |
2c6c13a9b83e9a802efcd431995f669b
|
|
| BLAKE2b-256 |
36819aa37191f55081169e7f5b625361b50a96a7b4b4c9d9d8279067676f085f
|
Provenance
The following attestation bundles were made for mcp_video-1.2.3.tar.gz:
Publisher:
publish.yml on Pastorsimon1798/mcp-video
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_video-1.2.3.tar.gz -
Subject digest:
7bc78b9ba820558ef8fc1ebde5c7aba2e50223946d67974b39c97f6a67e0be4d - Sigstore transparency entry: 1359221149
- Sigstore integration time:
-
Permalink:
Pastorsimon1798/mcp-video@3ffbe9ff2cd1628e5150b1a227dbc86f4ae2fac2 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/Pastorsimon1798
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ffbe9ff2cd1628e5150b1a227dbc86f4ae2fac2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_video-1.2.3-py3-none-any.whl.
File metadata
- Download URL: mcp_video-1.2.3-py3-none-any.whl
- Upload date:
- Size: 234.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
117d9331e2b01f3ab4f901f27201665a71bf0e46600ef926ae86ff26b56378a3
|
|
| MD5 |
2cd0cdea83e63cfb32fd44f80a1923d4
|
|
| BLAKE2b-256 |
efff84fe08b86df626f496e0f1f3c1e9ddbb8d43748eeb587550621f4377ba1e
|
Provenance
The following attestation bundles were made for mcp_video-1.2.3-py3-none-any.whl:
Publisher:
publish.yml on Pastorsimon1798/mcp-video
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_video-1.2.3-py3-none-any.whl -
Subject digest:
117d9331e2b01f3ab4f901f27201665a71bf0e46600ef926ae86ff26b56378a3 - Sigstore transparency entry: 1359221154
- Sigstore integration time:
-
Permalink:
Pastorsimon1798/mcp-video@3ffbe9ff2cd1628e5150b1a227dbc86f4ae2fac2 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/Pastorsimon1798
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ffbe9ff2cd1628e5150b1a227dbc86f4ae2fac2 -
Trigger Event:
release
-
Statement type: