Demo Studio MCP Server
Optional text-to-speech integration for narration; tools configure API credentials and list available voices, and renders can synthesize narration audio through ElevenLabs.
Optional text-to-speech integration for narration; tools configure API credentials and list available voices, and renders can synthesize narration audio through OpenAI.
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.
๐ฌ Demo Studio MCP Server
A Python Model Context Protocol (MCP) server (official
mcp2.x SDK) that turns a structured JSON storyboard into a narrated MP4 software demo video โ combining animated architecture flow diagrams, annotated screenshots, scripted web recordings, text-to-speech voiceover, and SRT/VTT captions via FFmpeg.
๐ Table of Contents
Related MCP server: aidemo
๐ Overview
Instead of recording raw desktop screens, Demo Studio MCP Server builds software walkthroughs programmatically from a storyboard (project.json). An AI assistant creates a project, adds scenes, previews individual frames, and runs a render job to produce a finished .mp4 and .srt (plus optional .vtt).
Voice-led demos by default: Narration timing drives scene durations. Subtitles are always written to an
.srtsidecar file and are not burned into the video unlessburn_subtitles=true.Zero paid keys required:
edge-ttsis the default narration engine; OpenAI and ElevenLabs TTS are optional when you provide an API key.Incremental scene cache: Every scene is hashed (
content_hash) from its inputs, theme, settings, audio, andRENDERER_VERSIONโ re-rendering skips unchanged scenes.Local stdio or HTTP: Use
stdiofor local IDEs (files read directly from your disk), orstreamable-http/ssefor containerized deployments. (Note: HTTP mode reads/writes paths on the server's filesystem; there is no file upload endpoint.)
โจ Key Features
Feature | Details |
Animated Flow Diagrams | Pure-Python rank layout + barycenter crossing minimization + cubic Bezier edges, paired with Chromium/GSAP capture: browser-measured node cards, frame-proportional gaps, edge-label chips, glowing packets, pulsing active halos, short step pills, and |
Annotated Screenshots | Optional macOS or browser window chrome, smooth Ken Burns pan/zoom, spotlight dimming around highlighted regions with accent outlines, and callout badges. |
Scripted Web Walkthroughs | Playwright browser automation ( |
Video Clips & Slides | Trim, speed-adjust ( |
PowerPoint (.pptx) Export | Pure-Python 16:9 OOXML presentation generator ( |
TTS & Punctuation-Safe Captions | Word-level alignment ( |
FFmpeg Composition | Normalizes clips to target resolution/fps, joins with |
Themes, Backdrops & Flow Styles | 25 built-in themes, thousands more generated from any colour ( |
Background Jobs & Previews | Asynchronous |
โ๏ธ How It Works
AI Client (Cursor, Claude, Antigravity, VS Code, Windsurf)
โ
โ MCP (stdio by default, or streamable-http / sse)
โผ
demo_studio_mcp.server (MCPServer โ 28 tools, 4 prompts, 3 resources, /health)
โโโ ProjectStore (project_store.py, models.py)
โ โโโ Stores storyboard in <project>/project.json (atomic writes)
โ โโโ Copies external media into <project>/assets/
โ โโโ Computes per-scene SHA-256 content_hash for cache reuse
โโโ Narration & Captions (tts_engine.py, subtitles.py)
โ โโโ Synthesizes audio (edge-tts / OpenAI / ElevenLabs) + word timings
โ โโโ Restores punctuation, builds SRT/VTT cues & ASS karaoke/lower-third
โโโ Scene Renderers & PPTX Exporter
โ โโโ flow_layout.py + flow_renderer.py -> Chromium + GSAP seekTo() -> MP4 / PNG
โ โโโ summary_slide.html.j2 + screenshot_animator.py -> Chromium + GSAP -> MP4 / PNG
โ โโโ web_recorder.py -> Playwright actions + cursor_overlay.js -> WebM
โ โโโ ffmpeg_composer.py -> video clip trim / speed / zoom / tpad hold
โ โโโ pptx_exporter.py -> themed 16:9 PowerPoint (.pptx) with Speaker Notes
โโโ JobManager + FFmpeg Composition (render_jobs.py, render_tools.py)
โโโ Renders/reuses cached scene clips in <project>/scenes/<hash>.mp4
โโโ Composes transitions, loudnorm/ducking & optional captions in scenes/_compose/<id>/
โโโ Writes final MP4 + SRT (+ optional VTT) to <project>/out/ and removes _compose/Create & Populate: Call
demo_create_project, then add title, flow diagram, screenshot, web recording, or video clip scenes. Input assets are copied inside the project folder so renders stay self-contained.Preview First: Call
demo_preview_frameat any timestamp to inspect a PNG of a scene (and adjust layout, highlights, or camera mode) before running a full video encode.Render & Cache:
demo_render_projectruns in a background worker (async_mode=trueby default). Each scene checksscenes/<content_hash>.mp4; unchanged scenes are skipped on subsequent renders.Clean Deliverables: FFmpeg normalizes streams, applies
xfadetransitions and audio mastering insidescenes/_compose/<render_id>/, writes<slug>-<render_id>.mp4and.srttoout/, and removes the_composework folder on success (or preserves it withcompose.logif composition fails).
๐ Project Layout
demo-studio-mcp/
โโโ src/demo_studio_mcp/
โ โโโ __init__.py # Package metadata
โ โโโ __main__.py # `python -m demo_studio_mcp` entry point
โ โโโ server.py # MCPServer setup, Category 1-2 tools, /health, CLI transport
โ โโโ models.py # Pydantic storyboard/scene/theme models & RENDERER_VERSION
โ โโโ themes.py # Theme presets, colour generator, custom theme library, CSS variables
โ โโโ theme_tools.py # List/create/preview/delete theme tools
โ โโโ project_store.py # Project CRUD, atomic JSON writes, asset copy, content hashing
โ โโโ scene_tools.py # Title, screenshot, reorder, and delete scene tools
โ โโโ flow_tools.py # FlowSpec validation and flow diagram scene tool
โ โโโ flow_layout.py # Graph ranking, cycle breaking, barycenter ordering, Bezier edges
โ โโโ flow_renderer.py # Deterministic Chromium + GSAP frame capture & PNG preview
โ โโโ screenshot_animator.py # Annotated screenshot HTML rendering
โ โโโ web_recorder.py # Playwright scripted recording with cursor overlay
โ โโโ recording_tools.py # Web recording, video clip, and audio/transcript import tools
โ โโโ tts_engine.py # edge-tts, OpenAI, and ElevenLabs TTS providers
โ โโโ subtitles.py # Word alignment, SRT/VTT generation, ASS burned captions
โ โโโ ffmpeg_composer.py # FFmpeg filter graph builders (xfade, loudnorm, duck, captions)
โ โโโ render_jobs.py # Background render job queue, state persistence, cancellation
โ โโโ render_tools.py # Preview, render, status, cancel, and PPTX export tools
โ โโโ pptx_exporter.py # Pure-Python 16:9 OOXML PowerPoint presentation builder
โ โโโ prompts_resources.py # MCP resources (demo://*) and planning prompts
โ โโโ credential_store.py # Optional API key storage in cache dir
โ โโโ binaries.py # ffmpeg/ffprobe/Chromium discovery & stderr duration parsing
โ โโโ templates/ # Jinja2 HTML/SVG templates, cursor overlay JS, vendored GSAP
โโโ examples/
โ โโโ build_sample_demo.py # End-to-end 1080p sample storyboard + cache-hit check
โโโ tests/ # 105 unittest tests (unit, stdio, FFmpeg, Playwright, PPTX, enterprise TLS)
โโโ pyproject.toml # Hatchling build config + `demo-studio-mcp` console script + ruff T20
โโโ Dockerfile # Streamable HTTP container with FFmpeg + Chromium
โโโ mcpize.yaml # Hosted HTTP runtime config
โโโ smithery.yaml # Smithery stdio config๐ฆ Prerequisites
Python 3.10+
FFmpeg on
PATH(or automatically resolved from the bundledimageio-ffmpegdependency)Playwright Chromium:
uv run playwright install chromium
ffprobe is optional โ if absent, media durations are parsed from ffmpeg -i stderr.
๐ฅ Installation & Setup
Run directly with uvx (once published)
uvx demo-studio-mcpClone and install locally
git clone https://github.com/Pawangunjkar/demo-studio-mcp.git
cd demo-studio-mcp
uv sync
uv run playwright install chromium
uv run demo-studio-mcpOptional extras: uv sync --extra yaml for YAML storyboards, uv sync --extra verify for transcript checks in demo_verify_render (faster-whisper).
Windows App Control note: On Windows machines with Smart App Control,
uv.lockpinspydantic==2.13.5andpydantic-core==2.46.5(and keepsmcp>=2.3,<3). Runuv sync --locked(or use the locked versions) rather than upgrading native wheels unnecessarily. See DECISIONS.md.
โ๏ธ Configuring Your AI Client
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--frozen", "--directory", "/absolute/path/to/demo-studio-mcp", "demo-studio-mcp"]
}
}
}Claude Code
claude mcp add demo-studio -- uv run --frozen --directory /absolute/path/to/demo-studio-mcp demo-studio-mcpClaude Desktop / Antigravity / VS Code (Continue/Cline) / Windsurf
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--frozen", "--directory", "/absolute/path/to/demo-studio-mcp", "demo-studio-mcp"]
}
}
}Offline / enterprise startup alternative (skip uv on every start):
Point your MCP client directly at the virtual environment's Python interpreter so startup never contacts PyPI or checks uv.lock:
{
"mcpServers": {
"demo-studio": {
"command": "C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "demo_studio_mcp"]
}
}
}(On macOS/Linux use /absolute/path/to/demo-studio-mcp/.venv/bin/python.)
On Windows, use a path like C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp.
๐ง Environment Variables
All settings are optional โ see .env.example.
Variable | Default | Purpose |
|
| Projects, scene caches, logs, and job files. |
|
| Optional TTS credential store and voice cache. |
| discovered, then | Custom |
|
| Custom |
|
|
|
|
| Maximum concurrent renders per server process, for both async jobs and |
| CPU cores รท 4 (1โ3) | Scenes rendered in parallel inside one render (1โ8). Lower it on small machines. |
| unset | Extra folder of shared |
| unset | Set to |
| unset | Optional OpenAI TTS key. |
| unset | Optional ElevenLabs TTS key. |
|
|
|
|
| Bind address and port in HTTP mode. |
๐งฐ Complete Tool Reference (41 tools)
All tools return plain text prefixed with โ
, โ ๏ธ, or โ (with a fenced JSON block when structured data is returned) and never raise unhandled exceptions to the MCP client.
Category 1: Environment & TTS Setup (3)
Tool | Parameters | Description |
| (none) | Checks Python, ffmpeg, ffprobe, Playwright Chromium, |
|
| Configures |
|
| Lists available voices for |
Category 2: Projects (5)
Tool | Parameters | Description |
|
| Creates a project with any theme (built-in, |
| (none) | Lists project IDs, names, scene counts, and timestamps. |
|
| Returns settings, scene cache status table, and full project JSON. |
|
| Changes theme, brand colours (hex/rgb), font, project-wide backdrop and flow style, voice and prosody, fps, transition, padding, the narration clock ( |
|
| Dry-run preview unless |
Category 3: Title, Summary & Screenshot Scenes (3)
Tool | Parameters | Description |
|
| Appends an |
|
| Appends an animated |
badge_case is auto (default: uppercases plain words but keeps deliberate mixed case such as aOS or iPhone), upper, or as_typed.
| demo_add_screenshot_scene | project_id, image_path, narration_script?, zoom_target?, highlights?, callouts?, window_frame, ken_burns | Copies image into assets/ and adds browser/macOS chrome, spotlights, callouts, and Ken Burns motion. |
Category 4: Flow Diagrams (2)
Tool | Parameters | Description |
|
| Validates FlowSpec JSON without saving; returns errors, warnings, and layout summary. |
|
| Adds an animated flow diagram scene ( |
Built-in node icons: browser, gateway, server, database, queue, cloud, user, lock, cache, function, generic. Unknown icons fall back to generic with a warning; > 8 nodes warns; > 12 nodes errors. camera_mode supports "guided" (default: overview โ step focus โ overview) or "static" (the whole diagram stays framed for the full scene). Node labels and subtitles are scaled up when needed so they stay readable on screen (subtitles at least 2% of the frame height).
Category 5: Web Recording, Video Clips & Audio (3)
Tool | Parameters | Description |
|
| Records Playwright actions ( |
|
| Imports |
Video clip details:
Length: clip length รท speed, or the narration length if that is longer; a short clip holds its last frame.
speed_mode="fit"retimes the clip (0.25รโ4ร) to last exactly as long as its narration, so no speed maths is needed.Audio:
mute_original_audio=falsekeeps the clip's own sound for the whole scene; narration, when present, plays over it with the original ducked underneath.original_audio_volume(0โ2) andaudio_fade_out_secset its level and end fade, e.g. a music intro at 0.55 fading over 0.6 s.Zoom regions:
[{start_sec, end_sec, x, y, w, h}], timed in seconds of the trimmed clip (before speed) in source pixels. Any rectangle works: it is grown to the output aspect ratio around its centre and kept inside the picture. Regions must not overlap.Prepend/append around a finished video: add it with
mute_original_audio=false, nonarration_script, andtranscript_pathset to its SRT so subtitles match;insert_at=0puts it first. |demo_import_audio_or_transcript|project_id,scene_id?,audio_path?,transcript_path?| Imports custom audio and/or SRT/VTT timings (preserving exact imported cue times). |
Category 6: Storyboard Editing (3)
Tool | Parameters | Description |
|
| Edits any scene field. |
|
| Reorders every scene ID in the storyboard. |
|
| Dry-run description unless |
Category 7: Preview, Render & Presentation Export (5)
Tool | Parameters | Description |
|
| Renders one PNG frame of any scene type at |
|
| Renders storyboard (default: |
|
| Returns state, stage, progress percent, output paths, and |
|
| Signals cancellation (checked between scenes and every 10 frames). |
|
| Exports a themed 16:9 PowerPoint ( |
Category 8: Themes (4)
Tool | Parameters | Description |
|
| Lists built-in and custom themes (filter by text or |
|
| Saves a reusable JSON theme. Start from a theme, a colour, or a mood, then override any part. Low-contrast palettes return warnings. |
|
| Renders a 1280ร720 PNG of the theme on a |
|
| Deletes a custom theme (dry run unless |
|
| Loads a brand theme file (full theme format or the simple brand format: colors, gradients, fonts, card, background, header kicker/chapter chip, status colours), saves it to the library, and makes it the project theme in one call. |
Theme names:
Built-in (31):
saas-dark,saas-light,terminal,minimal,midnight-aurora,ocean,sunset,forest,neon-cyber,blueprint,paper,nord,dracula,solarized-dark,solarized-light,github-dark,github-light,corporate,glass,mono-light,high-contrast,pastel,royal,ember,matrix, and the slide presetsamdocs-aos,executive-light,telco-blue,neon-dark,minimal-mono,corporate-gradient(glass cards, gradient titles, chapter chips).Generated:
gen-<rrggbb>[-dark|-light][-<harmony>][-<backdrop>], where harmony iscomplementary,analogous,triadic,split, ormono; andmood-<mood>[-dark|-light](calm,energetic,luxury,playful,technical, โฆ). Colours are nudged to meet WCAG text contrast.Custom: anything saved by
demo_create_theme, plus JSON files inDEMO_STUDIO_THEMES_DIR.
Per-scene looks: theme_override and backdrop on title, summary, and flow scenes; layout (center, left, split) on title cards; flow_spec.layout (left_to_right, right_to_left, top_to_bottom, bottom_to_top, radial, auto) and flow_spec.style (node, edge, packet) on flow diagrams.
Category 9: Slide Templates (8)
Executive-style slides on a 1920-wide stage (scaled to the output), sharing one kit: glass cards with glow, pills, icon tiles, gradient text, glow dots, speech bubbles, and an app window. Slide headers get a chapter chip (chapter="auto" numbers them; consecutive slides with the same title share a number) and the project kicker. Every add tool takes insert_at and extra (any other scene field as JSON).
Tool | Parameters | Description |
|
| Opening ( |
|
| Screen recording in an app window (cropped segments, crossfaded) beside key-message cards; segment k and card k switch on sentence k. A segment |
|
| Story diagram: cards joined by request/response lanes, packets and bursts with counters, thinking dots, speech bubbles, and a takeaway banner, all on sentence anchors. |
|
| Roadmap line with a TODAY marker, status pills, and milestone cards that pulse as they are named. |
|
| Process steps with flowing arrows, plus count-up KPI tiles with optional unit blocks. |
|
| Value slide: 2-6 icon tiles in a grid; each lights up (glow and top bar) as it is narrated while the others dim. The last |
|
| Several cropped pieces of one or more recordings as one full-frame scene, cut on sentence anchors. |
|
| Adds any scene type from one JSON object. |
|
| Copies a scene under a new id (right after the original by default), optionally patching fields. |
Narration clock. With narration_mode="lines" (or narration_lines on a scene) every sentence is synthesized on its own, trimmed of silence, cached by voice and text, and placed at lead + previous lines + gap. Anchors {"sentence": k, "frac": f, "offset_sec": s} or {"time_sec": t} drive every animation, so the picture follows the voice exactly. Scenes take lead_sec, gap_sec, tail_sec, voice_rate, voice_pitch, and voice_volume; the project pronunciations map ({"CES": "C E S"}) is applied before TTS.
Layout checks. demo_preview_frame reports layout: notes for slide scenes: text overflowing its box, overlapping cards, text under 15 px on the 1920 stage, and text leaving the frame.
Category 10: Storyboards (2)
Tool | Parameters | Description |
|
| Writes settings and every scene as editable JSON or YAML (YAML needs the |
|
| Builds or extends a storyboard from a file or text. Every scene is validated before anything is saved; |
Category 11: Review (2)
Tool | Parameters | Description |
|
| One PNG of labelled thumbnails (one per scene, two for long scenes) from the newest render. |
|
| Checks length against the timeline, black frames, and narration lines that came out silent; with |
Every render writes <name>.timeline.json next to the MP4: each scene's start, length, and narration lines with absolute times. demo_render_project(draft=true) renders a quick 960-wide, 15 fps check copy (...-draft.mp4) and keeps the synthesized narration for the full render. Background music is ducked under the voice with a sidechain compressor, and loudness is normalised once on the final mix.
๐งฉ MCP Prompts & Resources
Prompts:
plan_demo_from_codebase(repo_path, audience, length_sec)โ guides an agent to map architecture and assemble a full storyboard.design_animated_flow(system_description)โ generates and validates aFlowSpecJSON object.plan_presentation_from_demo(project_id, audience)โ organizes summary slides, speaker notes, and.pptxexport for leadership/engineering presentations.design_theme(brand, mood, audience)โ turns a brand or mood into a saved, previewed theme and applies it.
Resources:
demo://projectsโ JSON list of projects underDEMO_STUDIO_HOME.demo://project/{project_id}/storyboardโ Markdown scene table and narration scripts.demo://presets/themesโ Every built-in and custom theme spec, plus the generator name syntax.
๐๏ธ Example Workflow
examples/build_sample_demo.py builds and verifies a complete 1080p acceptance demo:
Creates a
1920x1080,30 fps,saas-darkproject (and generatestests/fixtures/dashboard.pngif missing).Adds an intro title (
Order Service Walkthrough), a 4-node checkout flow diagram (Web ClientโAPI GatewayโOrder ServiceโPostgreSQL), a browser-framed screenshot with spotlight & callout, and an outro card.Renders asynchronously with
burn_subtitles=falseandtransition_type="fade", pollingdemo_get_render_statusevery 2 seconds.Verifies the output MP4 via
ffmpeg(1920x1080,30 fps, 1 H.264 stream, 1 AAC stream) and.srtsidecar, exports QA frames intoexamples/qa_frames/, and renders a second time assertingscenes_cached=4andscenes_rendered=0.
uv run python examples/build_sample_demo.py๐ Security Best Practices
Input images, videos, audio, and transcripts are copied into the project
assets/folder before rendering.All project reads/writes stay confined to the project folder and
DEMO_STUDIO_HOME.Only
http://andhttps://URLs are allowed fordemo_record_web_clipunlessDEMO_STUDIO_ALLOW_FILE_URLS=1.demo_set_tts_credentialsnever echoes API keys back in tool responses.fillactions targetingpasswordselectors are logged as***.Project deletion, scene deletion, and overwriting existing renders require explicit confirmation flags (
confirm=true/overwrite=true).MCP
stdiosafety is enforced withruffT20print checks on library/tool modules.
๐ ๏ธ Troubleshooting
Symptom | What to do |
FFmpeg not found | Install FFmpeg on |
Chromium missing | Run |
|
|
App Control blocks a DLL on Windows | Keep locked pins ( |
| Expected when not installed globally; durations are parsed from |
HTTP mode cannot access local paths | Paths are resolved on the server filesystem; use |
Render stays | Another render holds the slot. |
| Synchronous renders now honor |
Two server processes share one | Supported: each job records its owner process, so a newly started server only marks jobs failed ( |
๐งช Development & Tests
uv run ruff check .
uv run python -m unittest discover -s tests -vThe test suite (105 tests) covers the theme engine (presets, generated and custom themes, contrast, every backdrop style, flow styles and directions, title layouts, theme previews), models, project store/caching, render job queueing and restart recovery, nested render progress, video clip timing, segment-based zoom regions and original-audio ducking, scene patches and project settings, previews of every scene type, background media, flow layout and readable node subtitles, subtitle punctuation alignment, orphan-free cue splitting & ASS/SRT/VTT round-trips, FFmpeg command builders, stdio JSON-RPC compliance, cancellation & web recording integration, Playwright visual/layout assertions, summary slides, .pptx presentation export, and enterprise TLS/browser fallback.
๐ค Author & License
Pawan Gunjkar โ pawangunjkar@gmail.com ยท GitHub
MIT License โ see LICENSE.
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
Render an MP4 from your own images, clips, voice-over and timed captions. JSON to video.
AI video editor your agent can drive: plan scenes, edit a multi-track timeline, and render MP4s.
Make narrated, on-brand product videos of your real app from your coding agent or AI assistant.
AI video agent: edit timelines, captions, voice, music, images and ads, then render MP4s.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAgent-driven animated diagram renderer that turns API/flow descriptions into animated MP4s or Instagram-style carousels, designed to be driven by an AI agent over MCP.23 npm5MIT
- AlicenseAqualityAmaintenanceYour coding agent makes the demo video โ turns a storyboard.json into a narrated, captioned product-demo MP4; deterministic replay re-renders it in CI at ~$0.24222 npm37MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to create polished product demo videos by controlling a real Chromium browser, recording actions, and rendering 1080p MP4s with narration, captions, and styled overlays.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to operate a web app, record a deterministic session, and compile an editable project into a polished MP4 with zooms, cuts, captions, callouts, and reproducible renders.MIT