What is Draw.io Scientific Illustrator?
Draw.io Scientific Illustrator is a plugin that gives an AI coding agent two local MCP servers. One edits the visible draw.io desktop canvas shape by shape through draw.io's own graph API. The other validates saved .drawio files and exports PNG, SVG, PDF or JPG. Active development has moved to a successor project.
It is a Codex plugin that lets an AI agent draw scientific figures live inside the visible draw.io desktop canvas. You watch shapes, labels, arrows, styling and layout appear step by step while the agent works.
The live workflow calls draw.io's own graph API through a localhost-only MCP server. It does not automate the operating-system mouse or keyboard, and it does not create XML first and open the file afterward.
What changes in your agent's output
- Figures are built from editable draw.io primitives, so labels, arrows, panels and legends stay editable.
- The agent draws with pacing, for example a 100 ms delay between steps, and checks each section with a screenshot of the draw.io renderer.
- The .drawio file is saved only after the drawing exists on the visible canvas, then validated and exported as PNG, SVG, PDF or JPG.
- A PNG, JPEG, SVG or a rendered PDF page can serve as the reference figure.
How the setup works
- Install draw.io desktop and Git, and use the Codex desktop app or Codex CLI with plugin support.
- Clone the repository, register it as a Codex marketplace and add the plugin.
- Restart Codex, start a new task and attach the reference figure.
- Mention Draw.io Scientific Illustrator and state the pacing and output formats you want.
Who Draw.io Scientific Illustrator is for
Best for
- Redrawing a reference scientific figure as editable draw.io shapes.
- Watching each shape appear on the visible canvas instead of opening a finished file.
Not for
- New projects. Development moved to scientific-illustrator, and this repository no longer receives feature or compatibility updates.
- Dense microscopy images, photographs, heatmaps or complex plots, which may need a future live image insertion operation.
- Drawing architecture diagrams with real vendor icons on a separate canvas app, which is the job Excalidraw Icons MCP covers with its own tools.
- Drawing new UI screens directly on a Figma canvas with JavaScript instead of scientific figures, work that Figma UI MCP takes on instead.
- Running a separate local design editor application next to your canvas instead of draw.io, a role that Figmaboy MCP fills on its own.
- Composing a single visual poster or art piece from scratch rather than redrawing a labeled figure, a task the canvas-design skill takes on.
Requirements and platform
- Codex desktop app or Codex CLI with plugin support, draw.io desktop and Git.
- Node.js, with version 22 or newer recommended, when the MCP servers run outside the bundled Codex runtime.
- Windows was the tested platform for v1.0.0, and macOS and Linux support is best effort.
Connect Draw.io Scientific Illustrator MCP: Live Canvas Drawing for an AI Coding Agent to your AI client
git clone https://github.com/icebird1998/drawio-scientific-illustrator.git
cd drawio-scientific-illustrator
codex plugin marketplace add "$(pwd)"
codex plugin add drawio-scientific-illustrator@drawio-scientific-toolsCheck the requirements
Install draw.io desktop and Git. Use the Codex desktop app or Codex CLI with plugin support, plus Node.js 22 or newer if the MCP servers run outside the bundled Codex runtime.
Install the plugin
Run the commands above. On PowerShell, replace
"$(pwd)"with(Get-Location).Path.Or use an installer script
The repository includes install.ps1 for Windows and install.sh for macOS and Linux. Review the script before running it.
Restart Codex
Restart Codex and start a new task so the new skill and MCP tools load.
Point to a custom draw.io
The plugin auto-detects common draw.io locations on Windows, macOS and Linux. For a custom installation, set
DRAWIO_PATHto the executable before starting Codex.
Endpoints and ports
127.0.0.1:9333Localhost only. Set DRAWIO_LIVE_PORT to change it. A nearby free port is selected when needed~/.drawio-live-mcp/<port>Dedicated draw.io profile. Set DRAWIO_LIVE_PROFILE to change itDRAWIO_PATHAuto-detected by defaultWhat you can do with it
- Live canvas controlEdits the active graph model of the visible draw.io desktop editor in real time.
- Paced drawing
drawio_live_draw_sequencebuilds content step by step, and the example prompt uses a 100 ms delay. - Screenshot review
drawio_live_screenshotinspects the renderer after each logical section so labels, styles, positions and sizes can be corrected. - Save after drawing
drawio_live_save_snapshotwrites the .drawio file only from the graph already drawn on the canvas. - Validate and export
drawio_validatechecks saved documents anddrawio_exportproduces PNG, SVG, PDF or JPG files. - Localhost onlyThe debugging endpoint binds to 127.0.0.1, and target discovery accepts only pages identified as draw.io or diagrams.net.
- No telemetryNo telemetry or hosted backend is included in the plugin.
- Three settings
DRAWIO_PATH,DRAWIO_LIVE_PORTandDRAWIO_LIVE_PROFILEset the executable, the debugging port and the profile directory.
Tools it exposes
drawio_live_launch
Launches or connects to a visible draw.io editor.
drawio_live_status
Confirms that the graph is ready.
drawio_live_add_shape
Adds an editable shape to the live canvas.
drawio_live_add_edge
Adds an editable edge to the live canvas.
drawio_live_draw_sequence
Draws content in paced steps so it builds visibly.
drawio_live_screenshot
Captures the draw.io renderer to inspect it after logical sections.
drawio_live_inspect
Inspects the live graph so labels, styles, positions and sizes can be corrected.
drawio_live_update_cell
Corrects labels, styles, positions and sizes.
drawio_live_fit
Keeps the evolving figure in view.
drawio_live_save_snapshot
Serializes the already visible graph to a .drawio file.
drawio_validate
Validates saved .drawio documents.
drawio_export
Exports PNG, SVG, PDF or JPG deliverables.
Frequently asked questions
What is the Draw.io Scientific Illustrator MCP?
It is a plugin that bundles two MCP servers, drawio-live and drawio-file-utils, with a skill that teaches an AI coding agent to redraw a reference scientific figure. The live server edits the visible draw.io desktop canvas, and the file utility server validates saved .drawio files and exports PNG, SVG, PDF or JPG.
How do I install it?
Clone the repository, change into its folder, register it with codex plugin marketplace add and run codex plugin add drawio-scientific-illustrator@drawio-scientific-tools. Installer scripts exist for Windows and for macOS and Linux. Restart Codex and start a new task afterward so the skill and MCP tools load.
Which tools does it have?
The live server has drawio_live_launch, drawio_live_status, drawio_live_add_shape, drawio_live_add_edge, drawio_live_draw_sequence, drawio_live_screenshot, drawio_live_inspect, drawio_live_update_cell, drawio_live_fit and drawio_live_save_snapshot. The file utility server adds drawio_validate and drawio_export for checking and exporting saved .drawio documents. Together they cover launching the canvas, drawing and inspecting shapes, saving the graph that is already visible, and validating and exporting the result.
Which AI agents does it work with?
It is built as a Codex plugin, so it needs the Codex desktop app or Codex CLI with plugin support. The two MCP servers, the Codex skill and a repository-local Codex marketplace ship together, which lets the complete plugin install as one unit.
Is it still maintained?
No. The repository stays public but no longer receives feature or compatibility updates. All future development, releases and fixes moved to scientific-illustrator, and new users are encouraged to use that project. Windows was the tested platform for v1.0.0, and macOS and Linux support is best effort.
Does it control my mouse or keyboard?
No. It calls draw.io's own graph API through a localhost-only MCP server and does not use operating-system mouse or keyboard automation. The debugging endpoint binds to 127.0.0.1, target discovery accepts only draw.io or diagrams.net pages, and the plugin ships without telemetry or a hosted backend.
What happens if the draw.io graph is not ready or a window is stuck open?
drawio_live_launch starts or connects to a visible draw.io editor, and drawio_live_status confirms the graph is ready before drawing begins. If it never reports ready, close stale draw.io windows the plugin already launched, retry the connection, and make sure the desktop app accepts Electron remote debugging flags.


