Driving Homotope from an AI agent

Updated on

An agent connected to Homotope’s MCP server (https://homotope.app/mcp) turns an image into a print-ready or cut-ready file in at most 3 jobs: suggest the preset, compute, look at the preview and run the cut check, then correct with the advice the check returns, and stop when the check passes and the zoomed preview no longer shows the defect the user named.

For an agent: the same text as Markdown, /en/agents.md (in French: /agents.md).

Coffee roaster logo grabbed from a website, as a noisy compressed JPEG: a coffee bean on a dark disc inside a thin ring, capital wordmark. JPG · 900 × 640 px
The same logo traced to SVG by Homotope: three clean flat colours, crisp capitals. Engine SVG
900 × 640 px noisy compressed JPEG logo and the SVG produced by the engine, Logo preset, “Number of colours” set to 3, untouched: the JPEG noise and blocks are gone, the disc and its ring stay circles and the capitals stay crisp.
×6 detail: the accented E of the wordmark: JPEG noise and blocks, clean SVG edges. Drag the slider to compare; hover over the image or hold your finger on it to move the magnifier.
Try it with your image Open this example in the workshop

Who this is for

This page is the playbook for an AI agent (Claude Code, Claude, ChatGPT, Gemini CLI, or a script) that uses Homotope through its MCP server at https://homotope.app/mcp. The raw text is at /en/agents.md. Every vectorize_image call is a job counted against the user’s account; every other tool is free. So look before you compute again.

The loop in four steps

  1. Suggest. Call suggest_preset with the image (image_base64, image_url or source_job_id). It is free and computes nothing. Or pass "preset":"auto" to vectorize_image.
  2. Compute. Call vectorize_image with that preset. For a sticker, a window sticker or a die-cut print, add cut_contour with the real width_mm (its margins are in mm at that size). It answers at once with a job_id: poll get_job until done (or failed). This is the only step that counts.
  3. See and check. Call get_preview ("side":"both" compares with the original; zoom frames a box of the cut check or the part the user complained about), then check_cut with the real width_mm (and the printer’s safety_mm and spacing_mm if they gave them). Read report.blocking, printer.status and advice.
  4. Correct with the advice. Take the first advice entry and compute again from the same source (source_job_id: no new upload), then go back to step 3. How to apply each kind of advice is below.

Applying an advice entry

When to stop

Limits

What each tool costs the account

Production files and the printer check

Example: a 140 × 40 cm window sticker

The user wants a window sticker 1,400 mm wide with a cut contour and 2 mm bleed. Two jobs here; a third only if the second check still fails.

suggest_preset    {"image_url":"https://…/vitrine.png"}
      vectorize_image   {"image_url":"https://…/vitrine.png","preset":"auto",
                         "cut_contour":{"width_mm":1400}}
      get_job           {"job_id":"<id>"}            (until "done")
      get_preview       {"job_id":"<id>","side":"both","width":1024}
      check_cut         {"job_id":"<id>","width_mm":1400}
      vectorize_image   {"source_job_id":"<id>","preset":"<preset_suggested.preset>",
                         "cut_contour":{"width_mm":1400,"margin_mm":<advice value>}}
      check_cut         {"job_id":"<id2>","width_mm":1400}
      get_result        {"job_id":"<id2>","format":"pdf","width_mm":1400,"bleed_mm":2}

Connecting

Claude Code: add the server, then sign in from /mcp (OAuth, the user’s Homotope account). A script uses an API key in the Authorization: Bearer header; never write a key into a prompt, a file or a repository.

claude mcp add --transport http homotope https://homotope.app/mcp

Frequently asked questions

Does an agent see the result?

Yes: get_preview returns a PNG preview of a finished job, the result, the original image or both side by side, with a zoom on a defect. It is free and nothing is counted.

How many jobs does the loop cost?

3 at most per image, often two. Only vectorize_image counts (a trial of the month, the Pro quota or a credit); the suggestion, the preview, the check and the advice are free.

Does Homotope apply a setting on its own?

No. The check returns advice (the setting, the direction, the value); the agent decides whether to compute again, and every job goes through the user’s account.

Can Claude Code follow this playbook?

Yes: connect the MCP server (https://homotope.app/mcp) and give it this text, or its raw Markdown (/en/agents.md).

Are production exports counted?

Through an agent, the formats of a finished job (PDF, DXF, EPS, separations, contour) are included in the job. In the web app: Production exports (DXF, EPS, PDF, separations): 2 free per month with an account, unlimited with Pro; without Pro, 1 credit each beyond those 2.

More guides

Try it with your image