OpenCut Controller

OpenCut Controller

Enables AI models to fully automate and control the OpenCut Video Editor through a comprehensive set of MCP tools for timeline manipulation, scene management, media handling, and rendering.

Category
Visit Server

README

<p align="center"> <img src="assets/logo.png" width="150" alt="OpenCut Controller Logo"> </p>

๐ŸŽฌ OpenCut Controller (MCP Server)

๐ŸŒ Leer en Espaรฑol: README.es.md

Model Context Protocol npm version Bun License: MIT

[!NOTE] OpenCut Controller is a robust Model Context Protocol (MCP) server designed to fully automate and control the OpenCut Video Editor directly from AI models (like Claude or agents inside n8n).

By leveraging Playwright under the hood, this server seamlessly injects into the OpenCut browser environment, granting LLMs programmatic access to manipulate the timeline, scenes, media assets, rendering engine, and moreโ€”effectively turning OpenCut into an AI-driven, headless video editing powerhouse.


โœจ Key Features

  • 161 Comprehensive MCP Tools: Full programmatic control over OpenCut's core editing capabilities.
  • Dual Transport Support: Connect locally via stdio (default) or integrate remotely via modern HTTP Streamable transport.
  • Playwright Integration: Connects directly to the OpenCut web interface to manipulate application state in real-time.
  • Contextual Resources: Inspect the editor's live state, current projects, and timeline tracks.
  • Pre-built MCP Prompts: Ready-to-use templates for common high-level editing tasks.

๐Ÿš€ Installation

Ensure you have Bun installed on your system.

# Clone the repository
git clone https://github.com/JXUE0/opencut-controller.git
cd opencut-controller

# Install dependencies (Playwright browsers will install automatically)
bun install

# 3. Patch the Local Editor:
# To enable MCP control, you need to apply small patches to the OpenCut source code. We provide an automated script for this:
bun run scripts/patch-editor.ts ../path-to-opencut

# 4. Install & Run Editor:
cd ../path-to-opencut
bun install
bun dev:web

[!TIP] The bun install command will automatically trigger a postinstall script to download the required Playwright Chromium binaries. No manual browser setup is needed!

๐Ÿ’ป Usage

The server can be launched using two different transport protocols depending on your client environment.

1. stdio Transport (Default)

Ideal for standard local MCP clients like Claude Desktop.

bun run src/index.ts

2. HTTP Streamable Transport

Ideal for integrating with external workflow tools like n8n or remote services. The server listens at http://localhost:3002/mcp.

[!WARNING] Environment variable syntax varies depending on your operating system. Make sure to use the correct command below to prevent errors.

Linux / macOS (Bash):

TRANSPORT_TYPE=http PORT=3002 bun run src/index.ts

Windows (PowerShell):

$env:TRANSPORT_TYPE="http"; $env:PORT="3002"; bun run src/index.ts

๐Ÿ› ๏ธ Available MCP Tools (161)

The controller exposes 161 highly granular tools to the LLM, categorized as follows:

Category Tools Description
๐Ÿ“ Project 6 Create, open, save, and export OpenCut projects.
๐ŸŽฌ Scenes 8 Manage scene lifecycle, renaming, and active state.
โ–ถ๏ธ Playback 5 Control timeline playback, pause, stop, and seek.
โฑ๏ธ Timeline Tracks 7 Add, remove, lock, and manage track visibility.
๐Ÿงฉ Timeline Elements 12 Manipulate clips: trim, split, move, duplicate, and select.
โœจ Timeline Effects 9 Apply and tweak visual effects and presets.
๐Ÿ“Œ Keyframes 8 Granular control over animation interpolation and easing.
๐ŸŽฏ Selection/Clipboard 10 Standard editing operations (copy, cut, paste, delete).
๐Ÿ•ฐ๏ธ History 5 Time-travel through undo/redo states.
๐ŸŽž๏ธ Media 10 Import, search, trim, and optimize raw media files.
๐Ÿ“ Text 7 Generate and format text overlays and animations.
๐ŸŽต Audio 11 Search music/SFX, mix volumes, and apply audio fades.
๐ŸŽจ Stickers/Canvas 11 Add overlays, manage canvas zoom, resolution, and pan.
โš™๏ธ Transcribe/Export 10 Auto-transcribe audio and manage the final video rendering.
๐Ÿ”– Bookmarks/Panels 10 Navigate the UI and manage layout layouts.
๐Ÿ”‘ Auth & Storage 13 Manage user sessions, project state backups, and sync.
๐ŸŒ API 8 Directly interact with OpenCut's backend endpoints.

๐Ÿ“ฆ MCP Resources

Resources provide context directly to the LLM about the current state of OpenCut:

  • opencut://projects - JSON array of all available OpenCut projects.
  • opencut://editor/state - Live tracking of the active project, scene, playhead time, and playback status.
  • opencut://timeline/tracks - Detailed breakdown of tracks in the active scene.

๐Ÿค– MCP Prompts

Quick-start templates for complex actions:

  • create_intro_video - Automates creating a 10-second intro with text overlays.
  • add_background_music - Searches the OpenCut sound library and trims music to fit.
  • apply_transition - Seamlessly blends two clips with a specified effect.

๐Ÿ”Œ Integrating with Claude Desktop

Make sure to replace /absolute/path/to/opencut-controller with the actual path on your local machine.

To connect OpenCut Controller to your local Claude Desktop app, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "opencut-controller": {
      "command": "bun",
      "args": ["run", "src/index.ts"],
      "cwd": "/absolute/path/to/opencut-controller"
    }
  }
}

โš ๏ธ Troubleshooting

  • "Playwright browser not found": Ensure postinstall ran successfully. You can trigger it manually with bun run playwright install chromium.
  • "PowerShell: The term 'TRANSPORT_TYPE=http' is not recognized": You are using bash syntax in Windows. Use $env:TRANSPORT_TYPE="http"; bun run src/index.ts instead.
  • Connection Refused: Ensure OpenCut is open and accessible by Playwright.

[!TIP] If you encounter TypeScript errors during development or execution, you can verify your types locally by running bun run build (which executes tsc --noEmit).

๐Ÿ›  Troubleshooting (Soluciรณn de problemas)

1. Error: window.__opencut is undefined

Cause: You are trying to use the MCP server with the production web app (opencut.app). Fix: You must run the OpenCut editor locally. The production site doesn't expose the internal hooks required for MCP control.

2. Error: Incompatible React versions

Cause: react and react-dom versions mismatch in the monorepo. Fix: Ensure both are set to the exact same version (e.g., 19.0.0) in the root package.json and run bun install.

3. Error: Invalid input: expected string, received undefined (Zod Error)

Cause: Missing environment variables in apps/web/.env. Fix: Ensure you have a .env file in apps/web/. We have updated the code to make most variables optional, but BETTER_AUTH_SECRET may still be needed for some features.

4. Connection Timeout

Cause: The local OpenCut server (Next.js) is still compiling. Fix: Wait until you see โœ“ Ready in the editor terminal before starting the MCP server.


๐Ÿ“„ Credits & Acknowledgments

This project's original codebase and concept were inspired by and built upon the foundational work done in RavenMeld/OpenCut-MCP. We extend our sincere gratitude to RavenMeld for their pioneering work on connecting OpenCut via the Model Context Protocol.

๐Ÿ“„ License

This project is licensed under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured