Trace images to SVG from an AI agent.

pic2svg-mcp gives AI agents and scripts the same tracing engine as this website: an MCP server with one tool, trace_image_to_svg, a command-line tool, and the public trace API both of them call. It needs Node 20 or newer and no account.

How do you use pic2svg from an AI agent?

Add pic2svg-mcp to your MCP client as a local (stdio) server — the configuration is below — and ask the agent to trace an image file. The tool uploads the file to pic2svg's server, writes the SVG next to it and reports the trace mode, path count and size. Tracing is free within a daily allowance per client, and only SVG is produced; PDF, EPS, AI and DXF are downloads on the website's plans.

.png.jpg.webp.gif
Drag images here to trace
Paste:⌘V
Trace preset:Balanced▼

Applies to images you add next — each one traces as it lands.

The SVG download is free — no account needed.

Transparent areas become white shapes, and larger images are scaled down to about 0.6 megapixels before tracing.

Your image is uploaded to pic2svg's own server to be traced. What we keep, and for how long

Other formats, plans and licences

PDF, EPS, AI (EPS-based) and DXF come with a paid plan, and every new account gets 7 days of Pro free. The free plan and Starter carry a personal-use licence; commercial use needs Pro, and resale needs Advanced — see the licence row on the pricing page.

How do you set it up?

Three steps. Nothing to sign up for.

  1. Step 1

    Add the server to your MCP client

    Paste the configuration below into your client's MCP settings (for example its mcpServers file). Any client that can launch a local stdio server works; npx downloads the package on first use.

  2. Step 2

    Ask the agent to trace a file

    For example: "Trace ~/Desktop/logo.png to SVG with the compact preset." The agent calls trace_image_to_svg with the file's path, and optionally a preset, an output path, and whether to return the SVG text itself.

  3. Step 3

    Open the SVG

    By default the SVG is written beside the image as <name>.pic2svg.svg, so an existing <name>.svg is never overwritten. Check it in a browser or a vector editor before using it.

Configuration and commands

MCP client configuration

json

{
  "mcpServers": {
    "pic2svg": {
      "command": "npx",
      "args": ["-y", "pic2svg-mcp"]
    }
  }
}

Command line

sh

npx -y pic2svg-mcp trace logo.png --preset compact --out logo.svg

Prints one line: the path count, trace mode, canvas, size and where the SVG was written.

The API directly

sh

curl -s https://api.pic2svg.com/api/v1/trace \
  -H 'content-type: application/json' \
  -d "{\"fileName\":\"logo.png\",\"preset\":\"balanced\",\"imageBase64\":\"$(base64 < logo.png | tr -d '\n')\"}"

imageBase64 may be raw base64 or a data URL. The response is JSON: svgText, mode, canvas { w, h, paths } and sizeKB.

What are the limits?

The trace API has its own daily allowance, counted per UTC day and separate from the free converter on this website, so agents never use up what visitors share. The current figures are in every response's X-RateLimit-Limit and X-RateLimit-Remaining headers.

LimitValueWhen it is reached
Traces per client per day50 by defaultHTTP 429 with a message and a Retry-After header until midnight UTC; the tool returns the message
Traces per day for all API callers together500 by defaultHTTP 429, as above
Request sizeAbout 45 MBHTTP 413; the file is not traced
Trace resolutionAbout 600,000 pixelsLarger images are scaled down before tracing, never refused for size alone

What happens to your image?

  • It is uploaded to pic2svg

    The file goes to pic2svg's own server (api.pic2svg.com), where the engine traces it. It is not sent to any third-party AI service or vectorizer. Temporary trace files are deleted when the trace finishes; the Privacy Policy has the details. Tell your agent not to send files that must stay on your machine.

  • It is sent as it is

    The website's converter scales an image in the browser and re-encodes it before uploading it, as a lossless PNG for flat artwork or a JPEG for photos; the MCP server and CLI send the file itself, so a photo can trace a little differently than it does on the website.

  • What the trace does and does not do

    Transparency becomes a white background shape, lettering becomes outlined shapes, and only SVG is produced. The guides on this site describe how traces behave in detail.

MCP server and API questions

Is it free?
Yes, within the daily allowance: 50 traces per client by default, with no account. It produces SVG only; the other formats are downloads on the website's plans.
Does it use up the website's free converter?
No. The API keeps its own daily count, separate from the pool the website's anonymous visitors share.
Which MCP clients does it work with?
Any client that can start a local MCP server over stdio. The server answers initialize, tools/list and tools/call, and has no dependencies beyond Node 20.
Can I get PDF, EPS, AI or DXF through the API?
No. Those exports are part of the paid plans on the website, which work in the browser. The API returns the traced SVG.