Demo Studio MCP Server
by Pawangunjkar
README.md
# 🎬 Demo Studio MCP Server
> An MCP server that turns a JSON storyboard into an MP4 software demo: animated flow diagrams, annotated screenshots, scripted web recordings, narration, and burned captions.
[](https://www.python.org/downloads/)
[](https://modelcontextprotocol.io/)
[](LICENSE)
---
## 🚀 Hosted Cloud (MCPize.com) & Pro Agent Skill Bundles (Agensi.io)
Use this server locally for free over `stdio` (`uvx`), or subscribe to the hosted cloud endpoints on **[MCPize.com](https://mcpize.com)** paired with production `SKILL.md` playbooks on **[Agensi.io](https://agensi.io)**:
| Tier | Offering | Cloud Runtime ([MCPize.com](https://mcpize.com)) | Pro Playbook ([Agensi.io](https://agensi.io)) | What's Included |
| :--- | :--- | :---: | :---: | :--- |
| **Free Demo** | Starter Access | `TBD` | `TBD` | Local stdio server and the sample storyboard |
| **Individual Pro** *(This Repo)* | **`demo-studio-mcp`** | **`TBD`** *(`pawangunjkar-demo-studio-mcp`)* | `demo-studio-mcp-pro` (`TBD`) | All **20 storyboard, capture, and render tools** plus 4 demo workflows |
| **3-in-1 Bundle** | **Production demo pipeline** | **`TBD`** | `TBD` | Placeholder for a later bundle |
| **6-in-1 Master Suite** | **Enterprise SDLC Orchestrator** | **`TBD`** | `TBD` | Placeholder for a later suite |
---
## 📋 Table of Contents
- [Overview](#-overview)
- [Key Features](#-key-features)
- [Architecture](#️-architecture)
- [Prerequisites](#-prerequisites)
- [Installation & Setup](#-installation--setup)
- [Configuring Your AI IDE](#️-configuring-your-ai-ide)
- [Environment Variables](#-environment-variables)
- [Complete Tool Reference](#-complete-tool-reference)
- [Example Workflow](#️-example-workflow)
- [Security Best Practices](#-security-best-practices)
- [Troubleshooting](#️-troubleshooting)
- [Author & Contact](#-author--contact)
- [License](#-license)
---
## 🌐 Overview
**Demo Studio MCP Server** is a Python application built with the official MCP Python SDK 2.x. An agent creates a project, adds scenes, and renders an MP4 plus SRT. A second render reuses any scene whose content hash is unchanged.
### How is this different from screen recorders?
A screen recorder captures whatever is on the desktop. This server builds the demo from a storyboard: flow diagrams are laid out and animated frame by frame, screenshots get a Ken Burns move and callouts, and a web walkthrough is a list of Playwright actions with a visible cursor. Narration timing sets the scene length. The voice carries the explanation. Subtitles are written to an SRT file and are not burned into the picture unless `burn_subtitles` is true. Nothing here needs a paid API key. edge-tts is the default voice.
In HTTP mode the paths you pass are on the **server's disk**, not the machine where the chat client runs. This version has no upload endpoint. Use stdio when the files live on your computer.
---
## ✨ Key Features
| Feature | Description |
|---|---|
| **Flow diagrams** | Nodes, groups, Bezier edges, moving packets, and a camera that moves to the active step |
| **Annotated screenshots** | Window chrome, Ken Burns, spotlight, callouts |
| **Web walkthroughs** | Scripted Playwright actions and a visible cursor |
| **Video clips** | Trim, speed, and zoom an existing recording |
| **Narration** | edge-tts by default; OpenAI and ElevenLabs when a key is stored |
| **Captions** | SRT and VTT sidecars, burned lower-third or word-highlight captions |
| **Cache** | Unchanged scenes are skipped on the next render |
| **stdio and HTTP** | Local IDEs use stdio. Containers use streamable HTTP |
---
## 🏗️ Architecture
```
AI IDE (Cursor, Claude, Antigravity, VS Code, Windsurf)
|
| MCP stdio or streamable HTTP
v
demo-studio-mcp
|-- project.json storyboard
|-- flow layout + HTML/GSAP
|-- screenshot animator
|-- Playwright (frames or web video)
|-- edge-tts / optional cloud TTS
v
FFmpeg: normalize, xfade, loudnorm, duck music, burn captions
|
v
out/<slug>-<render>.mp4 + .srt
```
---
## 📦 Prerequisites
- Python 3.10 or newer (3.14 is what this repo was built with on Windows)
- [uv](https://docs.astral.sh/uv/)
- FFmpeg on `PATH`, or the binary shipped with `imageio-ffmpeg` (installed with this package)
- Chromium for Playwright: `uv run playwright install chromium`
`ffprobe` is optional. Without it, durations are read from `ffmpeg -i` stderr.
---
## 📥 Installation & Setup
### uvx
```bash
uvx demo-studio-mcp
```
### Clone and sync
```powershell
git clone https://github.com/Pawangunjkar/demo-studio-mcp.git
cd demo-studio-mcp
uv venv --python C:/Users/pawan/AppData/Local/Programs/Python/Python314/python.exe
uv sync
uv run playwright install chromium
uv run demo-studio-mcp
```
On macOS or Linux, `uv sync` with any Python 3.10+ is enough. On this Windows machine, pydantic is pinned to 2.13.5 because a newer pydantic-core is blocked by App Control. See `DECISIONS.md`.
### Smithery
```bash
npx -y @smithery/cli install demo-studio-mcp --client cursor
```
Smithery reads `smithery.yaml`. Align the `uvx` package name with the published PyPI name before you submit. See `PUBLISHING.md`.
---
## ⚙️ Configuring Your AI IDE
### 1. Cursor
`.cursor/mcp.json` (this file is gitignored):
```json
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp",
"demo-studio-mcp"
]
}
}
}
```
### 2. Claude Code
```bash
claude mcp add demo-studio -- uv run --directory C:\AI_Workspaces\Anti_Workspace\demo-studio-mcp demo-studio-mcp
```
### 3. Claude Desktop
```json
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--directory", "C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp", "demo-studio-mcp"]
}
}
}
```
### 4. Antigravity (Google DeepMind)
`mcp_config.json`:
```json
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--directory", "C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp", "demo-studio-mcp"]
}
}
}
```
### 5. VS Code with Continue / Cline
```json
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--directory", "C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp", "demo-studio-mcp"]
}
}
}
```
### 6. Windsurf
```json
{
"mcpServers": {
"demo-studio": {
"command": "uv",
"args": ["run", "--directory", "C:\\AI_Workspaces\\Anti_Workspace\\demo-studio-mcp", "demo-studio-mcp"]
}
}
}
```
---
## 🔧 Environment Variables
| Variable | Default | Purpose |
|---|---|---|
| `DEMO_STUDIO_HOME` | `~/demo-studio` | Projects, logs, and jobs |
| `DEMO_STUDIO_CACHE_DIR` | `~/.demo-studio-mcp-cache` | Optional TTS key file and the edge-tts voice cache |
| `DEMO_STUDIO_FFMPEG` | discovered, then imageio-ffmpeg | ffmpeg binary |
| `DEMO_STUDIO_FFPROBE` | `ffprobe` on `PATH` | Probe binary. If missing, `ffmpeg -i` is parsed |
| `DEMO_STUDIO_RENDER_WORKERS` | `1` | Background render threads |
| `DEMO_STUDIO_ALLOW_FILE_URLS` | unset | Set to `1` to allow `file://` web recordings |
| `OPENAI_API_KEY` | unset | Optional OpenAI TTS |
| `ELEVENLABS_API_KEY` | unset | Optional ElevenLabs TTS |
| `MCP_TRANSPORT` | `stdio` | `stdio`, `sse`, or `streamable-http` (`http` is the same as streamable HTTP) |
| `PORT` | `8080` | HTTP port |
| `HOST` | `0.0.0.0` | HTTP bind address |
`--http` or a Cloud Run `K_SERVICE` value also selects streamable HTTP.
---
## 🧰 Complete Tool Reference
Tools return plain text. Success starts with ✅, a warning with ⚠️, and an error with ❌. Structured results also include a fenced JSON block. A tool does not raise into the client.
### Category 1: Environment and setup
#### `demo_check_environment`
No inputs. Reports Python, ffmpeg, ffprobe, Chromium, edge-tts, and whether the data root is writable. Each failure includes the command to run.
```text
demo_check_environment()
```
#### `demo_set_tts_credentials`
| Parameter | Meaning |
|---|---|
| `provider` | `openai` or `elevenlabs` |
| `api_key` | Key. It is never printed back |
| `save_to_cache` | Write `credentials.json` when true |
```text
demo_set_tts_credentials(provider="openai", api_key="sk-...", save_to_cache=false)
```
#### `demo_list_voices`
| Parameter | Meaning |
|---|---|
| `provider` | `edge`, `openai`, or `elevenlabs` |
| `language` | Optional filter such as `en` |
```text
demo_list_voices(provider="edge", language="en")
```
### Category 2: Projects
#### `demo_create_project`
| Parameter | Meaning |
|---|---|
| `name` | Display name |
| `output_dir` | Optional existing folder. Default is the data root |
| `theme` | `saas-dark`, `saas-light`, `terminal`, `minimal` |
| `aspect_ratio` | `16:9`, `9:16`, `1:1` |
| `resolution` | Optional `WxH` that must match the aspect |
| `fps` | `24`, `30`, or `60` |
```text
demo_create_project(name="Order Service Walkthrough", theme="saas-dark", aspect_ratio="16:9", resolution="1920x1080", fps=30)
```
#### `demo_list_projects`
No inputs. Lists id, name, scene count, and last update.
#### `demo_get_project`
| Parameter | Meaning |
|---|---|
| `project_id` | Id from create or list |
Returns settings, a scene table with cache status, and JSON.
#### `demo_delete_project`
| Parameter | Meaning |
|---|---|
| `project_id` | Project to remove |
| `confirm` | Without `true`, the tool only describes the folder it would delete |
### Category 3: Title and screenshot scenes
#### `demo_add_title_scene`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `title` | Headline |
| `subtitle` | Optional second line |
| `narration_script` | Optional spoken text |
| `badge_text` | Optional small label |
| `style` | `intro`, `section`, or `outro` |
| `duration_sec` | Used only when there is no narration |
```text
demo_add_title_scene(project_id="acme-api-3f9a1c", title="Order Service Walkthrough", subtitle="How a checkout request flows", style="intro")
```
#### `demo_add_screenshot_scene`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `image_path` | Existing image. It is copied into `assets/` |
| `narration_script` | Optional |
| `zoom_target` | JSON `{x,y,w,h}` in source pixels |
| `highlights` | JSON list of `{x,y,w,h,label?,color?}` |
| `callouts` | JSON list of `{x,y,text}` |
| `window_frame` | `macos`, `browser`, or `none` |
| `ken_burns` | `auto` or JSON `{start_scale,end_scale}` |
```text
demo_add_screenshot_scene(project_id="acme-api-3f9a1c", image_path="dashboard.png", window_frame="browser", highlights="[{\"x\":40,\"y\":80,\"w\":240,\"h\":80,\"label\":\"Orders\"}]", callouts="[{\"x\":160,\"y\":120,\"text\":\"New orders land here\"}]")
```
### Category 4: Flow diagrams
#### `demo_validate_flow_spec`
| Parameter | Meaning |
|---|---|
| `flow_spec` | FlowSpec JSON. Nothing is saved |
Returns errors, warnings, and a layout summary.
#### `demo_add_flow_diagram_scene`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `title` | Scene title |
| `flow_spec` | FlowSpec JSON |
| `narration_script` | Optional. Step `{"sentence": n}` follows this script |
| `theme` | Optional theme override |
```text
demo_add_flow_diagram_scene(project_id="acme-api-3f9a1c", title="Checkout", flow_spec="{...}", narration_script="A user clicks Place Order. The gateway forwards it. The service stores the row.")
```
Built-in icons: `browser`, `gateway`, `server`, `database`, `queue`, `cloud`, `user`, `lock`, `cache`, `function`, `generic`. An unknown icon becomes `generic` and the tool warns. More than 12 nodes is an error. More than 8 is a warning.
`camera_mode` is optional. `guided` (the default) holds a fit-all overview, zooms to each step between 1.25x and 1.5x, then eases back to the whole diagram. `static` leaves the camera at identity so the whole diagram stays in frame and only reveals, glows, and packets move. Any other value is an error from `demo_validate_flow_spec`.
### Category 5: Recording, clips, and audio
#### `demo_record_web_clip`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `url` | `http` or `https`. `file://` only when `DEMO_STUDIO_ALLOW_FILE_URLS=1` |
| `actions` | JSON list. Types: `goto`, `click`, `fill`, `press`, `scroll`, `hover`, `wait`, `wait_for` |
| `viewport` | Optional JSON `{width,height}`. Default 1280x720 |
| `narration_script` | Optional |
A `fill` whose selector contains `password` is logged as `***`. If an action fails, the partial recording is kept and the tool returns ❌ with the action index.
#### `demo_add_video_clip_scene`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `video_path` | `.mp4`, `.mov`, `.webm`, or `.mkv` |
| `start_sec` / `end_sec` | Trim |
| `speed` | `0.25` to `4` |
| `narration_script` | Optional |
| `mute_original_audio` | Default true |
| `zoom_regions` | JSON list of `{start_sec,end_sec,x,y,w,h}` |
#### `demo_import_audio_or_transcript`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `scene_id` | Empty means project level |
| `audio_path` | Optional audio file, copied in |
| `transcript_path` | Optional SRT or VTT, copied in |
Imported transcript times are used as they are. They are not reflowed to the 42-character cue rules. A transcript without audio sets the scene duration from the last cue.
### Category 6: Storyboard editing
#### `demo_reorder_scenes`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `ordered_scene_ids` | JSON list of every scene id exactly once |
#### `demo_delete_scene`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `scene_id` | Scene |
| `confirm` | Without `true`, the tool only describes the delete |
### Category 7: Preview and render
#### `demo_preview_frame`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `scene_id` | Scene |
| `timestamp_sec` | Time inside the scene |
Returns the PNG path, width, and height.
#### `demo_render_project`
| Parameter | Meaning |
|---|---|
| `project_id` | Project |
| `voice` | Optional. Default is the project voice (`en-US-AriaNeural`) |
| `tts_provider` | `edge`, `openai`, or `elevenlabs` |
| `bg_music_path` | Optional music file, copied in, ducked under narration |
| `burn_subtitles` | Default false. The SRT is always written. Burn only when the video must be watched muted |
| `caption_style` | `lower_third` (default) or `word_highlight`, used only when burning |
| `transition_type` | `fade`, `wipeleft`, `slideup`, or `none` |
| `async_mode` | Default true. Returns a job id immediately |
| `overwrite` | Default false. Required to replace an existing final file |
```text
demo_render_project(project_id="acme-api-3f9a1c", async_mode=true, transition_type="fade")
```
#### `demo_get_render_status`
| Parameter | Meaning |
|---|---|
| `job_id` | Id from the render tool |
#### `demo_cancel_render`
| Parameter | Meaning |
|---|---|
| `job_id` | Job to stop |
The worker checks the flag between scenes and every 10 frames.
---
## 🎞️ Example Workflow
`examples/build_sample_demo.py` builds the acceptance demo:
1. Create a 1920x1080, 30 fps, `saas-dark` project.
2. Intro title: "Order Service Walkthrough".
3. Four-node checkout flow with three narration sentences and three steps.
4. Browser-framed dashboard screenshot with one highlight and one callout.
5. Outro: "Thanks for watching".
6. `demo_render_project` with `async_mode=true`, burned captions, and a fade. Poll `demo_get_render_status` every 2 seconds.
The script checks the MP4 with ffmpeg: 1920x1080, 30 fps, one H.264 stream, one AAC stream. It then renders again and expects every scene to be cached.
```powershell
uv run python scripts/make_fixtures.py
uv run python examples/build_sample_demo.py
```
`scripts/` is gitignored. The dashboard PNG is also written to `tests/fixtures/dashboard.png` when you run the fixture script, and the example generates that PNG itself if it is missing.
---
## 🔒 Security Best Practices
- User files are copied into the project `assets/` folder. The render does not keep using the original path.
- Tools refuse to write outside the project folder and the data root.
- Only `http` and `https` URLs are recorded unless `DEMO_STUDIO_ALLOW_FILE_URLS=1`.
- `demo_set_tts_credentials` never returns the key, including the last characters.
- A `fill` action whose selector contains `password` is logged as `***`. The tool does not accept a password field of its own.
- Deleting a project or a scene, and overwriting a finished file, require an explicit confirm flag.
---
## 🛠️ Troubleshooting
| Symptom | What to do |
|---|---|
| FFmpeg not found | Install FFmpeg or leave resolution to `imageio-ffmpeg`. Set `DEMO_STUDIO_FFMPEG` to the binary. |
| Chromium missing | `uv run playwright install chromium` |
| edge-tts failure | The public service refused the call. Retry, or set an OpenAI or ElevenLabs key and pass `tts_provider`. |
| Windows path in a caption filter | Captions are copied to a short name in the working folder. Do not put a drive letter inside a filter graph yourself. |
| App Control blocks a DLL | Keep `pydantic==2.13.5` and `pydantic-core==2.46.5`. Do not downgrade `mcp` to 1.x. See `DECISIONS.md`. |
| `ffprobe` missing | Expected on this machine. Durations come from `ffmpeg -i`. |
| HTTP mode cannot see your files | Paths are on the server. Use stdio for local files. |
---
## 👤 Author & Contact
**Pawan Gunjkar**
- Email: pawangunjkar@gmail.com
- GitHub: [https://github.com/Pawangunjkar/demo-studio-mcp](https://github.com/Pawangunjkar/demo-studio-mcp)
## 📄 License
MIT. See [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues