Skip to main content
Glama
ISCV Live Preview

ISCV Live Preview

Official
by iscvlab

ISCV Live Preview turns Antigravity's Side Pane (aux_pane), Inline Chat, and Full-Page Sidebar (global) into a hardened live web and motion-stage preview studio—replacing external browser context-switching with zero-flash CSS hot-swap, 1-click viewport/aspect scaling (Fit, Desktop, 16:9, 9:16, 1:1), click-to-agent DOM & live-editable WCAG 2.1 visual inspection (updateModelContext + opt-in Sync to File), standalone .svg element inspection, and automatic window.seekToFrame(frame, fps) timeline scrubbing.

Narrow Side Pane (460×780, Stacked Inspector)

Inline Chat Preview Card (≤ 800 px Bounded)


⚡ TL;DR — Capabilities & Verified Receipts

  • 4 Core Differentiating Features (Zero External Browser Needed):

    1. Targeted Auto Live-Reload: Watches only the entry directory and served asset folders (≤ 16 dirs) over same-origin SSE (0 outer connectDomains, 0 / 4 callServerTool slots); hot-swaps external .css <link> tags and inline <style>-only edits with zero flash, and restores scroll + motion frame/fps after full HTML reloads.

    2. Viewport & Aspect Switcher (Fit, Desktop, 16:9, 9:16, 1:1): ResizeObserver-driven crisp zoom-to-fit (Math.floor(W × s) × Math.floor(H × s), 0 overflow), auto-scaling fixed 1920×1080 stages inside narrow Side Panes and syncing dual-aspect ?aspect=9x16 / ?aspect=16x9 stages.

    3. Click-to-Agent DOM Inspector & Live Visual Editor (updateModelContext + Opt-in Sync to File): Pierces pointer-events: none motion scenes and outer CSS box-shadow frames (elementsFromPoint + exact getClientRects() fragment hit-testing + shadow-rect hit-testing + clickable DOM ancestor breadcrumb & Figma-style Layers dropdown with live hover preview), renders exact multi-line fragment & SVG vector shape boundaries (getScreenCTM()), lets you live-edit FG/BG colors (with instant WCAG 2.1 (0.04045) contrast recalculation), Box W/H, Typography (Size/Line-Height/Weight), data-driven Active Effects & Styles (auto-detects active box-shadow, text-shadow, SVG stroke/stroke-width/dasharray, border/border-radius/outline, opacity, filter/backdrop-filter, mix-blend-mode, transform, clip-path, or any valid CSS property via CSS.supports() + generic + Style, zero hardcoded empty cards), multiline Text (Enter → <br>), and safe-parsed Outer HTML (0 ms live DOM sync + Reset), attaches automatic Before → After diffs to your next prompt (strictly capability-gated via app.getHostCapabilities()), and optionally writes static .html/.svg edits back to disk via Sync to File (atomic write + watcher self-write echo suppression, failing safely on dynamic JS DOM).

    4. Auto Motion Stage Scrubber & Standalone SVG Preview: Automatically detects window.seekToFrame(frame, fps) across inline, defer, and type="module" scripts to reveal Play/Pause, -1f/+1f stepping, timeline scrubbing, and editable FPS (24/30/60) + duration controls; wraps standalone .svg files in a Light/Checker/Dark inspectable vector host.

  • Hardened Loopback Containment & Dual-OS Parity: Strictly binds 127.0.0.1 (never 0.0.0.0) with Host DNS-rebinding rejection, timingSafeEqual session tokens, Referrer-Policy: no-referrer, realpathSync.native symlink/junction containment, UNC/ADS/reserved-device rejection, dual-path .env/.git/key denylist, RFC 9110 206/416 media Range, and clean stdin EOF zero-zombie shutdown on Windows, macOS, and Linux.

  • Zero-Dependency Runtime Bundles (7.62% of 10 MiB Cap): Ships standalone bin/server.cjs (1,656.9 KiB), ui/pane.html (780.1 KiB), and ui/inline.html (780.1 KiB) with 0 external CDNs and 0 node_modules required at plugin runtime.

  • Release & Marketplace Status: LIVE on GitHub (v1.0.0, GitHub Actions CI 4 / 4 green across Linux, Windows, macOS, and Playwright E2E) • Antigravity Marketplace IN PIPELINE (submitted 2026-11-28).

One-Prompt Universal Agent Install

Compatible with Any AI Agent (Cloud • IDE • CLI • Local LLM)—paste this prompt into your agent or run the Antigravity CLI command below:

Install the ISCV Live Preview Antigravity plugin from https://github.com/iscvlab/iscv-live-preview:
1. If the `agy` CLI is available, run `agy plugin install https://github.com/iscvlab/iscv-live-preview` and verify with `agy plugin validate --strict ~/.gemini/config/plugins/iscv-live-preview` (or `%USERPROFILE%\.gemini\config\plugins\iscv-live-preview` on Windows) and `agy plugin list --json`.
2. Otherwise, detect my OS and global plugin directory (`~/.gemini/config/plugins/iscv-live-preview` on Linux/macOS or `%USERPROFILE%\.gemini\config\plugins\iscv-live-preview` on Windows), clone `https://github.com/iscvlab/iscv-live-preview` there (runtime bundles require zero `node_modules`), and verify `npm test` passes.
agy plugin install https://github.com/iscvlab/iscv-live-preview

Verified Bundle Footprint & 4-Gate Scorecard

Evaluation Dimension

Component / Verification Gate

Visual Comparison Bar (20-Block)

Measured Result & Spec Receipt

1. UI Bundle Size vs. 10 MiB Cap ↓(Lower = Better)

ui/pane.htmlui/inline.htmlbin/server.cjs10 MiB MCP App Cap

█░░░░░░░░░░░░░░░░░░░ 7.62%█░░░░░░░░░░░░░░░░░░░ 7.62%███░░░░░░░░░░░░░░░░░ 16.18%████████████████████ 100.0%

780.1 KiB (798,850 B, 0 CDN)780.1 KiB (798,865 B, 0 CDN)1,656.9 KiB (1,696,662 B, standalone)10,240.0 KiB (Host limit)

2. Tool Payload vs. 1 MiB Cap ↓(Lower = Better)

Loopback Metadata (CallToolResult)Base64 Inline Baseline (CanopyGIS)

█░░░░░░░░░░░░░░░░░░░ 0.19%████████████████████ >1,000% (Fails)

1.93 KiB (1,976 B for 9.94 MiB stage / 12.34 MiB w/ fonts)13.2–16.4 MiB (Exceeds 1 MiB & 10 MiB)

3. Security & Protocol Gates ↑

Gate 1: test_http_security.mjsGate 2: test_mcp_stdio.mjs

████████████████████ 100.0%████████████████████ 100.0%

26 / 26 PASS (CA-01..CA-03, CA-07 patcher, SSE cap; skips optional local fixture on CI)8 / 8 PASS (Live stdio + zero zombie; skips optional local fixture on CI)

4. Browser E2E & Plugin Gates ↑

Gate 3: test_e2e_playwright.pyGate 4: agy plugin validate

████████████████████ 100.0%████████████████████ 100.0%

31 / 31 PASS (21 synthetic on CI + 10 CanopyGIS/BoostX local; 0 console errs, 13/13 TTF, 0 flake8)0 Errors / 0 Warnings (strict mode) + /xpublish 0 Blocking / 0 Advisory


Related MCP server: redpen

1. Architecture & Surface Workflow

ISCV Live Preview binds an isolated 127.0.0.1 loopback HTTP server before MCP handshake so _meta.ui.csp.frameDomains declares only the exact ephemeral origin (connectDomains: [], resourceDomains: []). All previewed pages and raw HTML/SVG strings load under tokenized /s/<sid>/<tok>/... paths with an injected external same-origin bridge.js communicating with the outer MCP App shell over an inverted MessageChannel port (fully compatible with opaque "null" sandbox origins).

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    subgraph Canvas [" "]
        Host["Antigravity Host and Agent"] --> MCP["Stdio MCP Server (bin/server.cjs)"]
        MCP --> Shell["MCP App Shell (pane.html / inline.html)"]
        MCP --> Session["Session Engine and Root Resolver"]

        subgraph Loopback ["Hardened 127.0.0.1 Static Server"]
            HTTP["Tokenized HTTP and Range Server"]
            Watch["Targeted Served-Dir Watcher"]
        end

        Session --> HTTP
        Session --> Watch
        HTTP --> Frame["Preview Iframe (HTML, SVG, Motion Stage)"]
        Watch --> Frame
        Shell <--> Frame
        Shell --> Context["Gated updateModelContext and FileView"]
    end
    classDef default fill:#ffffff,stroke:#475569,color:#0f172a,stroke-width:1px
    style Canvas fill:#ffffff,stroke:#cbd5e1,stroke-width:1.5px,color:#0f172a
    style Loopback fill:#f8fafc,stroke:#94a3b8,color:#0f172a
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    subgraph Canvas [" "]
        subgraph Step1 ["1. Open or Update"]
            Tool["iscv_preview_open or iscv_preview_inline"]
            Picker["Empty Launch File Picker"]
        end

        subgraph Step2 ["2. Live Preview and Inspect"]
            View["Viewport Scale and Live Reload"]
            Inspect["DOM Pierce, WCAG 2.1 and Motion Scrub"]
        end

        subgraph Step3 ["3. Agent Context Loop"]
            Attach["Attach Selector and Contrast to Chat"]
            Edit["Agent Edits Source and Auto-Reloads"]
        end

        Tool --> View
        Picker --> View
        View --> Inspect
        Inspect --> Attach
        Attach --> Edit
        Edit --> View
    end
    classDef default fill:#ffffff,stroke:#475569,color:#0f172a,stroke-width:1px
    style Canvas fill:#ffffff,stroke:#cbd5e1,stroke-width:1.5px,color:#0f172a
    style Step1 fill:#f8fafc,stroke:#94a3b8,color:#0f172a
    style Step2 fill:#f8fafc,stroke:#94a3b8,color:#0f172a
    style Step3 fill:#f8fafc,stroke:#94a3b8,color:#0f172a

2. Quick Start & Installation

Option A — Antigravity CLI Install

agy plugin install https://github.com/iscvlab/iscv-live-preview
agy plugin list --json

Option B — Local Clone, Build & Sync

git clone https://github.com/iscvlab/iscv-live-preview.git
cd iscv-live-preview
npm ci
npm run build:sync
agy plugin validate --strict .
npm test

Example Prompts in Antigravity

  • "Preview index.html live in the side pane with auto-reload and switch to 16:9."

  • "Open assets/logo.svg in ISCV Live Preview so I can inspect its vector elements."

  • "Preview canopygis_v4_motion_stage.html at frame 80 with the motion scrubber."


3. Benchmarks, Security Model & Tool Reference

MCP Tool

Visibility

Surface Entrypoints

Primary Responsibility

iscv_preview_open

model, app

aux_pane, global

Open or live-update the Side Pane / Full-Page previewer (empty {} restores last file or opens Workspace File Picker)

iscv_preview_inline

model, app

Inline chat only

Render a bounded (≤ 800 px) live preview card inline in chat (liveReload: false default with opt-in Live toggle)

iscv_preview_list_files

app

—

Scan allowed workspace root for previewable .html, .htm, and .svg files (relative path, kind, size, and mtime)

iscv_preview_select_file

app

—

Switch active file from in-app File Picker or recover stale sessions after server restart

iscv_preview_control

app

—

Pause/resume watcher, persist stage FPS/duration overrides, or apply opt-in fail-safe check_patch / patch_element source sync

Shared Optional Input Schema (iscv_preview_open & iscv_preview_inline)

All inputs are strictly optional so Antigravity + and sidebar launches ({}) work seamlessly:

Parameter

Type

Description

filePath

string

Absolute or workspace-relative path to .html, .htm, or .svg file

html

string

Raw HTML or SVG string served from an in-memory buffer (≤ 2 MiB)

rootDir

string

Optional asset serving root (auto-resolved via 5-tier cascade when omitted)

viewport

enum

"fit" (default; scales fixed stages cleanly without switching preset), "desktop" (1440×900), "16:9" (1920×1080), "9:16" (1080×1920), or "1:1" (1080×1080)

aspectParam

enum

"16x9" or "9x16" query parameter for responsive dual-aspect motion stages

inspect

boolean

Start with DOM Inspect Mode & Inspector sidebar active (default: true in pane mode, false in inline mode)

frame

number

Initial motion frame (≥ 0, rounded to integer) to seek via window.seekToFrame(frame, fps)

fps

number

Override FPS (1–240; auto-inferred when omitted)

durationSec

number

Override stage duration in seconds (> 0 and ≤ 3600; auto-inferred when omitted)

title

string

Optional display title for the preview tab or inline card

forceReload

boolean

Force a full iframe reload even if the same file is already open (default: false)

watchEnabled

boolean

Enable automatic live-reload file watching (default: true, iscv_preview_open only)

liveReload

boolean

Enable live-reload watching on the inline card (default: false, iscv_preview_inline only)

height

number

Inline card viewport height (180–660 px, default: 480, rounded to integer, iscv_preview_inline only)

5-Tier rootDir Resolution & Security Invariants

  1. Explicit rootDir (must be canonical ancestor of entry file; rejects system/profile/drive roots).

  2. MCP Client Roots (listRoots() guarded by client capabilities + 1500 ms timeout + fileURLToPath).

  3. Project Marker Walk-Up (.git, package.json, pyproject.toml, Cargo.toml, go.mod, AGENTS.md, GEMINI.md, .vscode, .antigravity strictly below homedir/Desktop/drive roots).

  4. Static Relative-Ref Ceiling (scans src=, href=, CSS url(...), JS import ../ hops up to 8 levels, clamped strictly below forbidden roots—supporting deeply nested stages reaching shared font libraries).

  5. Entry Directory Fallback (fails closed if entry directory is a forbidden system/profile/temp root).

All HTTP requests enforce 127.0.0.1 loopback peer address, exact Host: 127.0.0.1:<port>, constant-time timingSafeEqual token matching, Referrer-Policy: no-referrer, X-Content-Type-Options: nosniff, Cache-Control: no-store, pre-fs rejection of UNC/ADS/reserved Windows device names, canonical fs.realpathSync.native containment, dual-path sensitive-file denylist (.env, .git, .ssh, *.pem, *.key, id_rsa*), and a server-wide cap of 3 active SSE connections with event: hlp-paused eviction.


4. License & Credits

Released under the MIT License. Created and maintained by ISCV | Isocurve Research Lab (@iscvlab) — Napat Tan (@napattan).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Bridges AI coding agents with the browser to provide visual debugging, real-time error capture, screenshot capabilities, DOM inspection, and interactive wireframing through a reverse proxy with injected developer tools.
      22
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to capture pixel-accurate screenshots and DOM state from localhost apps, receive user-drawn instructions and reference images, and manage implementation review cycles.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to inspect live web and responsive UIs across mobile and desktop sessions, returning measured text findings on contrast ratios, touch-target sizes, overflow, and theme drift instead of screenshot guesses. It also lets a human and the agent share one live panel, so the agent can navigate, tap, and type while reading the user's pinned notes and frames.
      155 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding agents to visually inspect and test local frontend apps by taking screenshots, comparing changes, inspecting DOM styles, interacting with UI elements, capturing console logs, and running accessibility audits.
      11
      1
      MIT