What is svg2vector-mcp?
svg2vector-mcp is an MCP server with a single tool, convert_svg_to_vector. It reads an SVG from a local path or URL and writes Android Vector Drawable XML, turning rectangles, circles, polygons and lines into paths while keeping stroke, fill and opacity settings.
svg2vector-mcp is a Model Context Protocol server for one job: converting SVG files into Android Vector Drawable XML. Its converter is based on the Android SVG to VectorDrawable code from the Android Open Source Project.
An agent calls convert_svg_to_vector with an input path or URL and an output path. The result is an XML file targeting Android API 21 and above, ready to drop into a drawable folder.
What changes in your agent's output
- Icons arrive as vector XML in an Android project.
- Shapes such as rect, circle, polygon and line become path elements, and groups are handled.
- Stroke color, width, cap, join, fill and opacity values carry across, along with CSS styles and presentation attributes.
- Unsupported elements produce warnings and the conversion continues, so you can see what was left out.
The Figma workflow
The README describes a three step flow: export SVG assets from Figma with Figma MCP, convert them with this server, then use the generated XML in the Android project. It aims to keep design and Android assets consistent.
Who svg2vector-mcp is for
Best for
- Android developers who receive icons as SVG and want an agent to produce drawable XML.
- Teams already reading designs through the Figma MCP server who need one extra conversion step.
- People who track icon quality with an icon system skill and want conversion done the same way every time.
Not for
- Artwork with text, gradients, filters, animations, embedded images or clipping paths. The README lists these as not supported.
- SVGs that use ellipses or polylines. Convert them to circles and polygons first, as the README advises.
- Anything outside Android. The only output format is Vector Drawable XML.
Use it with UiChemy
Vector Drawables are native Android assets, so UiChemy is a different path. UiChemy targets WordPress: Figma to WordPress converts designs, and Composer edits the result in Elementor or Gutenberg. Click Get Started on uichemy.com.
Connect svg2vector-mcp: Convert SVG to Android Vector Drawable XML to your AI client
npm install -g svg2vector-mcpInstall the package
Run npm install -g svg2vector-mcp. To build from source instead, clone the repository, run npm install, then npm link.
Add the server
Add the mcpServers entry above to your MCP client configuration. The README shows claude_desktop_config.json on macOS and Windows as the example.
Use the source path if needed
When installed from source, set the command to node with the absolute path to src/index.js as the argument.
Verify it
Ask the agent to convert a small SVG to an XML file in a drawable folder, then open the output and confirm it starts with a vector element.
Client configuration
{
"mcpServers": {
"svg2vector": {
"command": "svg2vector-mcp"
}
}
}Endpoints and ports
SVG file path or URLLocal files and remote URLs both workAndroid Vector Drawable XMLCompatible with Android API 21 and aboveWhat you can do with it
- Local files and URLssvgPath accepts a path on disk or a remote URL, so downloaded and hosted icons both work.
- Shapes become pathsRectangles, circles, polygons and lines are converted to path elements, and groups are handled.
- Stroke and fill preservedStroke color, opacity, width, cap and join, plus fill, fill opacity and overall opacity are carried over.
- CSS and attributesCSS styles and presentation attributes in the SVG are handled during conversion.
- Figma friendlySVGs exported through Figma MCP are a documented input, with a sample output path in an Android res drawable folder.
- Clear failure messagesTroubleshooting notes cover a missing svg root and a missing viewBox, and unsupported elements log warnings instead of stopping.
- Tested converterThe project includes unit and integration tests covering color utilities, the path builder, the parser and the converter.
Tools it exposes
convert_svg_to_vector
Converts an SVG file to Android Vector Drawable XML. Takes svgPath, a local path or URL, and outputPath, where the XML is written.
Frequently asked questions
What is svg2vector-mcp?
It is an MCP server that converts SVG files to Android Vector Drawable XML. An AI coding agent calls its single tool with a source path or URL and an output path, and the server writes a drawable that targets Android API 21 and above.
How do I install svg2vector-mcp?
Run npm install -g svg2vector-mcp, then add an mcpServers entry whose command is svg2vector-mcp. To use source instead, clone the repository, run npm install and npm link, or point node at src/index.js with an absolute path.
Which SVG features does it support?
Path, rect, circle, polygon, line and g elements, with stroke, stroke-opacity, stroke-width, stroke-linecap, stroke-linejoin, fill, fill-opacity and opacity attributes. Text, gradients, filters, animations, ellipses, polylines, embedded images and clipping paths are listed as not supported.
What does the tool need as input?
A required svgPath, which can be a local path or a URL, and a required outputPath for the generated XML. The SVG needs a valid svg root element and either a viewBox or both width and height attributes.
Does it work with Claude?
The README uses Claude Desktop as its configuration example, with the config file path for macOS and Windows. Any MCP client that can run a local command should be able to use the same entry, though the README only documents that example.
Can it convert icons from Figma?
Yes, as a second step. Export the SVG with Figma MCP, then convert it here. To read the design side first, see the Figma MCP page or the Framelink Figma server. Remember that gradients and clipping paths will not survive conversion.
What license does it use?
GitHub does not detect a license for the repository, and the README's license section says MIT. Confirm the terms in the repository before using it commercially. The last push was January 19, 2026, and it has 11 stars.


