SVG to PNG MCP Server is an MCP server that converts raw SVG code into PNG raster images using the CairoSVG library. Built with the FastMCP framework and Pillow, it provides a dedicated svg_to_png tool interface that connects directly to local Model Context Protocol clients. Software developers, designers, and AI agent operators use this server to automate graphic conversions without having to manually run external image editing programs. The server accepts SVG input, processes it locally using the cairosvg conversion engine, and writes the resulting PNG files to a designated working directory. It supports asynchronous calls and complete error handling, enabling LLM assistants to generate vector graphics and immediately render them into shareable bitmap formats. Although configured by default to use the fast, lightweight CairoSVG library, the underlying architecture also outlines support for an Inkscape-based fallback when handling complex fonts or advanced vector specifications.
Category: Design, Media & Creative
Tags: cairosvg, graphics, image-conversion, png, svg
bash npx -y @smithery/cli install @longbowzz/svg2png_mcp --client claude 2. Alternatively, clone the repository, set up a Python virtual environment, and install dependencies: bash python -m venv venv source venv/bin/activate pip install -r requirements.txt 3. Copy the configuration template: bash cp servers_config.example.json servers_config.json 4. Add the server entry into your MCP client configuration using absolute paths for both the Python executable and the server script: json { "mcpServers": { "svg2png": { "command": "/absolute/path/to/venv/bin/python", "args": ["/absolute/path/to/svg2png_mcp/src/server.py"] } } } 5. Restart your MCP client such as Claude Desktop or Cursor.Part of MCP Servers
SVG to PNG MCP Server allows compatible MCP clients to convert SVG code into standard PNG image files. It exposes an svg_to_png tool powered by the CairoSVG engine, handles execution asynchronously, and outputs the resulting PNG files into designated local directories.
You can install it automatically for Claude Desktop using Smithery by running npx -y @smithery/cli install @longbowzz/svg2png_mcp --client claude. Alternatively, create a Python virtual environment, install requirements from the repository, and register the absolute paths in your client config.
The server works with any standard Model Context Protocol client that supports local stdio server connections. This includes Cursor, Claude Desktop, and custom MCP clients utilizing the official SDK.
Absolute paths are required for the Python interpreter binary and the server.py file so external MCP clients can reliably launch the process regardless of their current working directory or environment settings.