MCP HubMCP Hub
burningion

video-editing-mcp

by: burningion

MCP Interface for Video Jungle

105created 03/12/2024
Visit
Video
Interface

📌Overview

Purpose: To provide a versatile server for uploading, editing, and generating videos seamlessly using the Video Jungle platform.

Overview: The Video Editor MCP server allows users to upload, edit, and manage videos through an intuitive interface. By integrating with the Video Jungle API, it enables powerful video generation and retrieval capabilities, enhancing users' content creation experience.

Key Features:

  • Video Uploading and Reference: The add-video tool allows users to import videos from URLs and returns a custom vj:// URI for easy referencing and management of video assets.

  • Intelligent Video Search: The search-videos tool provides advanced search capabilities by leveraging embeddings, allowing users to find relevant videos based on audio-visual content and descriptive keywords.

  • Automated Video Editing: With tools like generate-edit-from-videos and generate-edit-from-single-video, users can create tailored video edits by specifying desired criteria, streamlining content creation for targeted messaging.


Video Editor MCP Server

Upload, edit, search, and generate videos using LLM and Video Jungle.

You must sign up for an account at Video Jungle and add your API key to use this tool.

Components

Resources

The server interface allows uploading, generating, and editing videos with:

  • Custom vj:// URI scheme to access individual videos and projects.
  • Each project has a name and description.
  • Search results include metadata about content and timing in videos, enabling direct edit generation.

Prompts

Coming soon.

Tools

The server provides these tools:

  • add-video: Add a video from a URL and get a vj:// URI referencing the video.
  • search-videos: Search videos using embeddings and keywords.
  • generate-edit-from-videos: Generate a rendered video edit from multiple video files.
  • generate-edit-from-single-video: Create an edit from a single video file.

Using Tools in Practice

You must have a Video Jungle account with your API key added.

add-video

Example prompt to add a video:

can you download the video at https://www.youtube.com/shorts/RumgYaH5XYw and name it fly traps?

This downloads the video, adds it to your library, and analyzes it (multi-modal: audio and visual).

search-videos

Example prompt to search your videos:

can you search my videos for fly traps?

Search returns metadata for video editing.

search-local-videos

To search videos stored locally (e.g., Photos app on MacOS), set environment variable LOAD_PHOTOS_DB=1.

Example prompt:

can you search my local video files for Skateboard?

generate-edit-from-videos

Generate a video edit from search results:

can you create an edit of all the times the video says "fly trap"?

Currently, the editing tool depends on context within the current chat.

generate-edit-from-single-video

Create an edit from a single video:

can you create an edit of all the times this video says the word "fly trap"?

Configuration

Get your API key from Video Jungle settings.

Start the MCP server with your API key:

uv run video-editor-mcp YOURAPIKEY

To allow the server to search your Photos app on MacOS:

LOAD_PHOTOS_DB=1 uv run video-editor-mcp YOURAPIKEY

Quickstart

Install

Installing via Smithery

To install Video Editor for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install video-editor-mcp --client claude

Claude Desktop

Edit your claude_desktop_config.json manually:

  • On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json

Example published server configuration snippet:

"mcpServers": {
  "video-editor-mcp": {
    "command": "uvx",
    "args": [
      "video-editor-mcp",
      "YOURAPIKEY"
    ]
  }
}

Example development/unpublished server configuration:

"mcpServers": {
  "video-editor-mcp": {
    "command": "uv",
    "args": [
      "--directory",
      "/Users/YOURDIRECTORY/video-editor-mcp",
      "run",
      "video-editor-mcp",
      "YOURAPIKEY"
    ]
  }
}

With local Photos app access enabled:

"video-jungle-mcp": {
  "command": "uv",
  "args": [
    "--directory",
    "/Users/<PATH_TO>/video-jungle-mcp",
    "run",
    "video-editor-mcp",
    "<YOURAPIKEY>"
  ],
  "env": {
    "LOAD_PHOTOS_DB": "1"
  }
}

Replace directory paths with where you cloned the repository.

Development

Building and Publishing

  1. Sync dependencies:
uv sync
  1. Build package distributions:
uv build
  1. Publish to PyPI:
uv publish

Set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

MCP servers run over stdio, making debugging challenging. Use the MCP Inspector for better debugging experience.

Launch MCP Inspector via npm (replace YOURDIRECTORY and YOURAPIKEY):

npx @modelcontextprotocol/inspector uv run --directory /Users/YOURDIRECTORY/video-editor-mcp video-editor-mcp YOURAPIKEY

The Inspector will provide a URL for browser access to debug.

Logging is saved to app.log. Use this command to monitor logs while working:

tail -n 90 -f app.log