loading…
Search for a command to run...
loading…
Enables creating and iterating on animated SVG diagrams from text input, photos of sketches, and YAML specifications, with support for shapes, connections, SMIL
Enables creating and iterating on animated SVG diagrams from text input, photos of sketches, and YAML specifications, with support for shapes, connections, SMIL animations, and file output.
An MCP server for creating animated SVG diagrams. You can create a diagram from text input, photos of sketches and YAML specifications.
You don't normally need to use YAML; just tell Claude code what you want, upload photos of sketches, and then iterate until you've got what you want.
You can see some sample inputs and outputs on the Demo Page
By default, the MCP server does not allow writing files to your filesystem. To enable file output (SVG, PNG, or video), create a configuration file at ~/.config/mcp-svg-animator/config.yaml:
file_output:
allowed:
- path: "~/diagrams"
types: [svg, png, webm]
- path: "/tmp/svg-animator/**"
types: [svg, png]
- path: "~/projects/**/output"
types: [svg, png, webm]
Configuration options:
path: Directory where files can be written. Supports ~ expansion and glob patterns (* for single level, ** for recursive).types: List of allowed file types (svg, png, webm).Files in subdirectories of allowed paths are also permitted.
pip install mcp-svg-animator
# Install Playwright browsers (for video generation)
playwright install chromium
Register the MCP server globally:
claude mcp add --scope user svg-animator -- python -m mcp_svg_animator
Then in any Claude Code session, ask Claude code to create animations:
"Create an animated SVG of a red circle that pulses"
See docs/usage.md for more details.
You don't need to explicitly invoke these. Ask Claude Code to create the animation you describe, and it will invoke the relevant tools.
| Tool | Description |
|---|---|
create_svg_from_yaml |
Generate SVG from YAML specification. Optional output_path writes SVG to file; optional png_path generates a PNG preview. |
create_animation_video |
Record SVG animation to .webm video |
# Clone the repository
git clone https://github.com/romilly/mcp-svg-animator.git
cd mcp-svg-animator
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements-test.txt
# Install Playwright browsers (for video generation)
playwright install chromium
# Run tests
pytest
# Type checking
pyright src/
See the examples/ directory for sample YAML files and generated SVGs:
demo.yaml - Basic shapesstick_figure.yaml - Static stick figurestick_figure_waving.yaml - Animated wavingcurves.yaml - Bezier curves and arcsmeeting.yaml - Two figures, one walks to meet the otherconnection_demo.svg - Architecture diagram using connection elementsballoon_friends.svg - Animated stick figures with stretching lineThis project uses the following open source packages:
MIT
Run in your terminal:
claude mcp add mcp-svg-animator -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.