A newer version of the Gradio SDK is available:
6.5.1
metadata
title: Any2SVG
emoji: 🎨
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 5.6.0
app_file: app.py
pinned: false
license: mit
short_description: Convert raster images to SVG vector graphics
tags:
- image-processing
- svg
- vectorization
- mcp-server
Any2SVG - Image to SVG Vectorization Tool
A Gradio 6 application that converts raster images (PNG, JPG, WebP, etc.) to SVG vector graphics. Deployable as a Hugging Face Space and usable as an MCP server.
Features
- Multi-format Support: Accepts PNG, JPG, JPEG, WebP, BMP, GIF, TIFF
- High-Quality Vectorization: Uses vtracer for professional-grade conversion
- Configurable Parameters: Control color mode, path precision, and more
- MCP Server Ready: Built-in MCP server support for AI agent integration
- Output Directory Support: Save SVGs to a configurable output directory
Installation
cd any-to-svg
pip install -r requirements.txt
Usage
As a Web Application
python app.py
As an MCP Server
The app automatically exposes an MCP endpoint at:
http://localhost:7860/gradio_api/mcp/sse
Add to your MCP client config:
{
"mcpServers": {
"any2svg": {
"url": "http://localhost:7860/gradio_api/mcp/sse"
}
}
}
Environment Variables
SVG_OUTPUT_DIR: Directory to save generated SVG files (default:./output)GRADIO_MCP_SERVER: Set totrueto enable MCP server mode
Deployment to Hugging Face Spaces
- Create a new Space on Hugging Face
- Upload all files from this directory
- The Space will automatically start as both a web app and MCP server
License
MIT