
Inkscape (inksmcp)
io.github.bhanutptv0.3.0更新于 Oct 6, 2026
Create, edit and export SVG graphics with Inkscape: measured layout, templates, export.
概览
让助手通过本地安装的 Inkscape 创建、编辑并导出经过测量的 SVG 矢量图形。
- 功能
- 该服务器在内部以树结构保存 SVG 文档,并提供文档、元素、排版、图表、路径和输出等工具。它可以添加形状、文本、组、图像和符号,按关系对齐和布局,按数据行重复模板,把页面拆分为分格,并绘制随对象移动而保持连接的箭头。边界框和文本测量由 Inkscape 本身给出,结果可预览为 PNG,或导出为 PNG、PDF、SVG、EPS、EMF 等格式。
- 适用场景
- 适合让助手制作海报、示意图、图表、平面图或漫画页等真实矢量作品,也适合打开并修改其他工具生成的现有 SVG 文件。当排版需要精确的文本测量和定位,而不是手写 SVG 时,它更有价值。
- 运行要求
- 以 stdio 方式在本地运行,从 PyPI 安装为 inksmcp,通常用 uvx 启动,因此需要 uv 等 Python 工具。必须安装 Inkscape 1.x;若可执行文件不在 PATH 或默认安装位置,可用环境变量 INKSCAPE_PATH 指定路径。仅支持桌面环境,未声明身份验证。
安装
在 SourceWeft 中
- 打开 控制台中的 Inkscape (inksmcp),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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.
alignandlayoutarrange things.placekeeps a caption below a title's real glyphs.fit_tosizes a box around its content.connectdraws arrows that stay attached when things move. - Data-driven.
repeatstamps a template per data row (cards, timelines, legends, table rows, character poses).splitdivides 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/.svgzdrawings from other tools.inspect findlocates 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_previewshows 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
-
Add the server to your MCP client. For Claude Code:
For Claude Desktop, Cursor and others:
-
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
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
stylewhen 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- v0.3.0最新Oct 6, 2026


