From 20ce02a60281461eeea74e23198b24acb0ca3c03 Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Sun, 11 Oct 2026 12:43:10 +0900 Subject: [PATCH] docs(mcp-server): mermaid is in the bundled draw.io, which has no image proxy - Mermaid's converter is in js/extensions.min.js, which the editor loads at startup, so the README no longer lists it as left out; the org chart layout (js/orgchart.min.js) is the example of a feature that is. - Note that the bundled copy, like the web app's, has no /drawio/proxy: images from other websites, including those in some templates, are left out of exports and thumbnails. The guard's comment names this as a known limitation it does not cover. --- packages/mcp-server/README.md | 4 +++- packages/mcp-server/scripts/check-drawio-files.mjs | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 9101f307..ae58d60b 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -217,7 +217,9 @@ docker run -d -p 8080:8080 jgraph/drawio Then set `DRAWIO_BASE_URL=http://localhost:8080` (or your server's URL). The preview page loads nothing else from the internet, so with a local draw.io it works offline. One exception: shapes from the Material Design library show icons from `fonts.gstatic.com`. -Without `DRAWIO_BASE_URL` the preview uses the trimmed draw.io copy bundled with this package. It has the editor, the shape libraries, the templates and PlantUML; features that load more code when used (Mermaid, for example) are not included. Set `DRAWIO_BASE_URL` to a full draw.io if you need them. +Without `DRAWIO_BASE_URL` the preview uses the trimmed draw.io copy bundled with this package. It has the editor, the shape libraries, the templates, PlantUML and Mermaid; features that load more code when used (the org chart layout, for example) are not included. Set `DRAWIO_BASE_URL` to a full draw.io if you need them. + +Like the web app's bundled copy, it has no image proxy (`/drawio/proxy`): images from other websites, including the avatars in the Org Chart and Mind Map templates and the Arista icons in the network templates, show on the canvas only when online and are left out of PNG and SVG exports and version thumbnails. Insert such images from a file instead, or set `DRAWIO_BASE_URL` to a full draw.io (the `jgraph/drawio` Docker image includes the proxy). See [Offline deployment](https://github.com/DayuanJiang/next-ai-draw-io/blob/main/docs/en/offline-deployment.md). ## Troubleshooting diff --git a/packages/mcp-server/scripts/check-drawio-files.mjs b/packages/mcp-server/scripts/check-drawio-files.mjs index 733871ac..c3b626a6 100644 --- a/packages/mcp-server/scripts/check-drawio-files.mjs +++ b/packages/mcp-server/scripts/check-drawio-files.mjs @@ -186,8 +186,13 @@ const MATH_DOC = doc( // Dialogs and toggles, by draw.io action name (Actions.js); each is closed // again right after it opened. Insert > Template and Insert > Advanced > -// PlantUML, which load files when used, are driven below. Left out on -// purpose, to keep the package small: Mermaid (it loads its own code). +// PlantUML, which load files when used, are driven below. Mermaid needs no +// extra files: its converter is in js/extensions.min.js, which the editor +// loads at startup. Left out on purpose, to keep the package small: the org +// chart layout (it loads js/orgchart.min.js). Not covered either: images +// from other websites in some templates (Org Chart avatars, Arista icons) +// and the /drawio/proxy requests draw.io makes for them when exporting; +// the copy has no proxy, a known limitation (see the README). const ACTIONS = [ "editData", "editDiagram",