convert_svg_fileLABSCO SUMMARY
The engine fallback chain is the reason it works anywhere.
SVG rasterisation usually fails at install time rather than run time, because Cairo needs a C library that is awkward on Windows. This ships three engines and degrades through them, and get_converter_engine_info tells you where you landed instead of leaving you to guess from a bad-looking PNG. The CJK overlay path is a real fix for a real problem: text that silently disappears in the standard renderers.
What it is
A conversion service built on FastMCP that turns SVG into raster formats. It prefers Cairo for quality and falls back to SVGLib then PIL when Cairo is not installed. The part worth knowing about is the hybrid path: when it detects Chinese characters in the source, it renders the graphics with Cairo or SVGLib and overlays the text with PIL, which is what keeps CJK glyphs from dropping out.
What you get
convert_svg_fileconverts a local SVG, with width, height, scale, quality, background, transparency and engine preference as parametersconvert_svg_stringdoes the same from SVG markup held in memory, with no file to save firstbatch_convert_svg_filesconverts a list of files into one output directory and reports success and failure countsget_svg_file_infoandget_svg_string_infoanalyse a source before conversion — dimensions, complexity, whether it contains Chinese charactersget_converter_engine_inforeports which engines are actually available on this machine and what to install- PNG and ICO keep transparency; JPG does not
Requirements
Python 3.8+ and the package installed from source or from GitHub with pip; extras select the engines — [cairo] for the best rendering, [svglib] for compatibility, [full] for everything. Cairo needs the C library present first, which on Windows means installing the GTK runtime before cairosvg. python -m svg_converter_mcp --check-deps tells you what you actually have. Run it as python -m svg_converter_mcp; stdio, HTTP and SSE transports are all supported. No account, no key — it works on local files.
Setup effort
One command — pip install git+https://github.com/RusianHu/svg-converter-tools-mcp.git -i https://pypi.tuna.tsinghua.edu.cn/simple/
USE CASES
Turning a generated SVG into an image you can paste
Convert the markup straight from memory to PNG with a transparent background.
Making a Windows application icon
Convert the source to ICO at the size you need.
Processing a folder of icons in one go
Batch convert into one output directory and read the success and failure counts.
Finding out why the text vanished from an export
Analyse the source for CJK characters and check which rendering engines are installed.
6 tools
Listed in project docs. Your client may show a different list.
convert_svg_stringbatch_convert_svg_filesget_converter_engine_infoget_svg_file_infoget_svg_string_infoBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
python on PATH
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
{
"mcpServers": {
"svg-converter-mcp": {
"command": "python",
"args": [
"-m",
"svg_converter_mcp"
],
"disabled": false
}
}
}pip
pip install git+https://github.com/RusianHu/svg-converter-tools-mcp.git -i https://pypi.tuna.tsinghua.edu.cn/simple/