video-agent-mcp

video-agent-mcp

Enables MCP clients to run project-scoped video editing workflows: propose and approve editing strategies, apply validated plans, review immutable versions, and export final renders via FFmpeg, with durable persistence and approval gates.

Category
访问服务器

README

<div align="center">

Video Agent Runtime

Agent-native video editing, built around durable plans, reviewable versions, and deterministic rendering.

Edit video as structured data — not as opaque shell commands.

CI License: MIT Node.js TypeScript

Quick start · Agent & MCP · Speech & voice · Mobile · Documentation · Benchmarks

</div>

What is it?

Video Agent Runtime is a headless editing engine for agents such as Claude Code, Codex, or any MCP-capable client.

Instead of letting a model directly author FFmpeg commands, it turns media into durable project data:

Transcript → EditingStrategy → EditPlan / EditPatch → Timeline → Version → Preview → Approval → Export

The model decides what should change. The runtime validates whether that change is allowed, applies it transactionally, renders the result, and keeps every mutation reviewable and reversible.

It is designed first for talking-head video, interviews, podcasts, lectures, screen recordings, and long-form-to-short-form workflows.

[!NOTE] This is not a desktop NLE and does not try to reproduce Premiere or CapCut. The primary interface is an agent, CLI, MCP client, or review-oriented mobile host.

How it works

flowchart LR
    A[Source video] --> B[ASR + visual evidence]
    B --> C[Transcript / Timeline context]
    C --> D[LLM proposes EditingStrategy]
    D --> E{User approves?}
    E -- no --> D
    E -- yes --> F[Structured EditPlan]
    F --> G[Validate + Diff + Apply]
    G --> H[Immutable Version]
    H --> I[Preview render]
    I --> J{Review}
    J -- feedback --> K[EditPatch or Replan]
    K --> G
    J -- approve --> L[Final export]

A typical interaction looks like:

Import interview.mp4
↓
"剪成一分钟,开头抓人。"
↓
Agent proposes a hook-first strategy
↓
User approves
↓
Runtime validates and applies an EditPlan
↓
Preview
↓
"前 20 秒还是太慢"
↓
Minimal EditPatch → new Version → new preview
↓
Final approval → export

Core capabilities

Area What is implemented
Durable edit model Integer-microsecond Timeline, first-class EditPlan and EditPatch, immutable Versions, atomic persistence and per-project locking
Approval workflow Strategy proposal → approval → plan validation → preview → feedback → diagnosis/replan → final approval → export
Structured planning JSON-Schema-constrained LLM output, independent Zod validation, repair retries, provider-call provenance and cancellation
Transcript-first editing Timestamped words/segments, speakers, alignment provenance, transcript search and LLM-readable timeline context
Speech & voice Local and hosted ASR/TTS, generated narration, duration fitting, authorized VoiceProfile cloning/design, dubbing and provenance
Visual evidence On-demand shot/keyframe inspection rather than uploading the entire source video to a model
Rendering FFmpeg preview/final renderer behind a capability contract; no agent-authored shell strings
Durable jobs Bounded concurrency, progress events, retry classification, cancellation, idempotency and restart recovery
Evaluation Deterministic CI evals plus opt-in real-provider ASR/LLM/TTS/voice-clone acceptance and benchmark aggregation

Speech & voice

Speech is a first-class editing subsystem, not a subtitle add-on. ASR produces the semantic timeline used by the editor; TTS and VoiceProfile outputs become explicit project assets and timeline clips.

ASR

Provider / runtime Execution Best fit Notes
faster-whisper Local Mature general-purpose local ASR Lightweight local baseline
Qwen3-ASR Local Chinese, multilingual and local high-quality transcription Uses timestamp alignment for edit-safe output
OpenAI transcription Hosted API BYOK cloud transcription Supports diarized segment mode or Whisper word timestamps depending on model
WhisperX Local optional enrichment Alignment / diarization Fuses aligned words and speaker intervals back into the canonical Transcript

TTS and voice identity

Provider / runtime Execution Capabilities
Kokoro Local Lightweight preset TTS
Qwen3-TTS Local TTS, Voice Design, authorized zero-shot voice cloning, cross-lingual reuse
OpenAI speech Hosted API Hosted TTS / provider voices

Voice cloning is never automatic. A cloned VoiceProfile requires explicit authorization evidence, a quality-checked reference, and—where the provider supports it—an exact transcript-backed reference range. Multi-speaker media is not silently guessed.

Model code, weights, voice assets, and hosted APIs may have different licenses or commercial terms. See speech model research and voice identity before shipping a provider configuration.

Agent & MCP

All public surfaces are thin adapters over the same VideoAgentCore; they do not maintain separate project or timeline models.

Surface Entry point Use case
CLI video-agent Local development, scripting, debugging and explicit workflow control
Project MCP video-agent-mcp Full project-scoped editing tool surface for Claude Code, Codex and other MCP clients
Speech MCP video-agent-speech-mcp Lightweight ASR → structured LLM → TTS workflows without constructing the full editing graph
Agent Skill skills/video-editing/SKILL.md Recommended agent workflow, review rules and safety boundaries
Control API docs/control-api.md Narrow bearer-authenticated local HTTP control surface
Mobile Host docs/mobile/ Zero-server native host prototype using the same domain/runtime contracts

Connect Claude Code / Codex

Build the repository, then point an MCP-capable client at the stdio server:

npm install
npm run build

mcp.example.json contains a minimal configuration shape. Provider secrets are read from environment or secure host storage and are never written into project JSON.

Quick start

Requirements

  • Node.js 22+
  • FFmpeg / FFprobe for real media rendering
  • Optional Python environment for local speech models

Install and verify

npm install
npm run typecheck
npm test
npm run build
npm run smoke:mcp
npm run demo

npm run demo creates synthetic source media locally and drives the real project workflow through transcript → strategy → versions → previews → feedback patch → narration → final FFmpeg export.

Check the current machine without making a paid model call:

npm run cli -- doctor

Configure providers

Copy the relevant values from .env.example into your environment.

# Workspace
VIDEO_AGENT_WORKSPACE=./video-projects

# Planner
VIDEO_AGENT_PLANNER=openai
OPENAI_MODEL=gpt-5.4-mini
OPENAI_API_KEY=...

# Local ASR example
VIDEO_AGENT_ASR=qwen3-asr
VIDEO_AGENT_ASR_MODEL=Qwen/Qwen3-ASR-0.6B

# Local TTS / voice example
VIDEO_AGENT_TTS=qwen3-tts
VIDEO_AGENT_TTS_MODEL=Qwen/Qwen3-TTS-12Hz-0.6B-Base
VIDEO_AGENT_PYTHON=python

Other supported choices are documented directly in .env.example.

Real-provider validation

Normal CI intentionally does not download large speech models or use paid credentials. Real providers are verified through an explicit acceptance harness:

VIDEO_AGENT_REAL_ACCEPTANCE=true \
VIDEO_AGENT_ASR=qwen3-asr \
VIDEO_AGENT_PLANNER=openai \
VIDEO_AGENT_TTS=qwen3-tts \
OPENAI_API_KEY=... \
npm run eval:speech-real

The harness records real stage latency, ASR/TTS real-time factor, provider/model metadata, Node-controller RSS and coarse GPU memory when available. Authorized voice-clone acceptance must be enabled separately and cannot silently run against an arbitrary speaker.

After several runs, aggregate comparable results with:

npm run benchmark:speech-summary

See real speech acceptance, benchmarks, and speech model research.

Mobile host

The mobile target is designed around a local-first, zero-application-server architecture:

Mobile App
  ├── VideoAgentCore
  ├── durable ProjectRepository
  ├── Workflow / Job Queue
  ├── Timeline / EditPatch / Version
  ├── native media adapters
  └── direct BYOK provider access when configured

Source media stays on device by default; remote providers receive only the approved ContextPack/evidence required for inference. API credentials are referenced through secure host storage rather than project JSON.

[!WARNING] The current iOS/Android implementation is still a source-level native host prototype. TypeScript/mobile contracts are checked in CI, but native Xcode/Gradle builds, physical-device media correctness, thermal behavior and background-export reliability still require the documented device validation pass.

Start at docs/mobile/README.md and native host status.

Architecture

                 Agent / CLI / MCP / Mobile
                          │
                          ▼
                    VideoAgentCore
                          │
        ┌─────────────────┼──────────────────┐
        ▼                 ▼                  ▼
     Workflow          ProjectStore       Job Queue
        │                 │                  │
        └──────────┬──────┴──────────┬──────┘
                   ▼                 ▼
              Edit / Timeline    Provider contracts
                   │                 │
             Version / Diff     ASR / LLM / TTS
                   │                 │
                   └────────┬────────┘
                            ▼
                         Renderer
                            │
                         Preview
                            │
                      Review / Export

The main invariant is simple: the runtime owns state; models propose structured changes.

For package boundaries, persistence layout and recovery semantics, read architecture.md.

Documentation & development

The README is the product entry point. Technical details live under docs/.

Topic Document
Architecture and durable state docs/architecture.md
Security and secret handling docs/security.md
Speech MCP docs/speech-mcp.md
Speech model landscape docs/speech-models-2026.md
Voice identity and cloning docs/voice-identity.md
Real-provider acceptance docs/real-speech-acceptance.md
Benchmarks docs/benchmarks.md
Mobile host docs/mobile/README.md
Prior-art / upstream research docs/upstream-study.md
Release history CHANGELOG.md

Project status

The Node runtime is the verified primary path: CLI, MCP, durable project state, FFmpeg rendering, jobs, deterministic evaluation, speech provider adapters and real-provider acceptance tooling are implemented and covered by CI where they do not require external model weights or paid credentials.

Real local-model quality, latency, VRAM and hosted-model behavior must still be measured on the target machine through the opt-in acceptance harness; CI does not pretend those runs happened.

The mobile host remains a source-level prototype until native compilation and real-device validation are completed.

Security principles

  • Agents never receive arbitrary shell execution through the editing API.
  • Raw FFmpeg strings are not authoritative edit state.
  • API keys are never persisted in project JSON, ProviderCall records or benchmark reports.
  • Source media remains local unless a workflow explicitly authorizes remote evidence.
  • Voice cloning requires explicit authorization and provenance.
  • Unsupported renderer/provider capabilities fail explicitly rather than degrading silently.

See docs/security.md for the full boundary.

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选