You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp-app-server: support DRAWIO_BASE_URL for self-hosted draw.io (like the Tool Server) #91
Thanks for #39, which made the Tool Server's editor URL configurable via DRAWIO_BASE_URL. The App Server doesn't have an equivalent yet, so "Open in draw.io" and the link returned to the model always point at https://app.diagrams.net/.
Use case
We run the App Server (jgraph/drawio-mcp Docker image) internally, next to a self-hosted draw.io instance, for teams that must keep diagrams on internal infrastructure. Today the only way to send users to our draw.io is to patch src/shared.js in our own image build, which we have to re-check on every release.
Where it's hardcoded (main, app server 1.4.7)
mcp-app-server/src/shared.js L1420, generateDrawioEditUrl(): link returned to the model
mcp-app-server/src/shared.js L7722 and L7732, drawioEditorUrl(): "Open in draw.io" button (#R… and #create= forms)
All three use https://app.diagrams.net/?pv=0&grid=0#....
Proposal
Read the editor base URL from DRAWIO_BASE_URL in the App Server too, defaulting to https://app.diagrams.net/, with the same semantics as the Tool Server (trailing slash, query params and # fragment appended as today). It needs to reach both the server-side link and the in-chat widget, e.g. passed into the generated HTML the way the other build-time values are.
This would only change where the editor links point. Viewer, shape image and library URLs can stay as they are. That keeps the inline preview working for self-hosted editors behind SSO, where the preview iframe can't authenticate.
For the Cloudflare Worker deployment this could be an env binding, but the Docker/Node entry is the main need.
Thanks for the detailed report! This shipped in App Server 1.5.0 (b136388). The Docker image is jgraph/drawio-mcp:1.5.0, also tagged latest:
docker run --rm -p 127.0.0.1:3001:3001 -e DRAWIO_BASE_URL=https://drawio.example.com/ jgraph/drawio-mcp
DRAWIO_BASE_URL now sets both editor links: the "Open in draw.io" button and the link returned to clients that don't show diagrams inline. It works like the Tool Server's setting, and pv=0&grid=0 is added to a query of your own if the URL has one.
The viewer, shape images and libraries still load from diagrams.net, so the inline preview keeps working behind SSO, as you suggested. Your editor's origin is added to the app's connect and redirect domains, which ChatGPT needs to open it.
A value that isn't an http(s) URL stops the server at startup.
On Cloudflare Workers, the page is built before the upload, so set the variable in the shell that deploys (DRAWIO_BASE_URL=https://drawio.example.com/ npm run deploy), not as a [vars] binding.
Activity
alderg commentedon Nov 2, 2026
Thanks for the detailed report! This shipped in App Server 1.5.0 (b136388). The Docker image is
jgraph/drawio-mcp:1.5.0, also taggedlatest:DRAWIO_BASE_URLnow sets both editor links: the "Open in draw.io" button and the link returned to clients that don't show diagrams inline. It works like the Tool Server's setting, andpv=0&grid=0is added to a query of your own if the URL has one.DRAWIO_BASE_URL=https://drawio.example.com/ npm run deploy), not as a[vars]binding.feat(app-server): open diagrams in a self-hosted draw.io with DRAWIO_…