Tutorial · tested Nov 2026

Connect Claude Code to Excalidraw

Two methods, one prompt, two very different diagrams. Every command below is one we ran.

We gave Claude Code a description of a typical small-business system, invoices that arrive by email and are read and checked automatically, and asked it to draw it twice. First with an Excalidraw skill, then with an Excalidraw MCP server. Here are both results, the exact setup, and the two things we had to fix along the way.

The two results

Diagram made with the Excalidraw skill, in five numbered columns: three suppliers email PDF invoices to an inbox; the invoice is read and its fields extracted, with a sample of the extracted fields; a check that the totals add up and every field was read confidently, with most invoices going straight on and the rest to a person for a quick look on a review screen; posting to the accounting system, with sample entries; and a month-end report of spending by supplier.
Method A, the skill. About 10 minutes. A clean technical style, with sample data in the diagram: an example email, the extracted fields, a review screen, the posted entries and the month-end report. Tap the image for full size.
Hand-drawn-style diagram made with the Excalidraw MCP server. Invoices arrive by email, are read and their fields extracted, then a diamond asks whether the totals add up and the fields were read confidently. Yes goes straight to the accounting system; no goes to a person for a quick review, then to the accounting system. At the end of the month, a report shows spending by supplier.
Method B, the MCP server. About 1 minute. Excalidraw's hand-drawn look, drawn live on a local canvas you can watch. Tap the image for full size.

Which method should I use?

A: Excalidraw skillB: Excalidraw MCP server
LookClean, technical, with sample data and code-style boxesClassic hand-drawn Excalidraw
Time in our testAbout 10 minutes (26 turns)About 1 minute (15 turns)
Cost in our testAbout $2.01About $0.45
What you installOne folder of instructions; optional Python rendererAn MCP server, run with npx
Needsuv and Python 3.11+ for the rendererNode.js 20 or newer
Choose it forDetailed diagrams for documentationQuick diagrams you watch take shape and keep editing

The costs are what Claude Code reported at API prices for our single run. On a Claude subscription the same work counts toward your usage instead. Your numbers will vary with the diagram.

Before you start

A

Method A: the Excalidraw skill

A skill is a folder of instructions Claude Code loads when a task matches it. We used coleam00/excalidraw-diagram-skill. It teaches Claude how to lay out a diagram, and it includes a small renderer so Claude can look at its own work and fix it.

1. Copy the skill into your project

bashgit clone https://github.com/coleam00/excalidraw-diagram-skill.git mkdir -p .claude/skills cp -r excalidraw-diagram-skill .claude/skills/excalidraw-diagram

The mkdir line isn't in the skill's README. Without it, cp fails in a project that has no .claude/skills folder yet.

2. Set up the renderer

bashcd .claude/skills/excalidraw-diagram/references uv sync uv run playwright install chromium

This installs Playwright and downloads a headless Chromium of about 126 MB into ~/.cache/ms-playwright. The renderer is optional, but it is what lets Claude catch overlapping text and stray arrows.

3. Pin the Excalidraw version in the renderer

On the day we tested, the renderer timed out on every diagram. Its template loads Excalidraw from the esm.sh CDN without a version number, and the latest build failed to load. Open references/render_template.html and change one line:

diff- import { exportToSvg } from "https://esm.sh/@excalidraw/excalidraw?bundle"; + import { exportToSvg } from "https://esm.sh/@excalidraw/[email protected]?bundle";

Version 0.18.0 worked. 0.17.6 did not, because it has no exportToSvg export. Claude Code worked this out by itself during our run, but it took a few minutes and several tries.

4. Ask for the diagram

Start claude in the project folder and describe what you want. This is the prompt we used, word for word:

promptCreate an Excalidraw diagram of how an invoice automation system for a small business works: supplier invoices arrive by email as PDF attachments; the system reads each invoice and extracts the supplier, invoice number, date, VAT and total; it checks that the totals add up and that it read the fields confidently; invoices that pass go straight into the accounting system; the rest go to a person for a quick review and then into the accounting system; at the end of each month a report lists spending by supplier. Save it as invoice-flow.excalidraw in this folder, render it to invoice-flow.png, look at the render and fix any layout problems.

Claude loaded the skill, wrote the diagram, rendered it, looked at the image and fixed the one problem it found: two table columns set too close together. The skill likes to show real examples, so the result has a sample request and the count it produces:

Detail of the skill's diagram: the fields extracted from a sample invoice (supplier, invoice number, date, net, VAT, total, confidence), and the review screen a person sees, with a doubtful VAT field highlighted and Approve and Fix buttons.
Detail from Method A: the fields read from a sample invoice on the left, the review screen for a doubtful one on the right.
B

Method B: the Excalidraw MCP server

An MCP server gives Claude Code new tools. We used yctimlin/mcp_excalidraw (npm package mcp-excalidraw-server, version 2.2.0). It runs a real Excalidraw canvas on your machine, and Claude draws on it, takes screenshots of it and moves things around.

1. Add the server to your project

Run this in your project folder:

bashclaude mcp add excalidraw --scope project -- npx -y mcp-excalidraw-server

It writes a .mcp.json file to the project:

json{ "mcpServers": { "excalidraw": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-excalidraw-server"], "env": {} } } }

To have it in every project instead, use --scope user, as the server's README shows. Run claude mcp list to check that it connects.

2. Ask for the diagram

Start claude in the project folder. Our prompt used the same description as Method A:

promptUsing the Excalidraw MCP tools, draw a diagram on the canvas of how an invoice automation system for a small business works: supplier invoices arrive by email as PDF attachments; the system reads each invoice and extracts the supplier, invoice number, date, VAT and total; it checks that the totals add up and that it read the fields confidently; invoices that pass go straight into the accounting system; the rest go to a person for a quick review and then into the accounting system; at the end of each month a report lists spending by supplier. Check it with a screenshot and fix any layout problems, then export it to invoice-flow.excalidraw and invoice-flow.png in this folder.

3. Watch it draw (optional)

The server starts its canvas by itself at http://127.0.0.1:3000. Open that address in a browser and you'll see the shapes appear. In our run Claude read the server's diagram guide, created the elements in two batches, took a screenshot, moved a label that sat on a border, checked again and exported both files. The whole thing took about a minute.

Edit the result in Excalidraw

Both methods leave a .excalidraw file in your folder. Everything in it stays editable:

  1. Go to excalidraw.com.
  2. Open the menu (top left), choose Open, and pick invoice-flow.excalidraw.
  3. Move, restyle or relabel anything. Use Save to… or Export image from the same menu when you're done.

You can also ask Claude to change the file for you ("make the table wider", "use our brand colours"). With Method B it edits the live canvas, so you see each change straight away.

Troubleshooting

The skill's renderer times out

If you see Page.wait_for_function: Timeout 30000ms exceeded, the renderer couldn't load Excalidraw from the CDN. Pin the version as in step 3 of Method A.

Claude doesn't have the Excalidraw tools

Run claude mcp list in the project folder. If excalidraw isn't connected, check node --version: the server needs Node.js 20 or newer. Inside Claude Code, /mcp shows the same status.

Port 3000 is already in use

The canvas defaults to port 3000. The server's README documents PORT for the canvas and EXPRESS_SERVER_URL for the MCP process. Set both to the same free port.

Claude doesn't use the skill

Check that the file sits at .claude/skills/excalidraw-diagram/SKILL.md and that you started claude from the project root. You can also name it in your prompt: "use the excalidraw-diagram skill".

Credits

More tutorials: all tutorials, including Claude Code with Obsidian and videos with Remotion.

Tested on 25 November 2026, example re-run on 28 November, with Claude Code 2.1.332 on Ubuntu, excalidraw-diagram-skill at commit 8646fcc, and mcp-excalidraw-server 2.2.0.

Need help integrating AI tools?

Rivok Labs helps teams adopt AI workflows that actually stick — strategy, implementation, and training.

Start a conversation