Skip to main content
Glama

video-atelier-mcp

An MCP server that gives an agent a video editing room — not just a generator.

Most AI video tooling stops at "make me a clip". This one starts after that: it imports the footage you already have, cuts it, orders the shots, adds captions and an audio bed, replaces the screen of a filmed phone or laptop with content of your choosing, renders, and exports the result in every aspect ratio you need. Generation is one optional step among many, behind a replaceable backend.

It runs as a stdio MCP server in Docker. No API key is needed to cut, caption, composite, render or export.

Licence, and the other repository. This project is source-available, not OSI open source: PolyForm Noncommercial 1.0.0 grants personal, academic, charitable and public-sector use, and commercial use by arrangement. GitHub shows no licence badge because PolyForm sits outside its detection list — the terms are in LICENSE, in full.

If you need a permissively licensed server instead, video-editor-mcp is the minimal half: nine ffmpeg tools, Apache 2.0, no editor UI and no HTTP mode.

git clone <this repo> && cd video-atelier-mcp
mkdir -p work/in && cp /path/to/your/footage/*.mp4 work/in/
docker compose build

Then point Claude Code at it:

{
  "mcpServers": {
    "atelier": {
      "command": "docker",
      "args": ["run", "-i", "--rm",
               "-v", "/absolute/path/to/video-atelier-mcp/work:/work",
               "video-atelier-mcp:0.1.0"]
    }
  }
}

Ask the agent to health_check. It reports ffmpeg, ffprobe, the codecs and filters it found, and which generation backends are configured.

What it does

44 tools, in nine families. Everything writes into one mounted work directory, and every output of the editing tools is registered as a media in its own right — so the id one tool returns is accepted by the next, and a render can be trimmed, re-composed or exported without touching a path.

The one exception is the sam2_* family: it writes to the output path you give it and returns that path, not an id. Import it with media_import if you want to carry it further.

Family

Tools

media

media_import, media_list, media_probe, media_extract_frames, media_thumbnail

timeline

comp_create, comp_add_clip, comp_add_overlay, comp_add_transition, comp_set_audio_mix, comp_get_timeline, comp_validate

cut

clip_trim, clip_concat, clip_speed, clip_crop, clip_loop, clip_format_convert

captions

captions_write_srt, captions_burn, captions_transcribe

audio

audio_add_track, audio_mix, audio_extract

render

render_start, render_status, render_get_output, render_cancel, render_history

export

export_formats, export_gif, export_thumbnail_set, export_meta

generate

generate_shot, generate_status, generate_fetch

screen replacement

sam2_segment_image, sam2_segment_video, sam2_object_track, sam2_propagate_mask, sam2_refine_mask, sam2_screen_replace, sam2_video_inpaint

Plus health_check.

Related MCP server: CapCut & Google Flow MCP

An end-to-end example

Two rushes in, one captioned 16:9 master and a 9:16 cut out. Every call below was run against the Docker image; see examples/end_to_end.md for the full transcript with real outputs.

media_import      source=/work/in/rush1.mp4          -> id 3970f765…
media_import      source=/work/in/rush2.mp4          -> id 57bdc03d…
clip_trim         input=3970f765… start=0.5 duration=2.0
clip_trim         input=57bdc03d… start=1.0 duration=2.0
clip_concat       inputs=[…, …]                      -> one 1920x1080 clip
captions_write_srt segments=[{start,end,text}, …]    -> a .srt
captions_burn     input=… subtitles=…                -> captions in the picture
comp_create       name="demo" width=640 height=360 fps=25
comp_add_clip     comp_id=… media_id=… duration=4.0
render_start      comp_id=…                          -> job_id, state=queued
render_status     job_id=…                           -> persisted state
render_get_output job_id=…                           -> /work/outputs/….mp4
export_formats    input=… format="9:16"              -> 1080x1920

Captions burned into the picture

Screen replacement

sam2_screen_replace takes a shot of someone holding a phone or sitting at a laptop and puts your content on the screen, following the perspective as the device moves.

Film the device with a green panel where the screen is. SAM2 is prompted once, on the first frame, and its mask is propagated across the shot; intersecting a colour gate with that mask isolates the panel and nothing else — anything interrupting it that is not green, such as the camera lenses, falls out on its own. The result is closed into a quadrilateral, and a homography warps the replacement onto it, frame by frame.

Screen replacement, stage by stage

The replacement content in the last panel is blurred: the shot these debug frames come from carried a private interface. The geometry is untouched — that is what the figure is about.

These tools need the sam2 Docker profile — see below. The other 37 tools do not.

Taking over by hand

The agent builds; you finish. ui_start serves the editor the tools write into, on 127.0.0.1:4321, and ui_stop takes it down.

ui_start  ->  { "url": "http://127.0.0.1:4321" }

An agent gets the assembly in place quickly, but its first pass is coarse: a shot duration or a text position expressed as a percentage is only a starting point. Human fine-tuning catches a caption arriving one frame early, an overlay covering a face, or a cut that feels too abrupt.

In the editor, drag text and image overlays to position them and use their resize handles to adjust their size. Move their timeline blocks and trim their edges to set when they appear and disappear. Adjust text font, size, colour and background, and enable SAM2 tracking separately for each overlay that needs to follow motion.

The editor, open on a composition built by the MCP tools

The hand-off is a round trip:

  1. The agent assembles the composition with comp_add_clip, comp_add_text and comp_add_overlay.

  2. Call ui_start, open the editor and refine that assembly. Each saved change updates the same composition JSON — not a separate human-only copy.

  3. The agent calls comp_get_timeline to read the revised composition and continues from your edits, rather than rebuilding from its earlier assumptions.

The Versions button keeps a history: restore an earlier version if a manual adjustment breaks the result.

The editor does not generate new shots; it positions and tunes material the MCP tools have already created. Text overlays are first-class in the model, not a preview trick: comp_add_text, comp_update_text and comp_remove_text do from the agent side exactly what the editor does from yours, and render_start burns them in with drawtext.

The editor is served from web-dist/, which the Docker image builds. Outside the image, build it once with cd web && npm ci && npm run build.

A real render

master-workflow-founding-en-v5-glass.mp4 is a real 40-second, 1920×1080 export explaining the Studio's own video pipeline, with silhouetted faces, purple/cyan particles and geometric forms in a "Liquid Glass" treatment. Editing, short subtitles such as "The brief enters. The angle locks.", and graphic overlays come together in a finished piece from the pipeline this repository was extracted from — not from this repository's synthetic test footage or example tools.

The visuals include material produced by an AI generation backend; see Content and model usage for attribution. This video is provided as an illustration of the full Studio pipeline, which is outside this repository's scope: running this repository's code alone does not produce it.

Dependencies

What

Where it comes from

Needed for

ffmpeg, ffprobe

in the base image (Debian)

everything

libass + fonts

in the base image

captions_burn

Whisper CLI

not installed (it pulls in torch)

captions_transcribe only

SAM2 + torch

sam2 Docker profile

the seven sam2_* tools

SAM2 checkpoint

downloaded on first use into /work/models

the seven sam2_* tools

The SAM2 checkpoint is 2–4 GB. It is deliberately not baked into the image: the base image stays small, and the model is cached in a volume across runs.

The sam2 image needs two build arguments, and fails loudly without them — it refuses to guess where to install SAM2 and torch from:

SAM2_OFFICIAL_GIT_URL=<Meta's SAM2 repository URL> \
TORCH_CPU_INDEX_URL=<the CPU wheel index for your platform> \
  docker compose --profile sam2 build
docker compose --profile sam2 run --rm -T atelier-sam2

This profile has never been built or run. It is written from the pipeline it was ported from, not verified end to end, unlike the 37 tools in the base image.

If you call a sam2_* tool from the base image, you get a one-line error telling you to use that profile — not a Python stack trace.

Generation backends

Generation is chosen per call, on generate_shot:

  • local (the default) — takes a rush you already have in the work directory. No key, no cost, no network. This is the backend the examples use, and the reason they will still run years from now.

  • azure-sora — calls Azure's Sora 2 deployment. Optional, and dated: OpenAI retires sora-2 from its API on 24 September 2026, and the Azure sora-2 version 2025-12-08 stops on 15 October 2026. Nothing else in the atelier depends on it.

That split is the point of the backend interface: when a generation model goes away, the editing room does not.

Costs to expect

Editing, screen replacement and rendering run entirely on your machine: no per-call cost, only CPU time. The only paid path is the Azure generation backend, billed per generated second by Azure at their published rates — check the current Azure OpenAI pricing page rather than trusting a figure quoted here, since the model is being retired and pricing has moved.

Content and model usage

If you use a generation backend, the resulting footage is model-generated: label it as such where your audience or platform expects it, and follow the provider's terms (Azure OpenAI for Sora, Adobe for Firefly). The example rushes are synthesised by ffmpeg's own test sources, so there is no provenance to track there. The one exception is docs/videos/studio-pipeline-example.mp4: a real render from the Studio pipeline this repository is extracted from, included for illustration and containing AI-generated visuals — see A real render above. This repository ships no third-party footage and no client content.

Limitations

Stated plainly, because they are the difference between a demo and a tool:

  • comp_add_transition is a fade to black, not a crossfade. It does not overlap or shorten clips.

  • render_status can briefly miss a job that is being written. Job files are saved by writing a temporary file and renaming it; a status call landing in that window sees ENOENT instead of the job. Observed once in a twelve-call run. Poll again rather than treating it as a failure.

  • An interrupted render restarts from the beginning. The job is a durable JSON snapshot, so it survives a restart, but there is no partial resume.

  • sam2_video_inpaint is spatial only (SAM2 masks plus OpenCV Telea). There is no generative model behind it, and no guaranteed temporal consistency between frames.

  • sam2_propagate_mask is approximate — it samples inside/outside points from the mask you give it rather than replaying the original prompt.

  • The sam2 profile has never been built or run, and the pipeline it was ported from used a locally patched build of sam2 whose provenance could not be established. Dockerfile.sam2 installs Meta's official package (Apache-2.0, as are the sam2-hiera-small weights); check that it behaves as you need before relying on it.

  • No Remotion bridge. The editor below covers hand editing; template-driven React rendering was left behind on purpose, to keep a browser out of the image.

  • The work directory is trusted. Paths are confined to it, but there is no sandbox and no SSRF filtering on media_import URLs. Do not expose this server to untrusted callers.

How it is built

See docs/architecture.md: the local JSON store that replaces a database, the ffmpeg layer (argv, never a shell), the generation backend interface, and the Python bridge for SAM2.

License

PolyForm Noncommercial 1.0.0 (SPDX: PolyForm-Noncommercial-1.0.0) — see LICENSE. This is a source-available licence, not an OSI-approved open-source one.

Free for any noncommercial purpose: personal use, study, hobby projects, and use by charities, schools, public research bodies and government. Commercial use is not granted by this licence — if you want to use this to make money, contact the author for a commercial licence.

This is a source-available licence, not an OSI-approved open-source one. It is deliberate.

Charities, schools, public research bodies, public safety and health organisations, environmental organisations and government institutions are covered by the free licence too — the licence says so explicitly, whatever their funding.

Commercial licence. Using this to earn money — including inside a company, for its own internal work — needs a commercial licence. It is granted, not withheld: write to christian@d-fairy.fr.

Patches are welcome; see CONTRIBUTING.md, which explains the one grant a contributor makes so that contributions can ship inside that commercial licence.

Every dependency, its licence, and what the GPL ffmpeg in the Docker image does and does not mean for your own code: THIRD-PARTY-NOTICES.md.

Available Tools

49 tools
audio_add_trackC

Add an audio track to the composition.

Inputs: comp_id (required), media_id (required), start, volume, +2 more.

audio_extractA

Extract the first audio track as WAV, MP3 or AAC/M4A.

Inputs: input (required), format.

audio_mixB

Mix audio or video files into a WAV, with linear gains and offsets in seconds.

Inputs: tracks (required), duration (required).

captions_burnB

Burn SRT/ASS subtitles into the picture. Needs an ffmpeg built with libass, plus fonts (both ship in the Docker image).

Inputs: input (required), subtitles (required).

captions_transcribeB

Transcribe locally with the Whisper CLI, if installed. No key; the model is downloaded on first use. Not in the base image.

Inputs: input (required), model, language.

captions_write_srtB

Write UTF-8 SRT subtitles. No external service, no key.

Inputs: segments (required).

clip_concatB

Concatenate videos (video only), normalised to a common size and frame rate.

Inputs: inputs (required), fps, width, height.

clip_cropC

Crop to the given rectangle, without scaling.

Inputs: input (required), width (required), height (required), x, +1 more.

clip_format_convertC

Convert to MP4, MOV, MKV or WebM, with optional scale and pad.

Inputs: input (required), width, format, height.

clip_loopC

Loop a clip a finite number of times (video and audio).

Inputs: count (required), input (required).

clip_speedB

Change video and audio speed, from 0.0625x to 16x.

Inputs: input (required), speed (required).

clip_trimC

Trim with frame-accurate re-encoding (seconds).

Inputs: input (required), duration (required), start.

comp_add_clipC

Append a video clip to the composition.

Inputs: comp_id (required), duration (required), media_id (required), in.

comp_add_overlayB

Add an image or video overlay (overlay video is muted, last frame held).

Inputs: width (required), height (required), comp_id (required), duration (required), +4 more.

comp_add_textC

Add a text overlay with percentage positions.

Inputs: text (required), start (required), x_pct (required), y_pct (required), +8 more.

comp_add_transitionB

Fade to black then back, with no overlap and no change in duration. Not a crossfade.

Inputs: comp_id (required), duration (required), after_clip_id (required), type.

comp_createC

Create a sequential composition, stored locally as JSON. No API, no database.

Inputs: name (required), fps, width, height.

comp_get_timelineB

Read the composition JSON and its total duration.

Inputs: comp_id (required).

comp_remove_textC

Remove a text overlay by its identifier.

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

comp_set_audio_mixC

Replace the audio mix of a composition.

Inputs: tracks (required), comp_id (required), original_volume.

comp_update_textB

Update only supplied fields of a text overlay.

Inputs: comp_id (required), text_id (required), text, align, +9 more.

comp_validateB

Validate references, time ranges, transitions and media before rendering.

Inputs: comp_id (required).

export_formatsC

List the aspect ratios; with an input, export it with a centred cover crop.

Inputs: input, format.

export_gifC

Export a GIF excerpt with an optimised palette (30 seconds max).

Inputs: input (required), fps, start, width, +1 more.

export_metaC

Write the ffprobe metadata to a local JSON file.

Inputs: input (required).

export_thumbnail_setC

Extract a set of thumbnails, one at the centre of each interval.

Inputs: input (required), count, width.

generate_fetchC

Copy or download the finished result into a new local file.

Inputs: id (required), destination (required), backend.

generate_shotD

Prepare an existing local rush (the default, no key), or explicitly call Azure Sora.

Inputs: size, prompt, source, backend, +1 more.

generate_statusC

State of a generation job; the backend is recovered from the local metadata.

Inputs: id (required), backend.

health_checkA

Check binaries, codecs, filters and local write access; report which backends are configured.

Inputs: no named parameters.

media_extract_framesC

Extract frames at a fixed interval (300 max).

Inputs: media_id (required), count, start, width, +1 more.

media_importA

Copy a local file or an HTTP(S) URL into the local media store.

Inputs: source (required), name.

media_listC

List imported media.

Inputs: no named parameters.

media_probeC

Probe a media file with ffprobe.

Inputs: media_id (required).

media_thumbnailC

Extract a single JPEG thumbnail.

Inputs: media_id (required), at, width.

render_cancelA

Cancel a queued job, or kill its running ffmpeg.

Inputs: job_id (required).

render_get_outputA

Return the path of the finished MP4.

Inputs: job_id (required).

render_historyB

Durable render history, most recent first.

Inputs: limit.

render_startA

Start an asynchronous local render. The job is a durable JSON snapshot; an interrupted render restarts from the beginning.

Inputs: comp_id (required).

render_statusC

Persisted render state (no estimated percentage).

Inputs: job_id (required).

sam2_object_trackC

SAM2: masks plus a JSONL track (boxes and centroids) for one object.

Inputs: input (required), output (required), points (required), blur, +2 more.

sam2_propagate_maskC

SAM2: approximate propagation, from inside/outside points sampled in the initial mask.

Inputs: mask (required), input (required), output (required), blur, +1 more.

sam2_refine_maskC

Refine a PNG mask by erosion and Gaussian blur. Needs only OpenCV and NumPy.

Inputs: input (required), output (required), blur, erosion.

sam2_screen_replaceC

SAM2: screen replacement, by mask plus a homography onto the oriented rectangle. Output is muted; perspective is approximate.

Inputs: input (required), output (required), points (required), replacement (required), +3 more.

sam2_segment_imageC

SAM2: PNG mask for a single image, via the video predictor.

Inputs: input (required), output (required), points (required), blur, +2 more.

sam2_segment_videoD

SAM2: a series of PNG masks, one per video frame.

Inputs: input (required), output (required), points (required), blur, +2 more.

sam2_video_inpaintB

SAM2 + OpenCV Telea: spatial erasure. No generative model, and no guaranteed temporal consistency. Silent video.

Inputs: input (required), output (required), points (required), blur, +2 more.

ui_startA

Start the local editor on 127.0.0.1. If web-dist is missing, build it or use the Docker image, which ships it.

Inputs: port.

ui_stopA

Stop the local editor's HTTP server.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 49 tools

    Disambiguation3/5

    Tools are grouped by domain and mostly have clear purposes, but several clusters overlap: media_thumbnail/media_extract_frames/export_thumbnail_set all extract images, multiple sam2_* tools perform mask-related operations, and export_formats/clip_format_convert/export_meta have fuzzy boundaries. The descriptions help, but an agent could still misselect among them.

    Naming Consistency4/5

    The dominant pattern is a domain prefix plus an action (media_, captions_, audio_, render_, comp_, clip_ mostly use verb_noun forms), which is readable and predictable. Minor deviations like media_thumbnail (noun), health_check (no prefix), and export_meta (not a clear verb) break the pattern slightly but do not cause major confusion.

    Tool Count2/5

    49 tools is a very large surface for an MCP server. Even though the domain is broad, the count exceeds the 25+ threshold and creates significant selection overhead; many tools could be consolidated (e.g., media_thumbnail versus export_thumbnail_set). The scope feels heavy rather than well-scoped.

    Completeness3/5

    The server covers a wide arc: import, probe, composition, audio, captions, rendering, export, generation, and sam2 segmentation. However, editing workflows are asymmetrical: comp_add_clip/add_overlay/add_transition have no corresponding remove/update tools, media_import has no delete/cleanup, and audio_add_track lacks a removal counterpart. These gaps are noticeable but can sometimes be worked around.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to edit talking-head videos locally by transcribing footage, applying validated edit operations like cutting fillers and silences, adding zooms, captions, looks and branding, and checking results with rendered previews. Agents can also read pinned editor feedback notes with annotated frames, resolve them, and export MP4, SRT or OTIO while the user watches changes live.
      1
      MIT