Sulat.com / Writing on AIThursday, December 3, 2026
Enter →
Agents/3 December 2026

Excalidraw adds its MCP tools to the CLI

Excalidraw's CLI now runs its Excalidraw+ MCP drawing tools after one login, with no server to configure. I had Codex drive it through a dozen prompts, from flowcharts to a deck.

Glossy 3D Excalidraw logo beside a whiteboard flowchart that a robotic hand draws, for the Excalidraw CLI MCP launch
Illustration: Sulat, featuring the Excalidraw logo

At a glance

  • Excalidraw's CLI now runs the Excalidraw+ MCP tools through excalidraw mcp, so one login serves every agent that can run a shell.
  • Codex finished all twelve prompts with a scene in the workspace and a PNG on disk, including a five-slide deck and a four-chart dashboard.
  • The compact tool list is 11.8 KB against 380 KB of full definitions, which keeps the agent's context small.
  • A write that skips an element still exits 0, and parallel writes into one scene stack on top of each other.
  • MCP and the REST API are a public beta on the US$6 a month Plus plan, and a full-access key exposes 56 tools.

Excalidraw’s command-line tool can now run the Excalidraw+ MCP drawing tools itself. After one login, an agent that can run shell commands gets the same diagrams, charts, slides and sticky-note boards as one wired to the MCP server, with no server to add to each harness. I had Codex draw through it in a dozen prompts, and here is what worked, what pushed back and what to check before you hand it a key.

Excalidraw’s post on X announcing MCP in its CLI.

The short version: install @excalidraw/cli, run excalidraw login, and add one line to your agent’s instructions telling it to use excalidraw mcp. Every prompt I gave Codex ended with a scene in my Excalidraw+ workspace and a PNG on disk. Excalidraw’s pricing page lists MCP as a public beta on the Plus plan, which is US$6 a month per user. The free editor doesn’t include it.

What shipped

The CLI is Excalidraw’s official command-line tool, MIT-licensed, and needs Node.js 22 or newer. Before this, the CLI already did two things without an account: excalidraw render turns a drawing into a PNG or SVG and excalidraw mermaid turns Mermaid into an editable scene, both on your own machine with a local browser. With a login it also manages scenes, collections and share links.

The new part is excalidraw mcp, which calls the tools of the Excalidraw+ MCP server using the CLI’s login. It has four subcommands:

  • instructions prints the guide an MCP client would show its agent, about 5 KB.
  • tools lists each tool with its first sentence and whether it only reads, adds or may change content.
  • schema <tool> prints one tool’s full description and argument schema.
  • call <tool> runs a tool with JSON arguments and prints the result. Screenshots are saved as PNG files.

The command isn’t new this week. It landed in the repository on 18 November and is in the 1.2.0 release on npm, published on 27 November, which is the version I ran. The post is the announcement.

With my full-access personal key, excalidraw mcp tools listed 56 tools: scenes, collections, diagrams from Mermaid or JSON, charts, tables, slides, sticky notes, layout checks, screenshots, share links, and workspace administration. The docs say tools a login has no permission for aren’t listed, and that the administration tools (users, invites, settings, logs) need an API key rather than a browser sign-in.

Setting it up

Code
npm install -g @excalidraw/cli
excalidraw login          # opens the browser, you pick a workspace
excalidraw whoami         # shows workspace, key type and credential source

The browser login sends its token back to the CLI on 127.0.0.1, so it has to run on the same computer. On a machine without a browser, over SSH or in CI, set EXCALIDRAW_API_KEY or run excalidraw login --api-key. A key set in the environment wins over a saved login.

Then add Excalidraw’s suggested line to AGENTS.md or CLAUDE.md:

Code
To draw or edit Excalidraw+ scenes, use the `excalidraw` CLI: run `excalidraw mcp instructions` first, then `excalidraw mcp tools`, `excalidraw mcp schema <tool>` and `excalidraw mcp call <tool>`.
Three steps: excalidraw login, one line in AGENTS.md, then excalidraw mcp call draws, checks and saves
One login and one line in AGENTS.md is the whole setup. Illustration: Sulat. Source: Excalidraw CLI docs

Startup is quick. excalidraw --version took 0.13 seconds, and a list_scenes call through excalidraw mcp call had a median of 1.2 seconds over ten calls from my cloud container.

The CLI also keeps an agent’s context small. The full tool definitions come to 380 KB as the server sends them, while excalidraw mcp tools prints the same 56 tools in 11.8 KB. The agent pulls a full schema only for the tools it picks.

Bar comparison: 11.8 KB tool list against 380 KB of full Excalidraw MCP tool definitions, about 32 times larger
The short list costs an agent far less context than the full definitions. Illustration: Sulat. Source: my measurement

Three ways in

The Excalidraw+ MCP server has one URL, api.excalidraw.com/api/v1/mcp, and three ways to reach it. Clients with MCP’s OAuth sign-in, which the docs list as ChatGPT, Claude, Claude Code, VS Code and Codex, can just add the URL and sign in. Clients without it, such as Cursor, send an API key as a bearer token. The CLI is the third route, and its advantage is that the setup lives in one place: log in once and every agent that can run a shell command uses it.

Three options: OAuth sign-in, API key, and the Excalidraw CLI, all giving the same drawing tools
OAuth, an API key or the CLI all reach the drawing tools. Illustration: Sulat. Source: Excalidraw+ docs

There’s one limit: it needs a shell. A chat app with no command line can’t use the CLI route, which is my inference from how it works, not something Excalidraw says. The docs also note that a connection reaches one workspace, and that workspace admins can switch off AI connectors in settings, which stops browser logins until you use an API key.

What I ran

I drove the CLI with Codex CLI 0.173.0, signed in with a ChatGPT account and using its default model, one codex exec per prompt in an empty folder with only the AGENTS.md line above. The sandbox allowed writes in that folder and network access. The machine was a cloud VM with an Intel Xeon 2.10 GHz, 4 cores, 15 GiB of memory, 252 GB of disk, running Ubuntu 24.04.5 on kernel 6.18.44. The Excalidraw side was a personal API key on a paid workspace, with a throwaway collection for the scenes.

TaskSecondsOutcome
Checkout flowchart37Scene created, no layout issues, PNG saved
Release-gap chart from npm timestamps37Column chart, longest gap highlighted
Five-slide deck107Presenter notes, reveal animations, a shared link
Retro board and 2×2 matrix41Two scenes, no layout issues
Comparison table34Editable table, CLI row highlighted
Edit an existing scene62Retry loop, rename and sticky note added in place
14 long labels85One layout issue, none after one revision
Mermaid and render, no account39.excalidraw, SVG and PNG files
Five error probes35Exit codes and messages recorded
Architecture from the CLI’s source91Five groups, source files listed
Four-chart dashboard88Bar, scatter, donut and line in one scene
Japanese, Arabic and Korean labels76Three scripts, fonts named
Wall time for each codex exec run, from my timer. The prompts are at the end of the piece.

Codex followed the one-line instruction the same way every time. It ran excalidraw mcp instructions, then tools, then pulled the schema for only the tools it needed, usually three to six, before its first call. The flowchart took ten shell commands and the deck eighteen. The flowchart run used 175,984 input tokens, 145,664 of them cached, and 736 output tokens.

Diagrams, edits and charts

The flowchart prompt asked for a gateway, an auth decision, payments, a database and a queue. Codex used the Mermaid tool, set the clean style, checked the layout, which came back with no issues, and exported the PNG.

Flowchart of a checkout request through gateway, auth check, payments, database and queue, drawn via the Excalidraw CLI
The first flowchart Codex drew, exported straight from the scene. Source: my test run

The edit run is the one I’d watch for if you plan to keep scenes alive. I asked Codex to change the saved scene in place without redrawing it. It read the scene, used the freeform edit tool, rechecked the layout and exported again. The retry loop, the “401 Unauthorized” rename and the sticky note all landed. The sticky note reads “Queue consumer · To confirm”, because nothing in the scene says who consumes the queue and Codex didn’t make one up.

Checkout flowchart after an in-place edit: payment retry loop, 401 Unauthorized state and a sticky note by the queue
The same scene after an in-place edit: retry loop, renamed state and a sticky note. Source: my test run

Charts come from data, not hand-placed shapes. For the column chart I told Codex to read npm’s publish timestamps for @excalidraw/cli and chart the gaps. The longest, 28.9 days between 0.2.0 and 0.3.0, came out highlighted.

Column chart of days between @excalidraw/cli releases with the 28.9-day gap highlighted
Days between @excalidraw/cli releases, from npm’s timestamps. Source: npm registry, my test run

The dashboard run used the figures from my own earlier runs: wall time, input and output tokens. Codex built four chart types in one scene and highlighted the slowest run.

Dashboard of four Excalidraw charts: bar, scatter, donut and line, summarising nine Codex runs
Bar, scatter, donut and line charts in one scene, built from my own run logs. Source: my test runs

Sticky notes and slides work the same way. The retro board came out as three clusters of four notes, and the deck came with presenter notes and reveal animations. The deck’s share link returned a page when switched on and a 404 once I turned it off.

Retro board of green, pink and blue Excalidraw sticky notes under Went well, Went badly and Ideas
A retro board of real sticky notes, three clusters of four. Source: my test run
Excalidraw slide titled How the request reaches the scene with a coding agent to API diagram
One slide from the five-slide deck Codex composed. Source: my test run

Code, fonts and offline use

To see whether it could document something real, I asked Codex to clone the CLI’s own repository, read the source and draw how scenes render and mcp call move through it. It grouped the work into command parsing, handlers, config and login, the shared API client, and the request paths, and listed the files behind each group. Every file it named exists in the repository at the commit it cloned.

Grouped diagram of the Excalidraw CLI: command parsing, handlers, config and login, API client, render and MCP paths
Codex read the CLI’s source and drew how scenes render and mcp call flow through it. Source: github.com/excalidraw/cli

Fonts are searchable too. I asked for the same three-step flow in Japanese, Arabic and Korean. Codex picked Zen Maru Gothic for Japanese and Gowun Dodum for Korean. The font search returned no dedicated Arabic font, so the Arabic labels use Nunito with the renderer’s fallback, and the letters came out joined. It built the Arabic flow right to left, with Draft on the right and the arrows pointing left.

Three small Draft, Review, Ship flows labelled in Japanese, Arabic (right to left) and Korean
The same three-step flow in Japanese, Arabic and Korean; the Arabic one runs right to left. Source: my test run

Where it pushed back

The layout check did catch something. I asked for 14 nodes with labels of more than 30 words each and crossing arrows. The checker listed one issue, that the diagram was too tall to read on one screen. Codex rearranged it into a wide layout and the next check found none. The checker had nothing to say about the label length itself.

Flowchart of 14 nodes with 30-word labels, re-laid out wide after the layout check flagged it as too tall
The 14-node stress diagram after the layout fix. Source: my test run

The errors are readable. Codex ran five deliberately wrong calls against a scratch scene:

ProbeExit codeFirst line
list_scenes with limit set to a word1MCP error -32602: Input validation error: Invalid arguments for tool list_scenes
create_chart with two categories and one value1Chart input error: series[0] has 1 values for 2 categories
take_screenshot for a scene that doesn’t exist1Scene not found
edit_scene_content updating a missing element0Warning only: update[0] was skipped, the scene has no element with that id
A tool name that doesn’t exist1MCP error -32602: Tool nonexistent_mcp_probe not found
Exit codes and first error lines from Codex’s probes.

The one to remember is the fourth. An update to an element that isn’t there exits 0 with a warning, so a script that only checks the exit code won’t notice.

Parallel writes overlap. The docs say diagram and slide tools lay content out from a snapshot of the scene, and that a change in between returns a conflict error. I ran three create_mermaid_diagram calls into one scene at the same moment. All three exited 0 and all three diagrams landed, 15 elements in total, but every diagram was placed at the same coordinates and they stacked on top of each other. A fourth call run on its own afterwards was placed below them. I didn’t see the conflict error. If several agents write to one scene, give each its own.

With no login, it says so. With no key set, excalidraw mcp instructions exits 1 and the message says only render and mermaid work without a login. Given the chart and board prompts in that state, Codex rendered local PNGs and reported that creating the scenes was pending, and on the table prompt it stopped and asked for access.

Without an account it still renders. Codex turned a Mermaid loop (prompt, tool call, observe) into a 17-element .excalidraw file, then rendered an SVG and an 804 by 224 pixel PNG from it. All three commands used a locally installed Chrome, passed with --browser-path.

Where it sits

Excalidraw now has two MCP servers. The open-source one is an MIT-licensed MCP App at mcp.excalidraw.com that streams hand-drawn diagrams into clients that support MCP Apps. The Excalidraw+ one is what the CLI calls, and it works on saved scenes in a workspace, with sharing, slides and an API behind it. The Excalidraw+ docs say the two efforts may merge more closely over time.

Whiteboards are filling in the same gap. I covered tldraw’s MCP server earlier, where the agent works on files in your account and tldraw says to keep the file open in the browser. Nothing in my Excalidraw runs needed a browser tab open: the agent wrote to the workspace and I looked at the result afterwards. The CLI is the route that needs no server in the agent’s config.

Before you give an agent a key

A five-point check

Scope the key. My full-access personal key exposed 56 tools, including ones that delete scenes and collections and remove workspace members. The docs describe read-only keys, route-restricted keys and keys limited to chosen collections, which expose fewer tools. I didn’t create one of those.

Share links are public. The share tools create links that anyone can open without signing in. Only ask for one when you want one, and turn it off afterwards with excalidraw scenes share --access none. I switched mine off.

Check the exit code and the warning. A write that skips something can still exit 0.

One writer per scene. Parallel writes into one scene stack on top of each other.

It’s a beta on Plus. Excalidraw’s own pricing page marks MCP and the REST API as public beta, on the paid plan only.

The prompts

Exact prompts and the AGENTS.md line

Each run started in an empty folder holding one file, AGENTS.md, with the line from the setup section. The prompts, verbatim:

Flowchart

Code
Draw how a request moves through a checkout service as a flowchart in Excalidraw+. Put it in the collection with id 7kJ3mtQcf4W in a new scene called "Checkout flow". Include the client, API gateway, auth check with a pass/fail decision, a payments service, a database and a queue. Check the layout, then save a PNG of the scene to checkout.png here.

Chart

Code
Make a column chart in Excalidraw+ of the days between releases of the npm package @excalidraw/cli, using the release times npm reports (run `npm view @excalidraw/cli time --json`; skip the created and modified keys). Title it "Days between @excalidraw/cli releases". Put it in a new scene called "CLI release gaps" in collection 7kJ3mtQcf4W, highlight the longest gap, check the layout, and save a PNG to chart.png here.

Deck

Code
Build a five-slide deck in Excalidraw+ explaining how a coding agent can draw with the Excalidraw CLI instead of a configured MCP server: a title slide, a slide with the three steps (log in, tell the agent, call tools), a diagram slide of agent -> shell -> excalidraw CLI -> Excalidraw+ API, a stats slide, and a closing slide with takeaways. Add presenter notes and reveal animations. Put it in a new scene called "CLI deck" in collection 7kJ3mtQcf4W. Check each slide's layout, then render every slide to PNG into a slides/ folder here and share the presentation as a link; report the link.

Retro board and matrix

Code
Run a quick retro board in Excalidraw+ for a team that shipped an AI-agent feature: three clusters (Went well, Went badly, Ideas), four notes each, short and specific. Then make a separate 2x2 impact/effort matrix scene with six of the ideas placed in quadrants. Both go in collection 7kJ3mtQcf4W as scenes "Retro board" and "Impact effort". Check layouts and save PNGs retro.png and matrix.png here.

Table

Code
Create an editable comparison table in Excalidraw+ of three ways to connect an agent to Excalidraw+ (browser sign-in with OAuth, API key on the MCP URL, the excalidraw CLI), with columns for setup, what the agent needs, which tools it gets, and when to use it. Use only facts from `excalidraw mcp instructions`, `excalidraw --help` and the CLI's own help output; do not guess. Highlight the CLI row. New scene "Connect options" in collection 7kJ3mtQcf4W; check the layout and save table.png here.

Edit in place

Code
There is an Excalidraw+ scene called "Checkout flow" (id 4yYXub99AOy) in collection 7kJ3mtQcf4W. Edit it in place without redrawing it from scratch: add a retry loop from the payments service on failure (up to three tries, then a "Payment failed" end state), rename "Reject request" to "401 Unauthorized", and add a sticky note beside the queue saying who consumes it. Check the layout and save the result as checkout-v2.png here. Then tell me which tools you used for the edit.

Layout stress

Code
In Excalidraw+, make a new scene "Stress layout" in collection 7kJ3mtQcf4W containing a flowchart with 14 nodes whose labels are long sentences (30+ words each) and with arrows that cross. Use whichever tool you think is right. Run the layout check, then fix every issue it reports and re-check until it reports none or you have tried five times. Save the first attempt as before.png and the final one as after.png, and report how many issues the checker listed at each step.

No account

Code
Without an Excalidraw+ account, turn this Mermaid into an editable Excalidraw file and an SVG, then render a PNG of it, all from the terminal:
flowchart LR
  A[Prompt] --> B{Tool call?}
  B -->|yes| C[Run tool]
  C --> D[Observe]
  D --> B
  B -->|no| E[Answer]
Save flow.excalidraw, flow.svg and flow.png here. Note which commands needed a browser and which browser was used.

Error probes

Code
Probe how the Excalidraw CLI's mcp tools fail, using collection 7kJ3mtQcf4W. Try: a call with arguments that don't match the schema, a create_chart with mismatched series and categories lengths, take_screenshot for a scene id that doesn't exist, an edit_scene_content update to an element id that doesn't exist, and a tool name that doesn't exist. For each, record the exact exit code and the first line of the error text. Do not retry any write that reports success. Finish with a table of the five cases.

Architecture from source

Code
Clone https://github.com/excalidraw/cli into /tmp/cli-src (shallow). Read its source and draw its architecture in Excalidraw+ as a grouped diagram: how a command like `scenes render` and `mcp call` flows through the code (command parsing, config and login resolution, API client, local browser rendering). Base every box on files or modules you actually read. New scene "CLI architecture" in collection 7kJ3mtQcf4W. Check the layout, save architecture.png here, and list the source files each group came from.

Dashboard

Code
Use this table of nine Codex runs (columns: run, wall seconds, input tokens, cached input tokens, output tokens) to make a dashboard scene in Excalidraw+ called "Run costs" in collection 7kJ3mtQcf4W with four charts: a bar chart of wall seconds per run, a scatter of uncached input tokens (input minus cached) against wall seconds, a donut of output tokens by run, and a line of cached share of input per run in percent. Highlight the slowest run. Check the layout and save dashboard.png here.
run1 37 175984 145664 736
run2 37 293399 268160 868
run3 107 748405 720512 2974
run4 41 238403 202624 1000
run5 34 216644 179712 884
run6 62 470872 420736 1800
run7 85 469642 436864 2837
run8 39 234284 201088 1090
run9 35 221892 179072 779

Languages

Code
In Excalidraw+, make a scene "Languages" in collection 7kJ3mtQcf4W with three small labelled diagrams of the same three-step flow (Draft, Review, Ship): one in Japanese, one in Arabic, one in Korean. Pick fonts that cover each script using the font search tool, check the layout, and save languages.png here. Say which font you chose for each and how the Arabic reading direction was handled.

Sources: Excalidraw CLI repository / CLI MCP docs / Excalidraw CLI docs / Excalidraw+ MCP docs / Getting started / Auth and permissions / Excalidraw+ pricing / Excalidraw MCP App

Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.