Excalidraw Toolkit
Diagram with your agent. Stay in control.
Use Claude Code or Codex to edit an existing Excalidraw diagram. Review what
changed, keep drawing in the same workspace, and export a native file you can
keep editing. Your original file and unrelated work stay intact.

Watch the launch film · 38 seconds → · Explore the toolkit · Get started
Real product captures: agent edits, before/after review, manual drawing, export,
and reopen. Camera motion and transitions are added for pacing.

Extend this architecture diagram with the MCP interface in src/scoped-mcp.js.
Show where agent requests enter and how verified images come back. Preserve
the existing pipeline, layout, and notes.
The agent inspects existing elements, applies supported edits by ID, and returns
an edited .excalidraw copy with before/after PNGs and a change receipt.
This real Codex/MCP edit extends a nine-stage diagram of this repository into an
eleven-stage overview. The blue additions show the existing MCP interface;
the original pipeline and annotations stay in place.
Try the original diagram,
open the edited result, or
read the task and source references.
Available in npm 0.3.0. Install the release below to use these workflows.
What you can do
| Task | What the toolkit provides |
|---|
| Recolor or rename a component | Scoped style edits and measured bound-label updates. |
| Revise a flow | Move supported shapes and reanchor bound arrows; add nodes/connections; remove or detach explicit dependencies. |
| Explain a code change | Source-linked before/after diagrams at article, slide, or canvas dimensions. |
| Update a diagram after code changes | A staged refresh that preserves manual overrides and identifies conflicts. |
| Run from CI | Explicit source scope, execution budget, retained artifacts, and stale-event checks. |
| Publish a PR update | An opt-in managed comment that reconciles retries and checks the current PR head. |
Your existing coding agent supplies the reasoning. The toolkit owns supported
native edits, preservation checks, rendering, and retained results; it adds no
extra model service.
Get started
Use Node.js 20+ and npm. The commands below use a POSIX shell:
npm install --global [email protected]
TOOLKIT_NODE="$(node -p 'process.execPath')"
TOOLKIT_CLI="$(npm root --global)/excalidraw-toolkit/bin/cli.js"
TOOLKIT_PROJECT="/absolute/path/to/your-project"
"$TOOLKIT_NODE" "$TOOLKIT_CLI" setup-preview
"$TOOLKIT_NODE" "$TOOLKIT_CLI" init --target all --project "$TOOLKIT_PROJECT"
"$TOOLKIT_NODE" "$TOOLKIT_CLI" doctor --target all --project "$TOOLKIT_PROJECT"
Set TOOLKIT_PROJECT to an existing project containing your diagram. Use
--target claude or --target codex for one client. The package includes its built
browser assets; setup-preview installs Chromium. Keep the Node and toolkit
installation available: the installed skill records their absolute paths.
Installation guide covers updates, a local installation,
source builds, Linux dependencies, and uninstalling.
Claude Code
Start a new Claude Code session in the project. Its installed scoped-edit skill
uses the native CLI for saved-file edits. Try:
Use scoped-edit on architecture.excalidraw. Read the relevant source and add
the missing agent entry point and its connections in the available space.
Preserve my notes and existing layout. Show before/after previews and return
the editable copy.
Codex
Connect the toolkit through standard MCP, rooted at your project:
First inspect any existing registration:
codex mcp get excalidraw_toolkit
If the name is unused, add the connection:
codex mcp add excalidraw_toolkit -- \
"$TOOLKIT_NODE" "$TOOLKIT_CLI" mcp --project "$TOOLKIT_PROJECT"