svg-to-video
This MCP server converts animated SVGs into videos or animated images and can inspect SVG animation parameters.
Render raw SVG XML into MP4, WebM, MKV, MOV, aPNG, or GIF with Base64 in-band media delivery.
Control FPS, duration, resolution, scale, hold time, transparency, background/keying color, bitrate, CRF, and quality.
Support transparent output for WebM, GIF, aPNG, and MOV.
Inspect an SVG to detect CSS keyframe animations, estimate duration, and extract viewBox dimensions before rendering.
Provides tools to analyze SVG files for CSS keyframe animations, estimate duration, extract viewBox dimensions, and render animated SVGs into video (MP4, WebM, MKV, MOV) or animated image (aPNG, GIF) formats with optional background transparency.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@svg-to-video Convert this CSS-animated SVG to an MP4 with a transparent background"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SVG to Video
A high-fidelity tool to transform your CSS- and SMIL-animated SVGs into high-quality videos (MP4, WebM, MKV, MOV) or lightweight animated formats (aPNG, GIF) with perfect alpha-channel transparency directly in your browser or via CLI/MCP server.
🌟 Why SVG to Video?
🎨 Visual Fidelity & Formats
Transparent Backgrounds: Export your animations with a full alpha channel using WebM or aPNG, and optimized indexed transparency with GIF89a. Perfect for overlays in video editing tools or web use.
Universal Animated Formats: Beyond video, generate lightweight Animated PNGs (aPNG) and GIFs with deterministic 8x8 Bayer ordered dithering to eliminate temporal fluttering on animated gradients, with full control over background transparency.
Frame-Accurate: Our engine scrubs both the Web Animations API and native SVG SMIL, ensuring every frame is captured exactly as rendered.
⚙️ Granular Control & Ergonomics
Granular Quality & Rate Control: Fine-tune output file size and visual fidelity with custom target bitrates (
--bitrate), Constant Rate Factor (--crf 0-63), and quality percentages (--quality 1-100) across video (MP4, WebM, MKV, MOV) and animated formats (GIF color quantization, aPNG compression).Configurable Animation Looping: Full control over animation playback loops for animated formats (GIF, aPNG) and live preview—toggle infinite looping or single-play export across Web Studio, CLI (
--loop <count>,--no-loop), and MCP integrations.Copy to Clipboard: Instant export to Base64 Data URL—copy your video and embed it directly into your HTML, CSS, or JS code without manual downloads. Perfect for rapid prototyping and developers.
Metadata Injection: Support for custom titles and comments across video (MP4, WebM, MKV, MOV) and animated image (aPNG, GIF) formats.
🤖 AI Agents & Architecture
AI Agent Native: Native Model Context Protocol (MCP) server and Agent Skill (
SKILL.md) support indexed on the official MCP Registry (mcp.json) and hosted on interactive online playgrounds across HuggingFace Spaces and Glama.ai.Privacy-First: The Web Studio runs entirely in your browser using WebCodecs and WebAssembly—your SVG files never leave your computer.
Multi-Surface Flexibility: Whether you need an accessible Web Studio for quick conversions or a powerful CLI tool for batch automation and CI/CD pipelines, this project has you covered.
Related MCP server: text2animate
🚀 Getting Started
Choose the entry point that matches your needs:
Web Studio: The easiest way to convert SVGs to video, high-fidelity aPNG, or optimized GIF in your browser without any installation.
CLI / Docker Tool: For batch processing, server-side automation, and CI/CD integration.
AI Agent & MCP Server: For Claude Desktop, Cursor, Antigravity, and autonomous LLM workflows.
Interactive MCP Playgrounds: Explore tool schemas and test SVG conversions online via HuggingFace Spaces and Glama.ai.
🌐 Web Studio
Our Web Studio is a serverless, client-side rendering tool. It runs entirely in your browser using WebCodecs and custom browser encoders—featuring 16-bit rgb565 quantization and 8x8 Bayer dithering for flicker-free GIFs—ensuring your SVG files never leave your computer for absolute privacy. The interface is optimized for high-productivity on screens starting from 720p resolution.
Automated Demo: The demo video at the top of this README is automatically generated and updated by our CI/CD pipeline using Playwright and Driver.js, ensuring it always reflects the latest UI changes.
Privacy Note: We use Umami Analytics to collect anonymous usage data across our Web Studio, CLI, and MCP server interfaces (e.g., number of conversions and format usage) to help us improve the tool. This tracking is cookie-less, respects standard "Do Not Track" settings (set the
DO_NOT_TRACK=1environment variable to opt out), and never collects personal information or SVG contents. See docs/ANALYTICS.md for details.
Explore our Visual Gallery (Storybook) to see how the engine handles complex CSS, SMIL, and fonts.
Quick Start
Open the Web Studio.
Drag and drop your
.svgfile, or test the engine instantly with 1-click built-in samples.Adjust resolution, duration, and FPS.
Select your format, toggle Transparent Background if needed, and ensure High-Fidelity Capture is enabled for best results.
Click Export.
🚀 CLI / Docker Tool
For automated or batch processing, use the CLI tool. It is built to run in a headless environment, making it perfect for CI/CD pipelines or server-side automation.
Quick Start
Ensure Node.js is installed. Chrome/Chromium is managed automatically by Puppeteer (override via PUPPETEER_EXECUTABLE_PATH). System FFmpeg is used if available, or a bundled static fallback is automatically used (override via --ffmpeg-path <path> or the FFMPEG_PATH environment variable).
# Node.js (auto-detected duration)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir
# Node.js (explicit duration & GIF output)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir -d 5 --format gif --transparent
# Node.js (custom resolution dimensions e.g. vertical 1080x1920)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir --resolution 1080x1920
# Node.js (custom bitrate, CRF, and quality)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir --bitrate 5M --crf 18 --quality 80
# Node.js (animated PNG output with play-once / no loop)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir -d 5 --format apng --no-loop
# Docker (zero local dependencies; requires --shm-size=2gb for Chromium rendering; add :Z to -v for SELinux / Fedora)
docker run --rm --shm-size=2gb -e PUPPETEER_ARGS="--no-sandbox" -v $(pwd):/data:Z gehdoc/svg-to-video /data/input.svg 60 /data/out-dir -d 5 --format gifSee docs/CLI.md for full usage, arguments, and options. For local building and source execution, see CONTRIBUTING.md.
🤖 AI Agent & MCP Integration
Connect svg-to-video to AI Assistants (Claude Desktop, Cursor, Antigravity, AutoGPT) via Model Context Protocol:
Add to
mcpServersconfig:{ "mcpServers": { "svg-to-video": { "command": "npx", "args": ["-y", "-p", "@gehdoc/svg-to-video", "svg-to-video-mcp"] } } }Prompt your AI Assistant:
"Convert
examples/example.svginto a 60fps transparent WebM video."
🪐 Interactive MCP Playgrounds
Test and explore the Model Context Protocol (MCP) server directly in your browser without local installation before configuring local agents or Docker containers:
🤗 HuggingFace Space Playground: Test SVG conversions live in an interactive web client with zero local installation.
🪐 Glama.ai MCP Playground: Test, inspect tool schemas, and deploy containerized MCP endpoints directly in your browser.
See docs/MCP.md for full setup instructions, tool schemas, Docker execution, and agent prompting guides.
🔗 Official Package Distributions
📦 npm Package:
@gehdoc/svg-to-video🐳 Docker Hub Image:
gehdoc/svg-to-video🌐 Web Studio:
gehdoc.github.io/svg-to-video/🤖 MCP Registry:
io.github.GehDoc/svg-to-video🤗 HuggingFace Space:
GehDoc/svg-to-video-mcp🪐 Glama.ai MCP Server:
glama.ai/mcp/servers/GehDoc/svg-to-video
📦 Quick Installation & Execution
# Run on-demand via npx (no global installation required)
npx -y -p @gehdoc/svg-to-video svg-to-video input.svg 60 ./out-dir
# Install globally via npm
npm install -g @gehdoc/svg-to-video
# Pull official Docker image from Docker Hub
docker pull gehdoc/svg-to-video:latest🛠 Technical Details
For a deep dive into the rendering engine, algorithms, and infrastructure, see docs/ARCHITECTURE.md.
The tool works by isolating the SVG, scrubbing both the Web Animations API and native SVG SMIL DOM, and capturing frames via WebCodecs or FFmpeg.
❓ FAQ
Common questions about privacy, how frame scrubbing works, CI/CD automation, and transparency support are answered in docs/FAQ.md.
🤝 Contributing
Contributions are welcome! This project follows a Spec-Driven Development (SDD) workflow to ensure clear requirements and high quality. Please open an issue or pull request.
Check out our Active Roadmap to see what we're working on next.
For instructions on contributing, build commands, security standards, and the technical roadmap, please see CONTRIBUTING.md.
💖 Support the Project
If you find this tool helpful, please consider supporting its development:
⭐ Star svg-to-video on GitHub to help other creators and developers discover the tool.
💖 Sponsor me on GitHub to directly fuel development:
Your support directly fuels development and helps keep this tool free, secure, and privacy-first. Thank you!
📜 License
This project is licensed under the MIT License.
Available Tools
2 toolsinspect_svg_animationA
Analyze an SVG file or raw SVG content to detect CSS keyframe animations, estimate duration, and extract viewBox dimensions. Call this tool first before rendering to discover animation parameters and calculate optimal resolution.
Inputs: svgContent (required).
render_svg_to_videoA
Render an animated SVG (from raw SVG code or file path) into a high-quality video (MP4, WebM, MKV, MOV) or animated image (aPNG, GIF) with in-band Base64 media delivery. Use this tool when you need to convert animated SVG graphics into video or image files. First use inspect_svg_animation to detect duration and dimensions if unknown. Specify svgContent for raw XML input or svgFilePath for local files. Pass transparent: true for WebM/GIF/aPNG transparency.
Inputs: svgContent (required), crf, fps, hold, +9 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: inspect_svg_animation analyzes animation metadata, while render_svg_to_video performs conversion. The descriptions explicitly establish a first-then-render workflow, leaving no real ambiguity about which tool to use.
Both names use snake_case and follow a verb_svg_noun pattern: inspect_svg_animation and render_svg_to_video. The naming is predictable and descriptive, with no mixed conventions.
Two tools is slightly below the typical 3-15 range, but both earn their place in this narrow conversion server: one inspects SVG animation parameters and one renders output. The set is minimal but not obviously over- or under-scoped.
The core workflow is covered: inspect animation metadata and render to video or animated image formats. Minor gaps exist around broader animation inspection coverage or batch/status handling, but agents can work around them for the stated purpose.
Maintenance
Related MCP Connectors
Render AI-written HTML animations to MP4/GIF with music, voiceover and captions.
Create AI animations and export transparent sprite sheets, alpha video, frames, and game assets.
Video, audio, and image processing for AI agents: convert, transcribe, upscale - 150+ operations.
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates — from your AI agent.
Related MCP Servers
- AlicenseAqualityBmaintenanceRender HTML/CSS/JS/SVG animations into high-quality MP4 videos. Exposes render tools to AI agents using Playwright (Chromium) and FFmpeg, running locally or remote.22MIT
- AlicenseAqualityDmaintenanceTurns plain-language descriptions into animated SVGs with a live preview and conversational editing.81MIT

SVGator MCP Serverofficial
FlicenseNot gradedqualityCmaintenanceEnables AI assistants to browse, inspect, edit, create, and export SVGator projects, handling everything from simple color edits to complex animated exports.5-
Neonix MCPofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to create, edit, preview, and export motion-video projects from HTML and CSS as MP4 files through the Model Context Protocol.MIT