Inkscape (inksmcp)

io.github.bhanutptv0.3.0更新於 Oct 6, 2026

Create, edit and export SVG graphics with Inkscape: measured layout, templates, export.

已驗證STDIO僅桌面Developer ToolsMedia & Design

概覽

AI 產生的概覽

讓助理透過本機安裝的 Inkscape 建立、編輯並匯出經過量測的 SVG 向量圖形。

功能
此伺服器在內部以樹狀結構保存 SVG 文件,並提供文件、元素、排版、圖表、路徑與輸出等工具。它可以加入形狀、文字、群組、影像與符號,依關係對齊與排版,依資料列重複範本,把頁面分割成格,並繪製會隨物件移動而保持連接的箭頭。邊界框與文字量測由 Inkscape 本身提供,結果可預覽為 PNG,或匯出成 PNG、PDF、SVG、EPS、EMF 等格式。
適用情境
適合讓助理製作海報、示意圖、圖表、平面圖或漫畫頁等真實向量作品,也適合開啟並修改其他工具產生的現有 SVG 檔案。當排版需要精確的文字量測與定位,而非手寫 SVG 時,它更有價值。
執行需求
以 stdio 方式在本機執行,從 PyPI 安裝為 inksmcp,通常以 uvx 啟動,因此需要 uv 等 Python 工具。必須安裝 Inkscape 1.x;若執行檔不在 PATH 或預設安裝位置,可用環境變數 INKSCAPE_PATH 指定路徑。僅支援桌面環境,未宣告身分驗證。
安裝前請注意
伺服器會編輯並寫入 SVG 文件、匯出檔案,因此對現有圖形的變更應先檢查。它也能執行受保護的原始 Inkscape 動作,以及會改變幾何形狀的路徑操作。工具清單每次工作階段約佔用 9k token 的上下文,專案處於 beta 階段,在漸層、圖樣與流動文字方面有已知限制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Inkscape (inksmcp),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

inksmcp

An MCP server that lets AI assistants create, edit and export vector graphics with Inkscape.

[CI] [PyPI] [Python] [License: MIT]

Describe a poster, a diagram, a chart or a comic page to your assistant, and it builds a real SVG document in Inkscape: measured, laid out and exported to PNG or PDF. It can also open drawings made elsewhere and change them.

Made by Claude through inksmcp during field tests, in 13 to 41 tool calls each. The SVG was never edited by hand. The floor plan and the periodic table used a short script to prepare their data.

Why inksmcp

Asking a model to write SVG by hand works for an icon, but it breaks down on real layouts. The model can't measure text, keeps redoing coordinate arithmetic, and can't see what it drew. inksmcp takes that work off the model:

  • Measured, not guessed. Bounding boxes come from Inkscape itself, text included, in the document's own units.
  • Relationships instead of coordinates. align and layout arrange things. place keeps a caption below a title's real glyphs. fit_to sizes a box around its content. connect draws arrows that stay attached when things move.
  • Data-driven. repeat stamps a template per data row (cards, timelines, legends, table rows, character poses). split divides a page into panels or cells. Large data comes from JSON or CSV files, so it doesn't pass through the conversation.
  • Works on existing files. It opens .svg/.svgz drawings from other tools. inspect find locates elements by colour, type, text or symbol. Symbols can be placed from icon libraries.
  • Safe and checkable. Every tool is all-or-nothing. Editing responses warn about overlapping text, and render_preview shows the agent what it drew.
  • Real output. PNG, PDF (optionally with text as paths), plain SVG, EPS, EMF and more, rendered by Inkscape.

Quick start

  1. Install Inkscape 1.x and uv.

  2. Add the server to your MCP client. For Claude Code:

    bash
    claude mcp add --scope user inkscape -- uvx inksmcp

    For Claude Desktop, Cursor and others:

    json
    { "mcpServers": { "inkscape": { "command": "uvx", "args": ["inksmcp"] } } }
  3. Ask: "Using the inkscape tools, make an A5 flyer for a book swap on Saturday at 10:00 in the library garden, show me a preview, then export a PDF."

Details for each OS and client, and troubleshooting, are in getting started.

Tools

AreaTools
Documentsdocument_create, document_open, document_save, inspect (outline, real bboxes, find), inkscape_info
Elementsadd_elements (rect, circle, ellipse, line, polyline, polygon, path, text, group, arrow, image, use), update_elements, delete_elements, import_file, repeat
Arrangementalign, layout, split, connect, z_order, move_to_layer, page_fit, page_resize
Chartsgrid (linear/log graph paper and axes), plot (data series in data values)
Pathspath_operation (union, difference, intersection, combine, stroke to path, ...), run_actions (guarded raw Inkscape actions)
Outputrender_preview (PNG back to the agent), export

See the recipes for how they combine, and the tool reference for every parameter.

How it works

The document lives in the server as an lxml tree, which is the source of truth. Edits are applied there directly. Anything that needs Inkscape (measuring, boolean operations, connectors, rendering, export) goes to one persistent inkscape --shell process, so a call takes milliseconds instead of the ~1 s it takes to start Inkscape. The architecture notes have the details.

Status

inksmcp is beta (0.3). It has been through eleven field tests, in which agents used it for real tasks. The latest one edited files made in other tools. There are 160 tests, and they run against the real Inkscape.

Known limits:

  • It is developed on Windows with Inkscape 1.4.4. CI also runs on Linux and macOS.
  • The tool list costs about 9k tokens of context per session.
  • Gradients and patterns can't be created as style keys yet. They can be applied through raw style when they already exist in the document.
  • SVG 1.2 flowed text can be moved but not edited.

The roadmap lists what's next.

Contributing

Bug reports, field reports ("I asked for X, here's what the agent struggled with") and pull requests are welcome. See CONTRIBUTING.md. The project is built experiment-first: every Inkscape behaviour it relies on is proven by a script in experiments/ and guarded by a test. The development handbook explains the method.

License

MIT. Inkscape is a separate program under the GPL; inksmcp calls it as an external process.

來源:README.md,提交 e80bee0

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.3.0最新Oct 6, 2026