
Next AI Draw.io
io.github.DayuanJiang由 GitHub 账号 DayuanJiang 发布v0.4.13更新于 Nov 7, 2026
draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand
发布方自己的服务:draw.io
概览
让 AI 助手在浏览器中的实时 draw.io 画布上绘制和修改图表,你也可以随时手动编辑。
- 可以做什么
- 开启预览会话,并用 mxCell XML 绘制新图表,或按 id 增删改单元格
- 读取当前图表 XML、你的手动修改以及你在预览中选中的图形
- 截取页面 PNG 截图,供助手检查并修正重叠
- 加载已有的 .drawio 或 .drawio.svg 文件,导出为 .drawio、.png、.svg 或 .drawio.svg
- 恢复历史版本、列出已保存的图表,并管理页面(标签页)
- 获取绘图规则与 AWS、Azure、GCP、Kubernetes 等图标库
- 适用场景
- 适合让助手把代码仓库、文档或想法画成 draw.io 图表,然后与你在同一画布上轮流修改、共同完善。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js;浏览器会打开 127.0.0.1 上的预览(默认端口 6002)。可选环境变量可设置端口、数据目录、语言、主题、draw.io 地址和预览行为。未声明需要账号或 API 密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 Next AI Draw.io,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Next AI Draw.io MCP Server
An MCP server that lets Claude Code, Cursor, VS Code and other AI agents draw draw.io diagrams from your project's files, with a live preview in your browser. The preview is the canvas of the Next AI Draw.io web app: the AI's changes are outlined, Ctrl+Z takes them back, and you can edit by hand at any time.
https://github.com/user-attachments/assets/6f53a67b-ab21-4113-9fee-7fb32f9de678
Install
In VS Code or Cursor, one click adds it: [Install in VS Code] [Add to Cursor]
Let your AI agent install it
Paste this into Claude Code, Codex, Cursor, VS Code, Cline or any agent that can edit files and run commands:
Install by hand
Claude Code
--scope user makes the tools available in every project. Without it, they exist only in the folder where you ran the command.
Or install it as a plugin from the Claude Code community marketplace (Claude Code 2.1.275 or later):
Codex CLI
Codex asks before each drawio tool that changes the diagram, and codex exec without full access fails with "MCP tool call requires approval". To let the drawio tools run without asking, add one line to the server's section in ~/.codex/config.toml:
To approve only some tools, use [mcp_servers.drawio.tools.<tool name>] with approval_mode = "approve" instead.
VS Code (.vscode/mcp.json)
DeepSeek Harness: install the plugin into the profile you start DSH with (web for dsh web). The agent replies with the preview link; clicking it opens the preview in DSH's right sidebar.
Cursor, Claude Desktop, Cline and most other clients (~/.cursor/mcp.json, claude_desktop_config.json, cline_mcp_settings.json)
Restart the client, then ask, for example, "Read this repo and draw its architecture". The preview opens in your browser and the diagram appears as it is drawn.
Features
- Draws from your project: the agent reads your code and documents with its own tools. Existing
.drawioand.drawio.svgfiles open withload_diagram. - The web app's canvas: the AI's changes are outlined for a few seconds (never in exports) and one Ctrl+Z takes them back. Select shapes and say "these" (
get_selection). Your hand edits are read before the AI edits again. - Real icons: the web app's drawing rules and shape libraries (AWS, Azure, GCP, Kubernetes, Cisco and more), so the AI uses real icon names.
- Self-check: the AI can look at a screenshot of the rendered diagram and fix overlaps (
screenshot: true, orscreenshot_diagram). - Versions: the last 20 versions as cards next to the canvas; restore or compare one, or ask the AI to undo (
restore_version). - Pages and export: multi-page diagrams; save as
.drawio,.png,.svgor.drawio.svg. Images get a 20 px margin, and PNGs a white background (transparent: truefor none). - Offline: the draw.io editor ships inside the package.
Choosing a draw.io MCP server
Several MCP servers draw draw.io diagrams. As of October 2026 they differ like this:
Saved diagrams
Every change is saved to ~/.next-ai-drawio/<session-id>.drawio with its last 20 versions; the newest 50 diagrams are kept. To continue one in a later conversation, ask the AI for it: it finds it with list_saved_diagrams and reopens it with start_session.
Your own drawing rules
Write them in ~/.next-ai-drawio/instructions.md, for example "Always use a minimal style". They are added to the drawing guide on every call, so edits apply without a restart. The first 5000 characters are used.
Tools
Configuration
Environment variables, set in the client's env for the server:
Remote preview behind a private proxy
Set DRAWIO_PREVIEW_URL=https://diagram.example.net in the MCP server's environment.
start_session returns that origin with the session's preview path and query.
The server still listens only on 127.0.0.1; configure a private or authenticated
HTTPS reverse proxy to its actual PORT, preserving the external Host and
browser Origin headers. Forward the whole origin, including /shell/,
/drawio/ and /api/, without a path prefix. If the chosen port is occupied,
the server may choose another port, so check the listener before configuring the proxy.
Only this exact additional Host and matching Origin are trusted. Forwarded headers
are not used to establish trust; the default localhost checks and API token remain.
The value must be a canonical HTTPS origin, optionally ending in /, without
credentials, a path, query or fragment. HTTP is accepted only for localhost or
127.0.0.1. Invalid values fail startup rather than silently falling back.
The hostname is not authentication. Anyone who can reach the preview can read
its embedded API token and edit diagrams. Restrict proxy access to trusted users
with network policy or authentication. Do not expose this listener publicly.
DRAWIO_ALLOW_EMBED is separate and does not permit arbitrary remote framing.
This setting changes only the browser preview, not the stdio MCP transport or
DRAWIO_BASE_URL (the draw.io editor).
Self-hosted draw.io
Then set DRAWIO_BASE_URL=http://localhost:8080. The preview cannot reach into a draw.io from another origin, so the AI's changes are not outlined, Ctrl+Z does not take them back (use the version cards) and get_selection does not work. The bundled copy leaves out a few features that load code on demand, such as the org chart layout. It also has no image proxy, so exported images leave out pictures inserted by their web address; see Offline deployment.
Troubleshooting
- Blank preview in VS Code Simple Browser or Cursor's browser: the page refuses to be embedded in other pages. Open the URL in a regular browser.
- Screenshot or PNG/SVG export times out: the preview tab renders them, and browsers slow down background tabs. Bring the tab to the front and try again.
- "No active session": the AI has to call
start_sessionfirst. - The preview does not update: open the URL that
start_sessionreturned; its?mcp=part connects the page to the session.
How it works
The server talks to the agent over stdio and runs an HTTP server on 127.0.0.1 that serves the preview page and the bundled draw.io; the page polls it for changes. Every /api request needs a token that only the preview page has, so other websites cannot read or change your diagram.
License
Apache-2.0
来源:packages/mcp-server/README.md,提交 04b1de9
工具
0版本历史
5- v0.4.13最新Nov 7, 2026
- v0.4.11Nov 1, 2026
- v0.4.7Oct 31, 2026
- v0.4.5Oct 17, 2026
- v0.4.3Oct 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Draw 集成
draw.io
io.draw官方发布者
draw.io 官方服务器,让助手用 Mermaid 或 draw.io XML 创建可交互图表,并从 draw.io 图形库中查找形状。

ChemDraw MCP
由 GitHub 账号 glebo309 发布
实验性的本地 MCP 服务器,让助手在 Apple Silicon Mac 上操控桌面版 ChemDraw,绘制、编辑、排版并导出化学结构。

DrawOffer 职绘
由 GitHub 账号 ql-link 发布
让 AI 助手读取你在 DrawOffer 职绘中的简历、已保存岗位和投递记录,并可选择新增岗位与投递记录。
SKETCHTALK – Draw to AI
jp.twelvetone
Mac 应用:可在正在运行的网页、模拟器或 Mac 窗口上直接绘制标注,并把标注交给 Claude Code。

SciDraw AI
由 GitHub 账号 BUPTLdy 发布
SciDraw AI 远程服务器,让助手创建和编辑科研插图、生成数据图表,并导出可编辑的 SVG 和 PowerPoint 文件。