svg-generator-mcp

aloshy-ai/svg-generator-mcp

3.2

If you are the rightful owner of svg-generator-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

SVG Generator MCP Server is an AI-powered server designed to generate high-quality SVG illustrations using FLUX/MFLUX with automatic dependency management.

Tools
4
Resources
0
Prompts
0

SVG Generator MCP Server

CI/CD Pipeline PyPI Version License: MIT Python 3.8+ Node.js 18+

AI-powered MCP server for generating high-quality SVG illustrations using FLUX/MFLUX with automatic dependency management.

Quick Start

šŸš€ One-Command Setup

Install and configure with uvx (recommended):

# Install using uvx (automatically handles all dependencies)
uvx svg-generator-mcp

Add to your MCP client configuration (example for Claude Desktop):

{
  "mcpServers": {
    "svg-generator": {
      "command": "uvx",
      "args": ["svg-generator-mcp"]
    }
  }
}

That's it! The server starts instantly with automatic dependency management.

šŸ Alternative: Direct Python Installation

# Install from PyPI
pip install svg-generator-mcp

# Run directly
svg-generator-mcp

Claude Desktop configuration for pip install:

{
  "mcpServers": {
    "svg-generator": {
      "command": "svg-generator-mcp"
    }
  }
}

Prerequisites

šŸ’” uvx automatically manages dependencies - Node.js deps are installed on first run

Available Tools

Core Tools

  • generate_svg_illustration - Generate SVG illustrations from text prompts
  • optimize_svg - Optimize SVG files for smaller size and better performance
  • list_available_models - List AI models and their status
  • get_generation_history - Get recent generation history

Example Usage

Generate a vector illustration:

{
  "prompt": "A minimalist mountain landscape with geometric trees",
  "style": "vector",
  "width": 1024,
  "height": 512
}

Configuration Options

Parameters for generate_svg_illustration

  • prompt (required): Description of the desired illustration
  • style (optional): "vector", "laser", or "colorful" (default: "vector")
  • width/height (optional): Size in pixels, 64-2048 (default: 512)
  • steps (optional): Quality steps, 1-50 (default: 20)
  • guidance_scale (optional): AI guidance, 1-20 (default: 7.5)
  • seed (optional): Random seed for reproducible results

Development

Getting Started

For contributors who want to modify the server:

git clone https://github.com/aloshy-ai/svg-generator-mcp.git
cd svg-generator-mcp
npm install
npm test
npm run dev

šŸ”„ CI/CD Pipeline

Automated GitHub Actions pipeline ensures code quality and seamless deployment:

  • āœ… Automated Testing - Full test suite on every push and PR
  • šŸ PyPI Publishing - Python packages published to PyPI
  • šŸ—ļø Cross-Platform Support - Works on macOS, Linux, and Windows
  • šŸ”’ Security Scanning - Vulnerability scanning with npm audit
  • šŸ“¦ Automated Releases - Tagged releases trigger production builds

Install the development version: pip install svg-generator-mcp

🧠 How It Works

  1. šŸŽØ Style Analysis - Prompt analyzed for desired visual style and composition
  2. ⚔ AI Generation - FLUX/MFLUX with optimized backends creates high-quality images
  3. šŸ”§ SVG Conversion - Images converted to optimized SVG format
  4. šŸ“„ Delivery - Clean SVG delivered via MCP protocol to your client

šŸ› ļø Tech Stack

  • Backend: TypeScript with clean service layer architecture
  • AI Models: FLUX/MFLUX with architecture-optimized backends (MFLUX for Apple Silicon, FLUX for Intel/AMD)
  • Processing: Sharp for image optimization and SVG conversion
  • Protocol: Model Context Protocol (MCP) with stdio transport
  • Deployment: Python packaging with uvx for automatic dependency management
  • CI/CD: GitHub Actions with PyPI publishing and automated testing

šŸ”§ Troubleshooting

Common Issues

Installation Issues
  • uvx not found: Install with pip install pipx && pipx install uv
  • Python version: Requires Python 3.8+. Check with python --version
  • Node.js missing: Install Node.js 18+ from nodejs.org
  • Permission errors: Try pip install --user svg-generator-mcp instead
MCP Connection Issues
  • Server not starting: Check that both Python and Node.js are in PATH
  • Tool not appearing: Verify MCP client configuration syntax
  • Generation failures: Server runs in demo mode without AI models - this is normal
  • Slow first startup: Node.js dependencies install on first run (1-2 minutes)
AI Generation Issues
  • Demo mode only: Install AI dependencies manually if needed:
    • Apple Silicon: pip install mflux
    • Other platforms: pip install torch diffusers transformers
  • Model download failures: AI features are optional - server works without them

Getting Help

License

MIT

ā–„ā–€ā–ˆ ā–ˆā–‘ā–‘ ā–ˆā–€ā–ˆ ā–ˆā–€ ā–ˆā–‘ā–ˆ ā–ˆā–„ā–ˆ ā–‘ ā–„ā–€ā–ˆ ā–ˆ
ā–ˆā–€ā–ˆ ā–ˆā–„ā–„ ā–ˆā–„ā–ˆ ā–„ā–ˆ ā–ˆā–€ā–ˆ ā–‘ā–ˆā–‘ ā–„ ā–ˆā–€ā–ˆ ā–ˆ