CLI for Excalidraw+ through the official MCP endpoint:
https://api.excalidraw.com/api/v1/mcp
Built with api2cli.dev. Published from Melvynx/excalidraw-cli.
npx api2cli install Melvynx/excalidraw-cliThis clones the repo, builds the CLI, links it to your PATH, and installs the AgentSkill to your coding agents.
Create an Excalidraw+ API key in your workspace settings, then either save it locally:
excalidraw-cli auth set "EXCALIDRAW_API_KEY"
excalidraw-cli auth testOr use an environment variable:
export EXCALIDRAW_API_KEY="EXCALIDRAW_API_KEY"
excalidraw-cli auth test --jsonToken file path: ~/.config/tokens/excalidraw-cli.txt, chmod 600.
excalidraw-cli --help
excalidraw-cli tools list --json
excalidraw-cli scenes list --limit 10 --json
excalidraw-cli collections list --jsonRaw MCP discovery and passthrough.
excalidraw-cli tools list --json
excalidraw-cli tools schema create_scene --json
excalidraw-cli tools call list_scenes --arg limit=10 --json
excalidraw-cli tools call create_collection --args-json '{"name":"Ideas"}' --jsonCreate, inspect, update, delete, search, and edit scenes.
excalidraw-cli scenes list --limit 10 --json
excalidraw-cli scenes create --name "Architecture" --collection-id COLLECTION_ID --json
excalidraw-cli scenes get SCENE_ID --json
excalidraw-cli scenes update SCENE_ID --name "New name" --json
excalidraw-cli scenes content SCENE_ID --json
excalidraw-cli scenes search SCENE_ID --query "Auth" --type rectangle --json
excalidraw-cli scenes format --json
excalidraw-cli scenes edit SCENE_ID --add '[{"type":"rectangle","x":100,"y":100,"width":220,"height":90,"label":{"text":"Hello","fontSize":20,"fontFamily":5}}]' --json
excalidraw-cli scenes delete SCENE_ID --jsonFor scenes edit:
--addis a JSON array string of new element skeletons. Do not includeid.--updateis a JSON array string of patches with real persistedidvalues.--deleteis a JSON array of element IDs.- Shape labels should use
label: { "text": "..." }. - Arrows pointing at shapes should include explicit
startBindingandendBinding.
excalidraw-cli collections list --json
excalidraw-cli collections create --name "Product diagrams" --json
excalidraw-cli collections get COLLECTION_ID --json
excalidraw-cli collections update COLLECTION_ID --name "Renamed" --json
excalidraw-cli collections scenes COLLECTION_ID --json
excalidraw-cli collections create-scene COLLECTION_ID --name "Flow" --json
excalidraw-cli collections delete COLLECTION_ID --jsonexcalidraw-cli workspace get --json
excalidraw-cli workspace update --name "Team Workspace" --json
excalidraw-cli workspace users --limit 20 --json
excalidraw-cli workspace user USER_ID --json
excalidraw-cli workspace update-user USER_ID --role admin --json
excalidraw-cli workspace remove-user USER_ID --jsonexcalidraw-cli invites list --json
excalidraw-cli invites create-email --email user@example.com --role member --json
excalidraw-cli invites create-link --role member --max-uses 5 --restricted-domains '["example.com"]' --json
excalidraw-cli invites get INVITE_ID --json
excalidraw-cli invites update INVITE_ID --role admin --json
excalidraw-cli invites delete INVITE_ID --jsonexcalidraw-cli logs list --limit 20 --operation update --json
excalidraw-cli logs list --date-from 2026-01-01T00:00:00Z --jsonAlways use --json when calling the CLI from agents or scripts.
Success envelope:
{ "ok": true, "data": { "example": true }, "meta": { "total": 1 } }Error envelope:
{ "ok": false, "error": { "code": 401, "message": "Authentication failed." } }bun install
bun run build
npx api2cli bundle excalidraw
npx api2cli link excalidraw
excalidraw-cli auth test --json