Skip to main content
Glama
Antigravity Preview Studio

Antigravity Preview Studio

by DaDerekkk

Antigravity Preview Studio

CI License: MIT

Preview Studio Logo

A zero-CDN, native Antigravity MCP App plugin for viewing, inspecting, and editing HTML, Markdown, LaTeX, Mermaid, SVG, CSV/TSV, JSON/JSONL, Word, Excel, and PowerPoint files and URLs inside Antigravity with instant Preview | Split | Code switching.


Feature Matrix

Capability

Details

View Modes

Preview, Split (resizable), and Code powered by CodeMirror 6

Zero-CDN Offline Bundle

Everything—including KaTeX .woff2 fonts, Mermaid, Marked, Highlight.js, and CodeMirror—bundles into a single self-contained dist/app.html

Bidirectional Editing

Toggle Markdown checkboxes, insert Math/Unicode symbols (Ω), edit CSV/XLSX cells & rows, or click HTML elements in Inspect mode to jump to source

Native "Open With" Launcher

One-click jump to Microsoft Word, Excel, PowerPoint, Chrome, Cursor, Pages, Finder, or system default app even from antigravity-file:// tabs

Context Micro-Toolbars

Format-specific quick actions (viewports, console, snippets, symbol picker, outline drawer, zoom, background, charts, tree/table, format/minify)

Local & Remote Loading

Opens antigravity-file:// resources, local file paths, file:// URIs, http(s):// URLs, and pasted inline snippets

Asset Resolution

Inlines relative local CSS, JS, images, and fonts (up to 4 MiB) for local HTML and Markdown documents

Export & Print

Export standalone .html, vector .svg, rasterized .png, or print to PDF

Native Theme Sync

Automatically follows Antigravity light/dark theme and CSS host variables


Related MCP server: document-converter

Supported Formats

Format

Extensions

Highlights

HTML

.html, .htm

Sandboxed iframe, Desktop / Tablet / Mobile viewports, live Console capture, click-to-source Inspect, localStorage shim, relative link navigation

Markdown

.md, .markdown, .mdx

GFM tables, Highlight.js syntax highlighting, KaTeX math ($ / $$), embedded Mermaid diagrams, interactive checkboxes, collapsible Outline

LaTeX

.tex, .latex

Sections, \begin{equation} / \begin{align}, matrices, fractions, theorems/lemmas/proofs, KaTeX math rendering, collapsible Outline

Mermaid

.mmd, .mermaid

Flowcharts, sequence, state, class, ER, and Gantt diagrams with zoom/fit controls and Checker/Light/Dark canvas

SVG

.svg

Crisp vector stage with zoom/fit controls, Checker/Light/Dark background toggle, and PNG/SVG export

CSV / TSV

.csv, .tsv

Sortable/filterable interactive table, inline cell editing, + Row insertion, and automatic SVG bar/line chart view

JSON / JSONL

.json, .jsonl

Collapsible interactive JSON tree, auto-detected array-of-objects table view, one-click Format and Minify

Word

.docx

Clean document reader, heading outline, optional inline contenteditable editing, Print & standalone HTML export

Excel

.xlsx, .xls

Multi-sheet tabs, sortable/searchable grid, double-click cell editing, + Row / Delete Row with .xlsx save-back, and SVG charts

PowerPoint

.pptx

16:9 slide deck viewer, thumbnail rail, ← / → navigation, Grid Overview, Speaker Notes, and HTML export


Keyboard Shortcuts

Shortcut

Action

Cmd/Ctrl + S

Save current writable file (antigravity-file:// or local path)

Cmd/Ctrl + Shift + V

Toggle between Preview and Code mode

Cmd/Ctrl + \

Toggle Split mode

Cmd/Ctrl + F

Find / replace inside CodeMirror editor


Installation in Antigravity

From Source

git clone https://github.com/DaDerekkk/antigravity-preview-studio.git
cd antigravity-preview-studio
npm install
npx tsc --noEmit
npm run build
npm test
npm run install:plugin

npm run install:plugin copies the built plugin (plugin.json, mcp_config.json, assets/, bin/, and dist/) into ~/.gemini/config/plugins/html-viewer.

Usage

  • Open any supported file directly in Antigravity—Preview Studio registers as the custom viewer (view_html_file) for .html, .htm, .svg, .md, .markdown, .mdx, .tex, .latex, .mmd, .mermaid, .csv, .tsv, .json, .jsonl, .docx, .xlsx, .xls, and .pptx.

  • Ask Antigravity:

    • "Open examples/demo.md in Preview Studio"

    • "Preview https://example.com in Split mode"

    • "Open Preview Studio in the side pane"


Architecture Overview

antigravity-preview-studio/
├── src/
│   ├── types.ts                 # Shared DocFormat, LoadedDocument & format detection
│   ├── server/
│   │   ├── index.ts             # MCP stdio server & tool/resource handlers
│   │   ├── loader.ts            # Local/URL loading, asset inlining & preview bridge
│   │   ├── office.ts            # Pure-JS DOCX, XLSX/XLS, and PPTX parsers/serializers
│   │   └── openWith.ts          # Native macOS/Windows/Linux Open With & Finder launcher
│   └── ui/
│       ├── template.html        # App shell HTML template
│       ├── styles.css           # Native light/dark styling & renderer typography
│       ├── app.ts               # Controller, toolbars, symbol picker, sync & export
│       ├── editor.ts            # CodeMirror 6 integration
│       └── renderers/           # Offline renderers (html, markdown, latex, mermaid, svg, data, office)
├── scripts/
│   ├── build.mjs                # esbuild bundler + inline CSS/JS/KaTeX woff2 embedding
│   ├── install.mjs              # Installs plugin to ~/.gemini/config/plugins/html-viewer
│   ├── gen-office-demos.mjs     # Generates examples/demo.{docx,xlsx,pptx}
│   └── test.mjs                 # Automated build, MCP handshake & format tests
├── examples/                    # Sample files for every supported format
└── .github/workflows/ci.yml     # Node 20 CI pipeline

License

MIT

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
      Native macOS markdown previewer. Opens files and renders markdown content in a live preview window directly from your AI tools.
      39
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Converts PDFs, Office files, spreadsheets, emails, audio, and more to Markdown locally, enabling AI assistants to read and process them without cloud upload.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Live markdown preview for LLM agents. Call a single tool to watch a markdown file and it opens a browser UI that streams rendered updates, changes, and history.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local MCP server that lets agents read PDF, DOCX, PPT, Excel, HTML, EPUB, email and 40+ other formats as Markdown. Read PDF, Office, HTML, EPUB, email and 40+ formats as Markdown; outline, search and diff documents inside allowlisted folders. Writing documents from Markdown and editing DOCX, PPTX, HTML and Markdown files in place are opt-in. All file access is confined to allowlisted folders.
      5
      170 PyPI
      34
      MIT