Skip to content

Latest commit

Β 

History

History
251 lines (207 loc) Β· 16.4 KB

File metadata and controls

251 lines (207 loc) Β· 16.4 KB

PremierPro MCP Server β€” Architecture

System Overview

The PremierPro MCP Server is a multi-language system that enables AI-driven end-to-end video editing in Adobe Premiere Pro. It uses four languages β€” Go, Rust, Python, and TypeScript β€” each chosen for their strengths in a specific layer of the stack.

Architecture Diagram

PremierPro MCP Server β€” System Architecture

CLI / MCP Client Claude Code Β· MCP Plugin Β· Custom CLI stdio / JSON-RPC Go β€” MCP Server & Orchestrator MCP Protocol Handler Task Orchestration Service Mesh Health & Recovery Concurrency (goroutines) Retry & Circuit Breaker Graceful Shutdown Logging & Metrics gRPC gRPC gRPC / HTTP Rust β€” Media Engine Media Probe & Metadata Extract Asset Indexing & Fingerprinting Waveform & Silence Detection Thumbnail Generation FFmpeg bindings Β· Zero-copy I/O Python β€” Intelligence Script Parsing & NLP Edit Decision List (EDL) Gen Shot ↔ Asset Matching (AI) Pacing & Timing Analysis LLM Β· Embeddings Β· Scene Detection TypeScript β€” PP Bridge ExtendScript API Layer CEP Panel (Primary Bridge) Timeline & Clip Operations Import / Export / Render CEP (primary) Β· Standalone Node (fallback) CEP Panel Node Standalone Adobe Premiere Pro Scripting DOM Β· Timeline Β· Media Browser Β· Render Shared Data Layer Asset Index (DB) EDL Cache Proto Definitions Config & Secrets Example Flow: "Edit video from script" 1. CLI Request "Edit with script.pdf" 2. Go Orchestrate Fan-out to services 3a. Rust: Scan assets 3b. Python: Parse script 4. TS: Execute EDL Timeline assembly 5. Premiere Pro Render final output Go Rust Python TypeScript Premiere Pro ──── gRPC - - - Flow

Language Responsibilities

Language Layer Responsibilities
Go Orchestrator & MCP Server MCP protocol (JSON-RPC/stdio), task orchestration via goroutines, service mesh, health checks, retry/circuit-breaker, graceful shutdown, logging & metrics
Rust Media Processing Engine Media probing & metadata extraction, asset indexing & fingerprinting, waveform & silence detection, thumbnail generation, high-perf file I/O via FFmpeg bindings
Python Intelligence Layer Script parsing & NLP, Edit Decision List generation, shot-to-asset matching via AI embeddings, pacing & timing analysis, scene detection
TypeScript Premiere Pro Bridge ExtendScript API integration, CEP Panel (primary bridge), standalone Node.js fallback, timeline & clip operations, import/export/render control

Inter-Service Communication

All services communicate via gRPC with shared protobuf definitions:

Route Protocol Payload
CLI β†’ Go stdio / JSON-RPC 2.0 MCP tool calls
Go β†’ Rust gRPC (protobuf) Media scan requests, asset queries
Go β†’ Python gRPC (protobuf) Script text, EDL generation requests
Go β†’ TypeScript gRPC / HTTP Premiere Pro commands (EDL execution)
TypeScript β†’ Premiere Pro CEP / ExtendScript Native Adobe scripting DOM calls

Bridge Fallback Strategy

The TypeScript bridge to Premiere Pro supports two modes:

  1. CEP Panel (Primary) β€” Runs inside Premiere Pro as an extension panel. Direct DOM access, lowest latency. Communicates with the Go orchestrator over a local WebSocket/HTTP server.

  2. Standalone Node.js (Fallback) β€” Runs as an external process. Sends commands to Premiere Pro via the ExtendScript Toolkit CLI (osascript / COM on Windows). Higher latency but works without a panel installed.

The Go orchestrator auto-detects which bridge is available and falls back gracefully.

Build System

A unified build using just (justfile) or make that:

  • Compiles the Rust engine (cargo build)
  • Builds the Go orchestrator (go build)
  • Installs Python dependencies (pip install / poetry)
  • Bundles the TypeScript bridge (npm run build)
  • Generates protobuf stubs for all four languages
  • Runs all test suites
  • Packages the CEP panel for Premiere Pro installation