svg2img-mcp-wrapper
v1.0.2
Published
MCP STDIO wrapper for svg2img library
Readme
SVG2Image MCP Server
An MCP server that provides tools to convert SVG content into PNG or JPEG images using the svg2img library.
Prerequisite
- Node.js >= 16
Build
npm install
npm run buildConfiguration
To use with MCP client, add this to your MCP configuration:
{
"mcpServers": {
"svg2img": {
"command": "npx",
"args": ["svg2img-mcp-wrapper"]
}
}
}Tools
convert_svg
Converts an SVG string to an image and saves it to the filesystem.
Inputs:
svg(string, required): The SVG content string.outputPath(string, required): Absolute path to save the output image (e.g./tmp/image.png).format(string, optional): 'png' (default) or 'jpeg'/'jpg'.width(number, optional): Target width.height(number, optional): Target height.quality(number, optional): JPEG quality (0-100), default 75.
Output: Returns a text message confirming success.
