kdenlive-mcp
Provides editing capabilities for Kdenlive projects, including creating and managing video/audio tracks, adding and trimming clips, titles, transitions, captions, effects with keyframes, timeline visualization, and exporting or rendering Kdenlive/MLT projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kdenlive-mcpTrim the clip on v1 to start at 2.5s and last 8s"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kdenlive MCP companion
This is a dependency-free Node.js companion for Kdenlive. One transactional editing engine is exposed through both a scriptable CLI and a local STDIO MCP server.
It supports the stable Kdenlive 26.08 line and newer (MLT 7.38 minimum) without modifying the upstream Kdenlive checkout.
What works
Create a revisioned edit project with video and audio tracks.
Add, trim, split, move, and arrange media clips by seconds.
Add styled title clips, set clip volume, and declare dissolves/wipes.
Change clip speed with ripple editing, duplicate/remove clips, and remove tracks safely.
Add, update, inspect, and remove effects with keyframes.
Use named color/blur/transform/chroma/fade effects or the raw MLT escape hatch for any installed Kdenlive/MLT filter.
Add timed caption batches for short-form and talking-head edits.
Generate transparent lower thirds, title cards, badges, callouts, progress bars, and subscribe graphics as SVG.
Generate-and-import a graphic into the timeline in one MCP call.
Reject invalid timing, duplicate IDs, broken transitions, and same-track overlap.
Save atomically, keep timestamped backups, expose history/undo, and reject stale revision writes.
Export OpenTimelineIO (
.otio) and an MLT-based Kdenlive project (.kdenlive).Inspect media and create frames, waveforms, contact sheets, and real before/after effect comparisons when FFmpeg is available.
Produce SVG timeline and effect/keyframe maps that are returned inline to MCP clients, giving the agent visual feedback even before rendering.
Verify exported projects through MLT, open them in the Kdenlive desktop app, and render through Kdenlive when the toolchain is installed.
Expose every companion-engine operation as one of 38 MCP tools with read/write/expensive-operation hints. The CLI and MCP server use the same registry and handlers, so they cannot drift.
This is the companion-app phase, not a live bridge into an already-running Kdenlive window. Transitions are carried faithfully in the companion JSON and OTIO export. The direct .kdenlive exporter stores their declarations as project metadata, but does not yet construct Kdenlive's internal timeline-mix objects; import the OTIO file when transition fidelity is required.
For practical edit recipes, see Polished workflows.
Related MCP server: melt-7 MCP Server
MCP feature coverage
Area | MCP tools |
Project safety |
|
Timeline |
|
Finishing |
|
Effects |
|
Graphics |
|
Agent vision |
|
Interchange/output |
|
Discovery |
|
Generated .svg, .png, .jpg, and .webp results up to 5 MB are embedded directly in MCP tool responses, so a compatible client can inspect them without a second file-read tool.
Requirements
Node.js 22 or newer.
Optional: Kdenlive for native verification and rendering.
Optional: FFmpeg/ffprobe for media inspection and visual previews.
There is no package-install step and no runtime dependency download.
Quick start
From this directory:
node .\bin\kdenlive-cli.mjs doctor --source-path "C:\path\to\kdenlive"
node .\bin\kdenlive-cli.mjs project-create `
--project-path .\demo.edit.json `
--name "Demo edit" `
--fps-numerator 30
node .\bin\kdenlive-cli.mjs clip-add `
--project-path .\demo.edit.json `
--track-id v1 `
--source "C:\media\shot-01.mp4" `
--source-in 2.5 `
--duration 8
node .\bin\kdenlive-cli.mjs title-add `
--project-path .\demo.edit.json `
--track-id v1 `
--text "Opening title" `
--timeline-start 10 `
--duration 3
node .\bin\kdenlive-cli.mjs project-export-otio `
--project-path .\demo.edit.json `
--output-path .\demo.otio
node .\bin\kdenlive-cli.mjs project-export-kdenlive `
--project-path .\demo.edit.json `
--output-path .\demo.kdenliveBoth hyphenated and underscored command names work. Every successful CLI call writes JSON to stdout; failures write JSON to stderr and return a non-zero exit status. Run node .\bin\kdenlive-cli.mjs help for the full tool list.
Register the local MCP server in Codex
Use an absolute Node executable and server path. A project-local .codex/config.toml can contain:
[mcp_servers.kdenlive]
command = "C:\\Program Files\\nodejs\\node.exe"
args = ["C:\\path\\to\\kdenlive-mcp\\bin\\kdenlive-mcp.mjs"]
env = { KDENLIVE_SOURCE_PATH = "C:\\path\\to\\kdenlive" }
startup_timeout_sec = 10
tool_timeout_sec = 3600
default_tools_approval_mode = "writes"Or register it from a Codex CLI installation:
codex mcp add kdenlive `
--env KDENLIVE_SOURCE_PATH="C:\path\to\kdenlive" `
-- "C:\Program Files\nodejs\node.exe" "C:\path\to\kdenlive-mcp\bin\kdenlive-mcp.mjs"Restart or open a new local Codex session after changing MCP configuration, then inspect the connected server/tool list. The render tool is marked as an expensive write and should remain approval-gated.
Toolchain discovery
The server checks PATH, common Windows Kdenlive locations, and these optional overrides:
KDENLIVE_MCP_KDENLIVE_PATHKDENLIVE_MCP_MELT_PATHKDENLIVE_MCP_FFMPEG_PATHKDENLIVE_MCP_FFPROBE_PATHKDENLIVE_SOURCE_PATH
Tests
npm test
npm run checkThe tests cover editing invariants, backups and optimistic locking, OTIO/MLT export, effects/keyframes, speed/ripple editing, captions, generated graphics, timeline/effect visualization, inline MCP images, XML escaping, MCP initialization, tool discovery, and MCP error results.
Project format
The companion JSON is intentionally small and auditable. Times are stored in seconds; exporters convert them to the selected project frame rate. A typical edit has this shape:
{
"schemaVersion": 1,
"revision": 3,
"profile": { "width": 1920, "height": 1080, "fpsNumerator": 30, "fpsDenominator": 1 },
"tracks": [
{
"id": "v1",
"kind": "video",
"clips": [
{ "id": "shot-1", "type": "media", "source": "C:\\media\\shot.mp4", "timelineStart": 0, "sourceIn": 2, "duration": 8, "volume": 1 }
]
}
],
"transitions": []
}Backups are written beside a project or export in .kdenlive-mcp-backups.
Next implementation layer
The clean next step is a native Kdenlive/Qt bridge that maps this stable operation model onto TimelineModel commands in a running application. That will enable live timeline edits, native undo/redo, effect/keyframe APIs, and exact internal transition objects while preserving this CLI/MCP contract.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI video editor for agents and humans: timeline, captions, color, audio and generation as MCP tools.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
A real timeline video editor for AI agents: journaled edits, FFmpeg/MLT rendering, exports
Plan, compare, price, generate, and recover AI video from compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides a headless video editing workflow using portable JSON projects and Kdenlive for review, enabling automated video rendering and project management.7Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables agentic video editing and composition via MCP, allowing creation and manipulation of multi-track timelines with clips, transitions, filters, and text overlays, then rendering to MP4 using the melt-7 CLI.-
- AlicenseAqualityBmaintenanceGive any MCP client a real video editor — 32 typed tools over ffmpeg, Whisper and MediaPipe, plus an optional local UI with a drag-and-drop timeline.38MIT
- AlicenseNot gradedqualityBmaintenanceA real video editor for AI agents, served over MCP, enabling journaled timeline editing, rendering via FFmpeg/MLT, and deterministic CLI operation.1MIT