Skip to main content
Glama

Video Edit MCP Server

by Aditya2755
utils.pyβ€’1.49 kB
# Simple cross-platform output directory helper import os from pathlib import Path import uuid from moviepy.editor import VideoFileClip, AudioFileClip from PIL import Image, ImageDraw, ImageFont import tempfile import logging logger = logging.getLogger(__name__) def get_output_path(filename: str) -> str: """Get cross-platform output path for files""" # Use environment variable if set, otherwise default to Downloads output_dir = os.environ.get("VIDEO_MCP_OUTPUT_DIR", str(Path.home() / "Downloads" / "video_mcp_output")) Path(output_dir).mkdir(parents=True, exist_ok=True) return os.path.join(output_dir, filename) class VideoStore: _store = {} @classmethod def store(cls, video_clip) -> str: ref = str(uuid.uuid4()) cls._store[ref] = video_clip return ref @classmethod def load(cls, video_ref: str): if video_ref in cls._store: return cls._store[video_ref] return VideoFileClip(video_ref) @classmethod def clear(cls): cls._store.clear() class AudioStore: _store = {} @classmethod def store(cls, audio_clip) -> str: ref = str(uuid.uuid4()) cls._store[ref] = audio_clip return ref @classmethod def load(cls, audio_ref: str): if audio_ref in cls._store: return cls._store[audio_ref] return AudioFileClip(audio_ref) @classmethod def clear(cls): cls._store.clear()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aditya2755/video-edit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server