Draw with Claude

Sketchshelf comes with an MCP server, a small program that lets Claude Code use your drawing library as a tool. Ask for a diagram and it appears in the sidebar, laid out and ready to edit by hand.

Set it up

You need Claude Code, Node.js 18 or later, and Sketchshelf installed. The server lives in the app's source code, so it takes three commands:

git clone https://github.com/seyonv/excalidraw-desktop.git ~/sketchshelf-mcp
cd ~/sketchshelf-mcp && npm install
claude mcp add --scope user excalidraw -- node ~/sketchshelf-mcp/mcp/server.js

Restart Claude Code, then ask it something like:

Draw the login flow: Client, API, Postgres, with arrows
down the chain. Label the first arrow "POST /login".

Claude writes the drawing into your library and opens it in Sketchshelf. If the drawing is already open, it updates in place: your scroll and zoom stay put, and ⌘ Z undoes whatever Claude changed.

Which copy of the app it uses

The server works out of the box with the direct download. Both use ~/Library/Application Support/Excalidraw.

The Mac App Store copy is sandboxed by Apple, so it keeps its drawings in its own folder. To point Claude at that library, add this to the command above, before the --:

-e EXCALIDRAW_LIBRARY_DIR="$HOME/Library/Containers/dev.seyon.sketchshelf/Data/Library/Application Support/Excalidraw"

What Claude can do

drawCreate or replace a whole diagram from boxes and arrows. Layout is automatic.
editMove, recolour, resize, retext or remove elements, keeping everything else, including your hand edits.
describe_sceneRead what's on a drawing: text, positions and arrows. Claude does this before editing.
list_drawingsList the library, newest first.
open_drawingBring Sketchshelf forward on a drawing.
rename_drawingRename a drawing.
delete_drawingDelete a drawing. Its last 20 versions stay in .history.

Settings

EXCALIDRAW_MCP_FOCUSfocus (default) brings the app forward, switch changes the drawing without stealing focus, off only writes files.
EXCALIDRAW_LIBRARY_DIRWhere the drawings live. See above for the App Store copy.
EXCALIDRAW_APPA program to launch instead of the installed Sketchshelf.

If something's off

Still stuck? Get help.