Homotope

app.homotope由 homotope.app 发布官方发布者v1.0.0更新于 Oct 31, 2026

Vectorize images to SVG, PDF, EPS or DXF, and check a DXF before cutting.

已验证Streamable HTTP可网页运行开发者工具媒体与设计

概览

AI 生成的概览

Homotope 是一个托管型 MCP 服务器,让助手把位图矢量化成 SVG、PDF、EPS 或 DXF,并对 DXF 做切割前检查。

可以做什么
  • 把 PNG 或 JPEG 图像矢量化成干净的 SVG,可用标志、插画、像素画、线稿、黑白、照片或中心线等预设
  • 把生成的 SVG 转换成 DXF、PDF 或 EPS,包括按颜色分层和分色
  • 对矢量结果做切割就绪检查,提示过小的孤岛、过近的边和节点数量
  • 返回调色板颜色以及路径、节点等统计信息
适用场景
适合让助手把位图标志、手绘图或照片转成可编辑的矢量图,或为绘图仪、激光切割、雕刻、刺绣准备矢量文件并确认可以安全切割。
运行要求
需要访问 homotope.app 上的远程 MCP 端点(streamable HTTP),并通过 OAuth 登录授权。未声明任何环境变量或请求头。
安装前请注意
托管服务需要通过 OAuth 授权你的账号;README 提到可选的服务器端处理,因此经托管连接器提交的图像可能离开本机,尽管底层引擎本身在本地运行。生成的文件在切割或加工前应人工检查。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Homotope,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/app.homotope%2Fhomotope/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "homotope": {
      "type": "http",
      "url": "https://homotope.app/mcp"
    }
  }
}

README

@homotope/engine

This is the engine of Homotope, an image vectorizer that runs in the browser: nothing is uploaded. Try it in the workshop (free, no account needed for SVG and PNG).

Raster-to-vector engine in pure TypeScript: turns a PNG or JPEG (any RGBA pixel buffer) into a clean SVG, and from that SVG into DXF, PDF or EPS. Released under the MIT license.

What this package is not: it has no editor, no server, no REST API, no MCP server and no printer checks; those live in the hosted service. The npm package is frozen at 0.2.0: what it contains is complete and usable on its own.

  • No DOM, no runtime dependencies. The core runs unchanged in a Web Worker, in the main thread and in Node. Pixel data stays on the machine: nothing is uploaded anywhere.
  • Topology first. The image is quantized in OKLab, segmented into regions, and every shared boundary is fitted once: two neighbouring shapes never overlap and never leave a gap. Holes are kept (an "O" stays an "O").
  • Presets for logos, illustrations, pixel art, line art, black & white, photos, and a centerline mode that traces strokes as single open paths (plotters, engraving, embroidery).
  • Fabrication exports: DXF (layers per colour, shared edges cut once), PDF, EPS, colour separations, and a cut-readiness check (tiny islands, too-close edges, node counts).
  • An alternative to Potrace: no GPL code, full colour, exact shared borders.

Install

bash
npm install @homotope/engine# Node only, to decode PNG/JPEG files (optional peer dependencies):npm install pngjs jpeg-js

Requires an ES2022 runtime (Node ≥ 22, any current browser). ESM only.

Entry points

ImportWhatDependencies
@homotope/enginevectorize, presetOptions, PRESET_NAMES, all typesnone
@homotope/engine/exportconvertSvg (SVG → PDF, DXF, EPS), exportLayers, sceneFromSvgnone
@homotope/engine/cutcheckcheckSvg, simplifySvg: cut-readiness report for cuttersnone
@homotope/engine/nodedecodePng, decodeJpeg, encodePng, encodeJpegpngjs, jpeg-js

Browser bundles only receive what they import: the core never imports pngjs or jpeg-js.

Node example

ts
import { readFileSync, writeFileSync } from 'node:fs';import { vectorize, presetOptions } from '@homotope/engine';import { convertSvg } from '@homotope/engine/export';import { decodePng } from '@homotope/engine/node';
const image = decodePng(new Uint8Array(readFileSync('logo.png')));const result = vectorize(image, presetOptions('logo'), {  onProgress: (e) => process.stdout.write(`\r${e.stage} ${Math.round(e.progress * 100)}%`),});
writeFileSync('logo.svg', result.svg);writeFileSync('logo.dxf', convertSvg(result.svg, 'dxf'));console.log(`\n${result.palette.colors.length} colours, ${result.stats.paths} paths`);

Browser example (Web Worker)

vectorize is synchronous on purpose: run it in a worker so the page stays responsive. Its input is any ImageData-like object { width, height, data: Uint8ClampedArray } (RGBA, not premultiplied).

ts
// main.tsconst bitmap = await createImageBitmap(file);const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);const ctx = canvas.getContext('2d')!;ctx.drawImage(bitmap, 0, 0);const { width, height, data } = ctx.getImageData(0, 0, bitmap.width, bitmap.height);
const worker = new Worker(new URL('./vectorize.worker.ts', import.meta.url), { type: 'module' });worker.onmessage = (e: MessageEvent<{ svg: string }>) => {  const url = URL.createObjectURL(new Blob([e.data.svg], { type: 'image/svg+xml' }));  document.querySelector<HTMLImageElement>('#preview')!.src = url; // or offer it as a download};worker.postMessage({ width, height, data }, [data.buffer]);
ts
// vectorize.worker.tsimport { vectorize, presetOptions, type RasterImage } from '@homotope/engine';
self.onmessage = (e: MessageEvent<RasterImage>) => {  const { svg } = vectorize(e.data, presetOptions('illustration'));  self.postMessage({ svg });};

Cancellation is cooperative: pass { cancel: { cancelled: boolean } } as the third argument (for example backed by a SharedArrayBuffer); vectorize then throws a CancelledError between and inside stages.

Presets

presetOptions(name) returns a full, independent options object that you can tweak.

PresetFor
logoFlat colours, crisp corners, straight lines kept straight
illustrationUp to 32 colours, smoother curves, light gradients, stacked shapes
pixel-artExact pixel grid, no curves, zero error
line-artInk drawings and text: two colours, filled shapes
centerlineStrokes traced as single open paths (plotter, laser engraving)
black-whiteTwo colours from an automatic (Otsu) threshold
photoUp to 64 colours, denoising, small regions absorbed, stacked shapes
ts
import { presetOptions, vectorize } from '@homotope/engine';
const options = presetOptions('logo');options.quantize.colors = 4; // fixed number of colours instead of 'auto'options.export.precision = 1; // decimals in path dataoptions.export.mode = 'stacked'; // fewer nodes: shapes stacked instead of cut outconst { svg } = vectorize(image, options);

Every option is typed and documented in VectorizeOptions (preprocess, quantize, segment, fit, export, centerline).

SVG output

  • viewBox in the pixel coordinates of the original image, cubic Béziers, one <path> per colour by default (export.mergeByColor).
  • export.mode: 'cut' (default): every region is an exact path with its holes (fill-rule="evenodd"), no overlap; 'stacked': shapes stacked by depth, fewer nodes.
  • Transparent pixels (preprocess.alphaMode: 'keep') produce no path.
  • result.palette lists the colours (sRGB and OKLab, pixel counts); result.stats the number of paths and nodes; result.timings the time spent per stage.

Hosted version and API

homotope.app runs this engine in the browser with a visual editor (palette, presets, before/after), plus optional server processing, a REST API and an MCP server for AI assistants: see the API documentation.

Development

bash
npm installnpm test           # Vitest, no DOMnpm run typechecknpm run lintnpm run eval       # renders every fixture and measures the error (Resvg)npm run build      # dist/ (ESM + .d.ts)

See CONTRIBUTING.md.

License

MIT.

来源:README.md,提交 4a43cb4

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v1.0.0最新Oct 31, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分