Skip to main content
Glama

mlt-video-mcp

An MCP server for timeline video editing, built on the MLT framework (the engine inside Shotcut and Kdenlive). Projects are plain JSON files. The server compiles them to MLT XML and renders with melt, or with a built-in ffmpeg fallback for the basic subset.

43 tools: projects and social presets (9:16, 1:1, 4:5, 16:9, 4K), media import and probing, video/audio tracks, clips (add, trim, split, move, duplicate, speed, ripple delete), 15 effects, transitions, text overlays, SRT/VTT subtitles, markers, MLT introspection, and rendering.

Install and run

pip install -e .
mlt-video-mcp          # stdio MCP server (or: python -m mltmcp)

MCP client config:

{ "mcpServers": { "video": { "command": "mlt-video-mcp" } } }

Requirements: Python 3.10+, ffmpeg/ffprobe on PATH. For full features install melt (apt install melt, brew install mlt).

Related MCP server: YoloCut

What runs where

Feature

ffmpeg fallback (tested locally)

melt (CI-tested)

Cut, trim, split, speed 0.1-16x, multi-track overlay, still images

yes

yes

Text overlays, SRT/VTT subtitles burned in

yes

yes

Dissolve transition

yes

yes

wipe_* and fade_black transitions

no (clear error)

yes

Effects: brightness, contrast, saturation, gamma, grayscale, blur, sharpen, vignette, flip, rotate, crop, chroma_key, fade_in, fade_out, volume

yes

yes

raw effect: any MLT filter with its own properties

no

yes

Audio: multi-track mix, volume, fades, music track

yes

yes

Render presets: social-h264, high-quality, small, webm-vp9

yes

yes

list_mlt_services, mlt_service_params (full introspection)

curated subset only

yes

render_project(renderer="auto") uses melt when installed, otherwise the fallback. A project using melt-only features fails on the fallback with a message naming each gap (fallback_report lists them in advance).

Honest limits

  • "All options" means everything MLT exposes: the raw effect and mlt_service_params reach any MLT filter, but only the 15 named effects have friendly parameters and fallback support.

  • The melt render path is verified by CI (.github/workflows/ci.yml installs melt and renders a 9:16 project with two clips, a dissolve, music, text and subtitles, then checks the output duration). Not yet checked by eye or by test: wipe/fade_black transitions and how individual effects look under melt. Those are the likeliest places to need adjustment.

  • No auto-captioning (speech to text), stickers, or one-tap templates. Bring an SRT.

  • Keyframed effect parameters are only available through raw.

Tools

Project: create_project, project_info, list_presets, set_profile, validate_project, export_mlt_xml. Media: import_media, probe_media, remove_media, extract_frame, waveform_image. Tracks: add_track, remove_track, set_track (name, mute, hide, lock). Clips: add_clip, remove_clip, move_clip, trim_clip, split_clip, duplicate_clip, set_clip_speed. Effects: list_effects, add_effect, update_effect, remove_effect, clear_effects. Transitions: list_transition_types, add_transition, remove_transition. Text and subtitles: add_text, update_text, remove_text, import_subtitles, add_subtitle, clear_subtitles, export_subtitles. Markers: add_marker, remove_marker. Render and introspection: check_renderers, fallback_report, render_project, list_mlt_services, mlt_service_params.

Every tool takes the project file path first, so state lives on disk and the server is stateless.

Example

create_project("/tmp/reel.json", "9:16")
import_media("/tmp/reel.json", "/clips/a.mp4")        -> m1
add_track("/tmp/reel.json", "video")                  -> V1
add_clip("/tmp/reel.json", "V1", "m1", out_point=3)   -> c1
add_text("/tmp/reel.json", "Hello", 0.5, 3)
render_project("/tmp/reel.json", "/tmp/reel.mp4")

Tests

pip install -e .[test] && pytest

Covers edit logic, MLT XML structure, an end-to-end fallback render of a 9:16 project (dissolve, text, subtitles, music, effects) checked with ffprobe and frame sampling, an MCP stdio handshake, and a melt render test that runs when melt is installed.

MIT licensed, copyright Yousef Ghaben.

Available Tools

43 tools
add_clipB

Place media on a track. start defaults to the end of the track. Times in seconds of source media. Still images need out_point (their length). speed 0.1..16.

Inputs: path (required), media_id (required), track_id (required), speed, +3 more.

add_effectB

Attach an effect to a clip (see list_effects). Effects apply in the order added.

Inputs: path (required), effect (required), clip_id (required), params.

add_markerC

Add a timeline marker (metadata, not rendered).

Inputs: path (required), time (required), label.

add_subtitleD

Add one subtitle cue.

Inputs: end (required), path (required), text (required), start (required).

add_textC

Add a text overlay (title, caption, lower third). align: left|center|right, valign: top|middle|bottom. x,y are margins in pixels. bg is an optional box colour like #000000.

Inputs: end (required), path (required), text (required), start (required), +9 more.

add_trackC

Add a track. kind: video (later video tracks composite above earlier ones) or audio.

Inputs: path (required), kind, name.

add_transitionA

Join two adjacent clips on the same track with an overlap transition. to_clip moves earlier by duration, and later clips on the track shift with it (total length shrinks).

Inputs: path (required), to_clip (required), from_clip (required), type, +1 more.

check_renderersC

Which renderers are available here, and the capability difference.

Inputs: no named parameters.

clear_effectsC

Remove all effects from a clip.

Inputs: path (required), clip_id (required).

clear_subtitlesC

Remove all subtitle cues.

Inputs: path (required).

create_projectC

Create a new project file. preset: 9:16, 1:1, 4:5, 16:9, 16:9-720p, 4k (social-ready sizes at 30 fps).

Inputs: path (required), name, preset.

duplicate_clipC

Copy a clip (default: right after the original).

Inputs: path (required), clip_id (required), start.

export_mlt_xmlB

Write the project as MLT XML (opens in melt; Shotcut/Kdenlive can import MLT XML).

Inputs: path (required), out_path (required).

export_subtitlesC

Write the project's subtitle cues as an SRT file.

Inputs: path (required), out_path (required).

extract_frameC

Save one frame of a media file as an image (thumbnail/poster).

Inputs: path (required), time (required), media_id (required), out_path (required).

fallback_reportC

List anything in this project that only melt can render.

Inputs: path (required).

import_mediaC

Probe a video/audio/image file and register it. Returns the media id.

Inputs: file (required), path (required).

import_subtitlesC

Load an SRT or VTT file as burned-in subtitles. offset shifts all cues (seconds).

Inputs: path (required), subtitle_file (required), offset, replace.

list_effectsB

The effect vocabulary: parameters, defaults, and whether the ffmpeg fallback can render each.

Inputs: no named parameters.

list_mlt_servicesB

List MLT services (filters, transitions, producers, consumers). Uses melt when installed, else a curated subset.

Inputs: kind.

list_presetsC

Canvas presets and render presets available.

Inputs: no named parameters.

list_transition_typesB

Transition types and whether the ffmpeg fallback supports them.

Inputs: no named parameters.

mlt_service_paramsC

Full parameter documentation for one MLT service (needs melt installed).

Inputs: kind (required), name (required).

move_clipC

Move a clip to a new start time, optionally onto another track of the same kind.

Inputs: path (required), start (required), clip_id (required), track_id.

probe_mediaB

ffprobe a file without importing it.

Inputs: file (required).

project_infoC

Full summary: profile, media, tracks, clips, transitions, texts, subtitles, markers, duration.

Inputs: path (required).

remove_clipC

Delete a clip. ripple=True closes the gap by shifting later clips on that track.

Inputs: path (required), clip_id (required), ripple.

remove_effectB

Remove one effect by index (see project_info).

Inputs: path (required), clip_id (required), effect_index (required).

remove_markerD

Remove a marker.

Inputs: path (required), marker_id (required).

remove_mediaA

Remove unused media. Refuses if any clip still uses it.

Inputs: path (required), media_id (required).

remove_textC

Delete a text overlay.

Inputs: path (required), text_id (required).

remove_trackB

Remove a track and its clips (and transitions on them).

Inputs: path (required), track_id (required).

remove_transitionB

Remove a transition and restore the gap-free cut (later clips shift back).

Inputs: path (required), transition_id (required).

render_projectB

Render to a file. renderer: auto (melt if installed, else ffmpeg fallback), melt, or ffmpeg. preset: social-h264, high-quality, small, webm-vp9, gif-like-mp4 (no audio).

Inputs: path (required), out_path (required), preset, renderer.

set_clip_speedB

Change playback speed (0.1..16). The clip's timeline length changes; later clips are not moved.

Inputs: path (required), speed (required), clip_id (required).

set_profileC

Change canvas size/fps, by preset or explicit values (even numbers recommended).

Inputs: path (required), fps, width, height, +1 more.

set_trackC

Rename a track or set mute/hide/lock.

Inputs: path (required), track_id (required), hide, lock, +2 more.

split_clipC

Split a clip at timeline time at (seconds). Effects are copied to both halves.

Inputs: at (required), path (required), clip_id (required).

trim_clipB

Change the source in/out points (seconds of source media). Start time is kept.

Inputs: path (required), clip_id (required), in_point, out_point.

update_effectC

Change parameters of an effect already on a clip.

Inputs: path (required), params (required), clip_id (required), effect_index (required).

update_textC

Edit fields of a text overlay (text, start, end, x, y, size, color, bg, font, align, valign, bold).

Inputs: path (required), changes (required), text_id (required).

validate_projectC

Check overlaps, transition consistency, missing media files, and what the ffmpeg fallback cannot render.

Inputs: path (required).

waveform_imageC

Render the audio waveform of a media file to a PNG.

Inputs: path (required), media_id (required), out_path (required), width, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 43 tools

    Disambiguation4/5

    Each tool maps to a distinct resource+action (tracks, clips, effects, transitions, texts, subtitles, markers, render), so misselection is unlikely in the core workflow. The only real overlap is in diagnostics: check_renderers, fallback_report, and validate_project all report on ffmpeg-fallback capability, and list_effects/list_mlt_services/mlt_service_params partly overlap in describing the effect/service vocabulary.

    Naming Consistency4/5

    Almost everything follows a snake_case verb_noun pattern (add_clip, remove_track, set_clip_speed, render_project), which is predictable and readable. The minor deviations are noun-only names for summary/inspection tools (project_info, fallback_report) and the varied verbs set_/update_ used for similar edits (set_track vs update_text).

    Tool Count3/5

    43 tools is heavy and sits well above the comfortable 3-15 range, but the domain (a full non-linear editor with media, tracks, clips, effects, transitions, text, subtitles, markers, and rendering) genuinely justifies granular primitives. There is still consolidation headroom — e.g. clear_effects vs remove_effect, clear_subtitles vs remove, and three separate capability/diagnostic reporting tools.

    Completeness4/5

    Coverage is unusually thorough: CRUD for projects, media, tracks, clips, effects, transitions, and texts, plus subtitles, markers, inspection, validation, and export/render paths. Remaining gaps are minor but real — there is no tool to open/load an existing project file, no per-cue subtitle update/remove, and no way to delete a project.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents and MCP clients to programmatically edit video projects on a local desktop editor, with 119 tools for multitrack editing, effects, captions, audio, and batch auto-editing, producing reviewable and reversible real timeline edits.
      AGPL 3.0
    • A
      license
      B
      quality
      C
      maintenance
      Enables agents to build and render video edits programmatically through MLT/melt, with tools for creating projects, adding, trimming, splitting, moving and removing clips, applying filters, adding text titles and crossfades, reading back the timeline, and rendering — saving edits as native Shotcut .mlt projects that can still be opened and hand-edited.
      14
      59 PyPI
      2
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables headless video editing on Linux by maintaining a JSON edit decision list, compiling it into Kdenlive/MLT projects, returning preview frames as images, and rendering final H.264/AAC video through melt.
      20
      GPL 2.0