losslesscut-mcp
Runs FFmpeg and FFprobe locally to analyse media files, exposing tools for media info (duration, streams, chapters), contact sheets and frame extraction, scene-change detection, silence and black-segment detection, EBU R128 loudness/audio level analysis, and keyframe listing, plus configuration of the FFmpeg/FFprobe binary paths.
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., "@losslesscut-mcp Open D:/Videos/talk.mp4, cut 0:02–0:05, and export the segment."
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.
losslesscut-mcp
Let Claude and other AI assistants see your videos and cut them with LosslessCut.
An MCP server that looks at your media with FFmpeg (frames, scenes, silence, loudness, keyframes) and drives LosslessCut through its local HTTP API. Ask "keep the colour bars and the last 3 seconds and export them" and get the files, cut losslessly.
English · Türkçe

Real run against LosslessCut 3.70.2: every step is an MCP tool call, the screenshots are the LosslessCut window.
What it can do
See and analyse the media
These run locally with FFmpeg and work on any file, with or without LosslessCut open. They mirror what LosslessCut itself can show or detect.
Tool | What it does |
| Duration, container, streams (codec, resolution, fps, audio channels, language) and chapters |
| One image with a grid of frames, to scan a whole video or a part of it |
| Frames at exact times, or evenly spaced, as images the assistant can look at |
| Scene changes and hard cuts |
| Silent parts, and the parts with sound between them |
| Black parts, such as fades and breaks |
| Loudness over time (EBU R128) and the loudest moments |
| Keyframes, and the ones around given times, to see where a lossless cut will land |
| Shows which FFmpeg and FFprobe it uses |
Control LosslessCut
Tool | What it does |
| Checks that LosslessCut is running with its HTTP API on |
| Opens media or |
| Loads an exact list of segments (with names) in one step, through LosslessCut's own project file |
| Adds a segment, or moves the start/end of the current one |
| Moves the playhead ( |
| Selection and navigation |
| Exports the selected segments, confirms the export dialog, returns the output paths |
| Waits for a running export and returns its output paths |
| Closes the current file |
| 135 allowlisted LosslessCut keyboard actions, such as |
The cutting itself is done by LosslessCut and FFmpeg without re-encoding, exactly as if you clicked the buttons.
Related MCP server: Video MCP
Requirements
LosslessCut 3.70 or newer (tested with 3.70.2 on Windows 11)
Node.js 20 or newer
FFmpeg and FFprobe on your
PATHfor the analysis tools (or setLOSSLESSCUT_MCP_FFMPEG/LOSSLESSCUT_MCP_FFPROBE; LosslessCut ships both in itsresourcesfolder)An MCP client: Claude Desktop, Claude Code, or any other client that supports stdio servers
1. Start LosslessCut with the HTTP API
The API is off by default. Start LosslessCut from a terminal with --http-api:
# Windows
"C:\path\to\LosslessCut.exe" --http-api
# macOS
/Applications/LosslessCut.app/Contents/MacOS/LosslessCut --http-api
# Linux
./LosslessCut --http-apiIt listens on 127.0.0.1:8080. To use another port, pass it: --http-api 8081, and set LOSSLESSCUT_PORT=8081 for this server too.
See LosslessCut's HTTP API docs.
2. Add the server to your client
Claude Code
claude mcp add losslesscut -- npx -y github:bariswha/losslesscut-mcpClaude Desktop
Open Settings → Developer → Edit Config and add this to claude_desktop_config.json, then restart Claude Desktop:
{
"mcpServers": {
"losslesscut": {
"command": "npx",
"args": ["-y", "github:bariswha/losslesscut-mcp"],
"env": { "LOSSLESSCUT_PORT": "8080" }
}
}
}Other MCP clients
Any client that can start a stdio server works. Use the command npx -y github:bariswha/losslesscut-mcp, or run it from a clone:
git clone https://github.com/bariswha/losslesscut-mcp.git
cd losslesscut-mcp
npm ci
node src/index.js --port 80803. Ask
"Open
D:\Videos\talk.mp4in LosslessCut.""Look through this video and tell me where the scenes change."
"Cut out the silent pauses longer than a second and export the rest as one file."
"Find the loudest moments, make a 20 second segment around each and export them."
"Keep 0:02–0:05 and 0:07–0:09.5, name them intro and demo, and export."
Give the assistant full file paths. It is told never to guess them, and every tool rejects relative paths and files that don't exist.
Configuration
Setting | Default | |
|
| Port of LosslessCut's HTTP API |
| on | Turns off |
| none | Turns off any tools by name |
|
| Paths to the FFmpeg binaries |
For example, without frames in Claude Code:
claude mcp add losslesscut -e LOSSLESSCUT_MCP_FRAMES=off -- npx -y github:bariswha/losslesscut-mcpMost clients can also switch single tools on and off in their own settings: for example the tools menu in Claude Desktop, or /mcp and permission rules in Claude Code.
Security
Talks only to LosslessCut on
127.0.0.1. No other network access, no telemetry. Analysis runs locally with FFmpeg.Never sends an
Originheader, so LosslessCut's browser protection stays meaningful for everything else.FFmpeg and FFprobe are started directly with an argument list, never through a shell.
run_actiononly runs actions from a fixed allowlist.quit,cleanupFilesDialog(which can move source files to the trash),openSendReportDialogand the URL download action are blocked.All inputs are validated: times are parsed and range-checked, paths must be absolute, existing files without control characters.
set_segmentswrites LosslessCut's project file next to the media (<name>-proj.llc) and renames an existing one to a.bakbackup first. Nothing else is written, except the exports you ask for.LosslessCut's HTTP API has no authentication: while it runs with
--http-api, any program on your computer can control it. Only enable it while you use it.
See SECURITY.md.
Limitations
These come from LosslessCut's experimental HTTP API:
No read access. The API can't report the open file, the segments or the playhead, so the assistant keeps track of what it did. The analysis tools read the file itself, not the app.
No error feedback. An action that fails inside LosslessCut still returns success over HTTP.
Dialogs. If LosslessCut opens a dialog (for example when a file is already open), the action waits for you; the server reports that after 30 seconds. Actions in the
dialoggroup oflist_actionsalways open one.Timecode format.
seeksendshh:mm:ss.fff, which LosslessCut parses with its default timecode format. If you switched it to frames or seconds, useset_segmentsinstead.Lossless cuts snap to keyframes unless smart cut is on in LosslessCut, so exports can start a little earlier than asked.
keyframesshows where.
Development
npm ci
npm testTests run against a fake LosslessCut HTTP server, and the analysis tests run real FFmpeg on a generated video when FFmpeg is installed.
Not affiliated
losslesscut-mcp is an independent project. It is not affiliated with, endorsed by or maintained by LosslessCut or its author. LosslessCut is © Mikael Finstad and licensed under GPL-2.0.
License
MIT. This server is a separate program that talks to LosslessCut over HTTP and runs FFmpeg as a separate process. It contains no LosslessCut or FFmpeg code, so their licences don't extend to it, and using it doesn't change how you may use them.
Available Tools
22 toolsadd_segmentAdd segmentA
Adds a new segment from start to end. If the file only has its initial full-length segment, LosslessCut replaces it with this one. Call it several times to cut out several parts.
Inputs: end (required), start (required).
audio_levelsAudio levelsBRead-only
Loudness over time (EBU R128, LUFS) in windows, the loudest moments (laughter, applause, shouting, drops) and the overall loudness.
Inputs: path (required), end, top, start, +1 more.
check_connectionCheck LosslessCut connectionBRead-only
Checks that LosslessCut is running with its HTTP API enabled and reachable on 127.0.0.1.
Inputs: no named parameters.
check_toolsCheck analysis toolsARead-only
Reports whether FFmpeg and FFprobe, which the analysis tools use, are available.
Inputs: no named parameters.
close_fileClose fileA
Closes the current file in LosslessCut. If "ask before closing" is enabled in its settings, the user has to confirm in the app.
Inputs: no named parameters.
contact_sheetContact sheetARead-only
One image with a grid of evenly spaced frames, to scan a whole video (or a part) cheaply. Returns the time of each tile, left to right, top to bottom. Zoom in later with a smaller start/end or view_frames.
Inputs: path (required), end, rows, start, +2 more.
detect_blackDetect black framesBRead-only
Finds black parts of the video, such as fades, breaks between programmes or ad breaks.
Inputs: path (required), end, start, minDuration, +1 more.
detect_scenesDetect scene changesBRead-only
Finds cuts and scene changes in the video with FFmpeg. Lower threshold finds more changes.
Inputs: path (required), end, limit, start, +1 more.
detect_silenceDetect silenceARead-only
Finds silent parts and the parts with sound (speech, music) between them. Useful to remove pauses or split at gaps.
Inputs: path (required), end, start, noiseDb, +1 more.
export_fileExportA
Exports the selected segments of the open file with the current LosslessCut export settings. If the export options dialog is enabled, it is confirmed automatically. Returns the output paths when wait is true.
Inputs: wait, timeoutSeconds.
jump_to_segmentJump to segmentB
Makes another segment the current one and moves the playhead to its start.
Inputs: target (required).
keyframesKeyframesARead-only
Lists video keyframes. Lossless cuts start cleanly at keyframes, so use this to choose cut points or to see where a cut will snap. Pass "near" to get the keyframes around given times.
Inputs: path (required), end, near, limit, +1 more.
list_actionsList actionsARead-only
Lists the LosslessCut keyboard actions that run_action accepts, grouped by category.
Inputs: group.
media_infoMedia infoBRead-only
Duration, container, streams (codecs, resolution, fps, audio channels, languages) and chapters of a media file.
Inputs: path (required).
open_filesOpen filesA
Opens one or more media files (or a .llc project file) in LosslessCut. Paths must be absolute paths the user gave you; never invent or guess paths. Several files are loaded into the batch list. If a file is already open, LosslessCut asks the user what to do, so call close_file first.
Inputs: paths (required).
run_actionRun actionADestructive
Runs one LosslessCut keyboard action by name, for example "togglePlayResetSpeed", "splitCurrentSegment" or "toggleStripAudio". Only actions from list_actions are allowed. Actions in the "dialog" group open a dialog the user must complete in the app.
Inputs: action (required).
seekSeek to timeBIdempotent
Moves the playhead of the open file to a time. Works with the default "timecode with decimal fraction" timecode format in LosslessCut.
Inputs: time (required).
select_segmentsSelect segmentsB
Changes which segments are selected. Only selected segments are exported.
Inputs: mode (required).
set_cut_pointsSet cut start/endB
Sets the start and/or end of the current segment by seeking to each time and pressing "set cut start"/"set cut end". If the playhead is after the current segment, LosslessCut creates a new segment instead.
Inputs: end, start.
set_segmentsSet segmentsA
Loads an exact list of segments for a media file in one step and opens it in LosslessCut. It writes the LosslessCut project file next to the media ("-proj.llc"); an existing project file is first renamed to a .bak backup. The currently open file is closed first. Prefer this over add_segment for precise cuts.
Inputs: path (required), segments (required).
view_framesView framesARead-only
Returns video frames as images so you can see the content. Give exact times, or a count of evenly spaced frames within start/end.
Inputs: path (required), end, count, start, +2 more.
wait_for_exportWait for exportARead-only
Waits until the current or next export finishes and returns the exported file paths.
Inputs: timeoutSeconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target clearly distinct operations (analysis, navigation, editing, export, diagnostics). There is mild overlap among the segment tools (set_cut_points, add_segment, set_segments) and the two frame tools (view_frames, contact_sheet), but descriptions explicitly contrast them and explain when to prefer one over the other.
The dominant pattern is verb_noun (open_files, add_segment, set_cut_points, export_file, run_action, view_frames, check_tools). A few tools are noun-only (audio_levels, media_info, contact_sheet, keyframes), which is a minor deviation but still readable and consistent with a stable snake_case convention.
At 22 tools it sits on the higher end of the ideal range, but each tool maps to a concrete, non-redundant capability spanning analysis, navigation, segment editing, export, and diagnostics. Nothing appears padded or duplicative, so the count is justified for a full media-cutting workflow.
The surface covers the whole lossless-cutting lifecycle: open/close, analysis (silence, black, scenes, audio levels, keyframes, frames), segment creation and selection, export with waiting, and generic action/diagnostics escape hatches. Minor gaps remain, such as reading back the current segment list or a merge/concat operation, but core workflows have no dead ends.
Maintenance
Related MCP Connectors
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Kling AI video generation
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides 17 FFmpeg-based tools for video and audio processing, including conversion, compression, and editing. It enables AI assistants to perform complex media tasks like extracting audio, adding watermarks, and merging videos using natural language.16,348 npm2MIT
- FlicenseNot gradedqualityDmaintenanceA local MCP server that gives Claude Desktop full video editing capabilities via FFmpeg, Whisper, and yt-dlp.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server enabling video processing via natural language: transcription with Whisper, segment cutting with FFmpeg, and file management.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables LLM agents to control the OpenCut classic video editor's timeline through a Playwright-controlled browser, allowing automated video editing tasks like adding media, inserting clips, splitting, trimming, and exporting.9MIT