Vecline — Claude Code MCP server: SVG tracing with measured accuracy
vecline — a local-first toolkit that converts between ten raster formats, traces images to SVG, and renders PDFs and Office files. Every conversion reports its own accuracy and nothing leaves your machine.
MIT ★ 18 updated 2026-08-22
claude mcp add --env VECLINE_SOFFICE=<VECLINE_SOFFICE> --transport stdio vecline -- npx -y veclineWhat vecline does
Vecline converts ten raster formats in both directions and traces artwork to SVG. The difference from most vectorizers is the measurement step: after each run you get SSIM, PSNR and RMSE numbers, and --lossless either returns a bit-exact SVG or exits with an error. No silent near-misses.
Flat artwork — logos, icons, screenshots, pixel art — gets exact geometry. Photographs end up as embedded bitmaps, because a compact set of Bézier curves cannot hold all the information in a photo. Vecline tells you the ratio it measured instead of pretending otherwise.
The core is zero-dependency and CI-proven to bundle for a browser. Rendering Office files requires LibreOffice; set the VECLINE_SOFFICE environment variable to its path, or docx/xlsx/pptx conversion will not work.
What it helps with
- trace a logo to SVG and see the real SSIM value
- render a docx or PDF to an image
- export DXF at a true physical cut size
- verify the SVG lost no pixels after conversion
- build a favicon or sprite sheet from one source
Example prompts for the agent
- Vectorize
logo.pngwith verification and show me the SSIM - Convert
report.docxto PDF through Vecline - Trace
sketch.pngto SVG with real curves, no subpixel offset
How to install vecline
Platform CLI
claude mcp add --env VECLINE_SOFFICE=<VECLINE_SOFFICE> --transport stdio vecline -- npx -y veclineReplace <…> with your own values
Platform CLI
codex mcp add vecline --env VECLINE_SOFFICE=<VECLINE_SOFFICE> -- npx -y veclineReplace <…> with your own values
Config file
{
"mcpServers": {
"vecline": {
"command": "npx",
"args": [
"-y",
"vecline"
],
"env": {
"VECLINE_SOFFICE": "<VECLINE_SOFFICE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"vecline": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"vecline"
],
"env": {
"VECLINE_SOFFICE": "<VECLINE_SOFFICE>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e VECLINE_SOFFICE=<VECLINE_SOFFICE> vecline npx -y veclineReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about vecline
How do I install Vecline in Claude Code?
Run claude mcp add vecline -- npx -y vecline. If you need Office document conversion, add the environment variable: claude mcp add --env VECLINE_SOFFICE=<VECLINE_SOFFICE> --transport stdio vecline -- npx -y vecline.
What does Vecline do?
It converts ten raster formats between each other, traces images to SVG, renders PDFs and Office documents, and assembles images into PDFs. After every conversion it measures accuracy with SSIM, PSNR and RMSE.
How does Vecline compare to potrace and vtracer?
On flat artwork it produces bit-exact output: SSIM 1.0000, zero differing pixels. On a real logo the file is 24 KB versus 60 and 64 from imagetracerjs and vtracer, which only approximate. On photographs it beats all three by 0.05–0.18 SSIM at their default settings.