ClipChat
Provides tools for FFmpeg-based video and audio editing, enabling AI agents to trim, merge, resize, crop, rotate/flip, adjust color, compress, export, generate thumbnails, normalize/fade audio, add watermarks, create GIFs, and blur regions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ClipChat Engine
Open-source video editing backend. Natural language → FFmpeg operations via REST API and MCP server.
What is it?
ClipChat Engine is a self-hostable backend that exposes 20 FFmpeg operations as:
REST API — async job queue (BullMQ) with SSE progress streaming
MCP Server — Model Context Protocol server for AI agent integration (Claude, etc.)
It handles the FFmpeg heavy-lifting so you can focus on building interfaces — chat UIs, editors, automations, or AI agents that edit video through natural language.
Related MCP server: ffmpeg-mcp
Features
Feature | Detail |
20 FFmpeg tools | trim, merge, resize, crop, rotate/flip, color adjust, compress, thumbnail, normalize audio, fade audio, watermark, GIF, blur region, and more |
Async job queue | BullMQ + Redis; jobs survive server restarts; 3 retries with exponential backoff |
SSE streaming | Real-time progress updates via Server-Sent Events |
AI chat | OpenRouter streaming with tool calling; |
Session history | Chat sessions and messages persisted to PostgreSQL |
MCP server | All 20 tools accessible to AI agents via stdio |
Local + S3 storage | Pluggable storage adapter; DB-backed path lookup survives restarts |
API key auth | SHA-256 hashed keys in PostgreSQL |
Web UI | Self-hosted Next.js UI on :3001 — chat, video player, edit timeline |
TypeScript + Zod | End-to-end type safety with schema validation |
Quick Start (Docker)
git clone https://github.com/your-org/clipchat.git
cd clipchat
cp .env.example .envGenerate an API key for the web UI (required before starting):
# Start infra only to run the key generator
docker compose up -d postgres redis
npm install
npm run db:migrate -w packages/engine
npm run create-api-key -w packages/engine -- "prod"
# → clp_a1b2c3d4... (copy this)Start the full stack:
ENGINE_API_KEY=clp_a1b2c3d4... docker compose up -dSet OPENROUTER_API_KEY in .env if you want AI chat (/api/v1/chat).
Service | URL |
Engine API | |
Web UI |
# Verify engine
curl http://localhost:3000/health
# {"status":"ok","version":"0.1.0"}Full local dev setup (without Docker): Getting Started →
Architecture
HTTP Client / AI Agent / Web UI (:3001)
│
▼
Express API (:3000)
├── POST /api/v1/files/upload → LocalStorage / S3
├── GET /api/v1/files → list files (paginated)
├── GET /api/v1/files/:id/content → stream raw bytes (range requests)
├── POST /api/v1/jobs → BullMQ Queue (Redis)
├── GET /api/v1/jobs/:id → PostgreSQL (status poll)
├── GET /api/v1/jobs/:id/stream → SSE via BullMQ events (Redis pub/sub)
├── GET /api/v1/tools → tool manifest
├── POST /api/v1/chat → OpenRouter streaming + tool calls → SSE
├── GET /api/v1/sessions → session list
└── GET /api/v1/sessions/:id/messages → chat history
│
▼
BullMQ Worker
└── Dispatches to ffmpeg/*.ts
│
▼
FFmpeg (subprocess)
│
▼
Result stored in PostgreSQL
─────────────────────────────
MCP Server (stdio, --mcp flag)
└── 20 tools → FFmpeg direct (synchronous)
─────────────────────────────
Web UI (packages/web, :3001)
└── Next.js proxy → engine API (Bearer token injected server-side)Job flow: POST /jobs → BullMQ queue → worker → FFmpeg → DB update → client polls GET /jobs/:id or streams via SSE.
Chat flow: POST /chat { message, file_id? } → first LLM call streams tool calls → jobs submitted to BullMQ → polls DB until complete (max 60s) → second LLM call synthesizes results → SSE events (text, tool_call, done). All turns persisted to sessions/chat_messages.
MCP flow: AI agent calls tool → FFmpeg runs synchronously → result returned immediately.
API Overview
Method | Path | Description |
|
| Health check |
|
| Upload a video/audio file (video/audio only) |
|
| List uploaded files ( |
|
| Get file metadata |
|
| Stream file bytes (supports Range requests) |
|
| Delete a file |
|
| Submit an async job |
|
| Poll job status |
|
| SSE job progress stream |
|
| Cancel a job |
|
| List available tools |
|
| Direct tool invocation (async) |
|
| AI chat with tool calling → SSE stream |
|
| List chat sessions ( |
|
| Fetch session message history |
All /api/v1/* endpoints require Authorization: Bearer <api-key> header (except GET /health).
Full endpoint docs: API Reference →
FFmpeg Tools
Tool | Description |
| Extract duration, resolution, codec, bitrate |
| Cut a clip between two timestamps |
| Concatenate clips (with optional crossfade) |
| Resize by dimensions or preset (720p, 1080p, 4k, square, 9:16) |
| Extract audio track as mp3/aac/wav |
| Swap or mix audio tracks |
| Burn text with custom font/size/color/position |
| Burn SRT subtitles (or add as soft track) |
| Speed up or slow down (0.25×–4×) |
| Re-encode to mp4/webm/mov/gif with quality control |
| Crop to a region or preset (square_center, portrait_center, landscape_center) |
| Rotate 90/180/270° or flip horizontally/vertically |
| Adjust brightness, contrast, saturation, gamma, hue |
| Reduce file size with presets (web, mobile, whatsapp, telegram, archive) |
| Extract a frame as JPG/PNG/WebP at any timestamp |
| Loudness normalisation to target LUFS (default –14 for streaming) |
| Add audio fade-in and/or fade-out |
| Overlay a logo/image with opacity, scale, and position control |
| Create animated GIF from a segment (two-pass, palette-optimised) |
| Blur a rectangle (preset or manual coords) with optional time range |
Full tool docs with schemas and examples: Tools Reference →
MCP Integration
Connect ClipChat to Claude or any MCP-compatible AI:
# Build first
npm run build -w packages/engine
# Start as MCP server
node packages/engine/dist/index.js --mcpClaude Desktop config:
{
"mcpServers": {
"clipchat": {
"command": "node",
"args": ["/absolute/path/to/clipchat/packages/engine/dist/index.js", "--mcp"],
"env": { "DATABASE_URL": "...", "REDIS_URL": "..." }
}
}
}Tech Stack
Runtime: Node.js 20, TypeScript 5
API: Express 4, Multer (file uploads), CORS
Queue: BullMQ 5 + Redis 7
Database: PostgreSQL 16 + Drizzle ORM
FFmpeg: fluent-ffmpeg wrapper
Validation: Zod
MCP: @modelcontextprotocol/sdk
Storage: Local FS or AWS S3 / S3-compatible (MinIO)
Testing: Vitest 1.6 + Supertest
Roadmap
Phase | Status | Description |
Phase 1 | ✅ Complete | Open-source backend — REST API + MCP server |
Phase 2 | ✅ Complete | AI/Claude chat layer — |
Phase 3 | ✅ Complete | Self-hosted web UI — Next.js, video player, edit timeline, chat interface |
Documentation
Getting Started — local dev setup, running tests
API Reference — all endpoints with schemas and examples
Tools Reference — all 20 FFmpeg tools documented
MCP Integration — AI agent setup (Claude Desktop, Claude Code)
Deployment — Docker Compose, S3, production hardening
Contributing — development workflow, adding new tools
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
Video, audio, and image processing for AI agents: convert, transcribe, upscale - 150+ operations.
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Video how-to search for AI agents: 2,000+ video skills, tutorials and FFmpeg recipes. No key.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides powerful video and audio editing capabilities through FFmpeg, enabling AI assistants to perform professional-grade operations including format conversion, trimming, overlays, transitions, and advanced audio processing.2790MIT
- AlicenseBqualityBmaintenanceProvides video and audio manipulation tools powered by FFmpeg, enabling AI assistants to perform media operations such as cutting, converting, and removing silence.6453 npm2MIT
- AlicenseAqualityDmaintenanceProvides 30+ FFmpeg video and audio editing tools via MCP, enabling AI assistants to perform operations like trimming, transcoding, overlays, and composition directly.274MIT
- AlicenseBqualityCmaintenanceEnables AI coding agents to safely inspect, trim, reframe, extract audio from, and burn dynamic subtitles into media files through structured, sandboxed FFmpeg/ffprobe tools with validation and dry-run previews.6MIT