Labsco
MCP SERVER

Excalidraw

by yctimlin

Draw a diagram on an Excalidraw canvas the agent can read back, edit and export.

Diagrams & ChartsOfficial source
Summary
The agent draws, then looks at what it drew.

What it takes off you is describing the picture back to it. The scene description and the canvas screenshot let the model check its own diagram before adding to it, and arrows bound by element id stay attached through the moves that would otherwise leave them pointing at nothing.

What it is

An Excalidraw canvas driven as a scene, with 26 tools. Elements are created singly or in batches, arrows bind to shapes by id, and the agent can read the scene back — as a description or as a screenshot — before changing it.

What you get
  • Elements created, read, updated, deleted and queried, in batches and duplicated at an offset (`create_element`, `get_element`, `update_element`, `delete_element`, `query_elements`, `batch_create_elements`, `duplicate_elements`)
  • Layout operations: align, distribute evenly, group and ungroup, lock and unlock (`align_elements`, `distribute_elements`, `group_elements`, `ungroup_elements`, `lock_elements`, `unlock_elements`)
  • The scene read back as a description — types, positions, connections and labels — or as a canvas screenshot (`describe_scene`, `get_canvas_screenshot`)
  • A Mermaid diagram converted into Excalidraw elements on the canvas (`create_from_mermaid`)
  • Export to `.excalidraw` JSON, to PNG or SVG, or to a shareable excalidraw.com URL, and import back from a file (`export_scene`, `export_to_image`, `export_to_excalidraw_url`, `import_scene`)
  • Named snapshots of the canvas and a restore, plus a clear (`snapshot_scene`, `restore_snapshot`, `clear_canvas`)
  • Viewport control: fit everything, centre on one element, or zoom to fit a set of ids with a zoom factor (`set_viewport`)
  • A design guide covering palette, sizing, layout patterns and arrow binding (`read_diagram_guide`)
Requirements

Npx. Creating, querying and updating elements and exporting `.excalidraw` JSON all work headless; screenshots, PNG and SVG export, viewport control and Mermaid conversion render in the Excalidraw frontend, so they need the canvas open in a browser — the CLI exits with code 4 and says so when that is what is missing. The canvas is in-memory by design, so a restart is a blank canvas: export a `.excalidraw` file into your repo, or take named snapshots while you work. `EXCALIDRAW_EXPORT_DIR` bounds where file exports may be written, and `EXPRESS_SERVER_URL` points at the canvas server, `http://127.0.0.1:3000` by default.

Setup effort

One command — npx -y mcp-excalidraw-server