ZA

ZapCap MCP Server: Video Captions and B-roll

Generate accurate video captions and B-roll with ZapCap's MCP server using natural language to automate captioning and media creation.

Quick Install
npx -y @bogdan01m/zapcap-mcp-server

Overview

ZapCap MCP Server is a lightweight Model Context Protocol (MCP) server designed to automate two common parts of video production: generating accurate captions and producing B-roll suggestions or assets. It exposes a tools-style API that lets language models or other orchestrators call specific media-related operations using natural-language prompts. The server aims to reduce manual subtitling work and accelerate B-roll planning or generation by returning structured caption timelines and media recommendations.

The server is useful for developers who want to integrate captioning and B-roll workflows into pipelines, dashboards, or AI agents. Instead of wiring transcription, alignment and media planning logic into every project, you can run or deploy the ZapCap MCP Server and call its tools programmatically—feeding it an audio transcript, a raw video pointer, or a short brief—and receive machine-friendly outputs suitable for editors, players, or downstream automation.

Features

  • Exposes MCP-compatible tools for:
    • Generating time-aligned captions/subtitles from transcripts or audio.
    • Producing B-roll suggestions, shot lists, and media prompts.
  • Accepts natural-language instructions to customize caption style and B-roll intent.
  • Returns structured JSON suitable for editors, players, or automation agents.
  • CLI and Docker-friendly, so it can run locally or in cloud deployments.
  • Lightweight integration surface for attaching model backends or external services.

Installation / Configuration

Prerequisites: Node.js (>=14) or container runtime (Docker). Replace environment variables with your own values.

Clone and install:

git clone https://github.com/bogdan01m/zapcap-mcp-server.git
cd zapcap-mcp-server
npm install

Run in development:

npm run dev
# or
node ./dist/index.js

Docker:

# build
docker build -t zapcap-mcp-server .

# run (example)
docker run -p 8080:8080 \
  -e PORT=8080 \
  -e MODEL_BACKEND_URL=https://api.your-model-provider.local \
  -e STORAGE_PATH=/tmp/zapcap \
  zapcap-mcp-server

Example .env:

PORT=8080
MODEL_BACKEND_URL=https://api.example.com/v1
MODEL_API_KEY=sk-xxxx
STORAGE_PATH=/data/zapcap
LOG_LEVEL=info

Available Tools / Resources

The server provides a small set of MCP tools (example names and purposes—check the running server’s /tools endpoint to confirm exact names):

Tool namePurposeInput
generate_captionsProduce time-aligned captions from audio/transcripttranscript, language, style hints
generate_b_rollCreate B-roll shot suggestions and search promptsbrief, mood, duration, scene constraints
healthHealthcheck / server metadatanone

Tool input/outputs are JSON objects. A typical captions output contains start/end times, text, and optional speaker labels. A B-roll output contains recommended clip descriptions, search keywords, and rough timings.

API examples (replace host/port as needed):

List tools:

curl http://localhost:8080/tools

Call a tool (generic MCP-style call):

curl -X POST http://localhost:8080/tools/generate_captions \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "Welcome to this demo. Today we'll cover three tips...",
    "language": "en",
    "style": {"max_line_length": 42, "include_timestamps": true}
  }'

Sample response (condensed):

{
  "captions": [
    {"start": 0.0, "end": 3.5, "text": "Welcome to this demo."},
    {"start": 3.5, "end": 8.0, "text": "Today we'll cover three tips..."}
  ]
}

Use Cases

  • Automated subtitling pipeline:
    • Feed raw audio or a transcript to generate time-aligned captions that can be exported as SRT or VTT for players and editors.
  • Editor assistance:
    • Supply a video brief and receive a B-roll shot list and search prompts (e.g., “close-up of hands typing; keywords: ‘typing keyboard hands’”) to accelerate asset sourcing.
  • Agent-driven production:
    • Integrate the MCP server as a tool in an AI agent: the agent asks generate_b_roll for scene ideas and generate_captions to generate subtitles as part of a publish workflow.
  • Accessibility and localization:
    • Use the caption tool to generate base captions, then pass outputs to translators or localization tools to produce multilingual subtitles.
  • Rapid prototyping:
    • Developers can wire the server behind a UI or webhook to prototype captioning and media planning features before integrating heavier services.

Tips for Developers

  • Start by exploring the /tools and /health endpoints to discover available tool names and input schemas.
  • Keep transcripts concise and clean for better timing output; include speaker labels if available.
  • Use the style hints payload to control formatting (max line length, speaker inclusion, caption frame rate).
  • If using remote model backends, monitor MODEL_BACKEND_URL and API keys; secure secrets via environment or secret stores.

For source code, issues, and contribution guidance, see the project repository: https://github.com/bogdan01m/zapcap-mcp-server.

Tags:media