excalidraw-mcp

Create and refine diagrams on a live Excalidraw canvas via MCP tools, with helper scripts for export/import workflows.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "excalidraw-mcp" with this command: npx skills add yctimlin/mcp_excalidraw/yctimlin-mcp-excalidraw-excalidraw-mcp

Excalidraw MCP

Overview

Create and refine diagrams on a live Excalidraw canvas via MCP tools, with helper scripts for export/import workflows.

Quick Start

  • Ensure the canvas server is reachable at EXPRESS_SERVER_URL (default http://localhost:3000 ).

  • Use MCP tools for interactive diagram edits; use scripts/*.cjs for file-ish workflows (export/import/clear/health).

  • For detailed endpoint/tool reference, read references/cheatsheet.md .

Workflow: Draw A Diagram (From Empty Canvas)

  • Confirm canvas is up:

  • Run node scripts/healthcheck.cjs (or GET /health ).

  • Optional: clear the canvas:

  • Run node scripts/clear-canvas.cjs .

  • Create shapes first (rectangles/diamonds/ellipses), using create_element .

  • Put text on shapes by setting the shape’s text field (do not create a separate text element unless you need standalone text).

  • Create arrows/lines after both endpoints exist.

  • Use align_elements / distribute_elements after rough placement; group only after layout stabilizes.

Workflow: Refine An Existing Diagram

  • Discover what’s already there:

  • Prefer get_resource with resource: "elements" or query_elements .

  • Identify targets by stable signals (id, type, label text), not by exact x/y.

  • Update with update_element (move/resize/colors/text) or delete with delete_element .

  • If deletes/updates “don’t work”, check:

  • You’re pointing to the right EXPRESS_SERVER_URL .

  • The element id exists on the canvas (use get_resource / GET /api/elements/:id ).

  • The element isn’t locked (use unlock_elements first).

Workflow: Export / Import (Repository-Friendly)

  • Export current elements to a JSON file:

  • node scripts/export-elements.cjs --out diagram.elements.json

  • Import elements (append) using batch create:

  • node scripts/import-elements.cjs --in diagram.elements.json --mode batch

  • Import elements (overwrite canvas) using sync:

  • node scripts/import-elements.cjs --in diagram.elements.json --mode sync

Notes:

  • --mode sync clears the canvas and then writes the provided elements (good for “make canvas match this file”).

  • If you want stable ids across updates, keep ids in the exported JSON; if you want fresh ids, regenerate before importing.

Workflow: CRUD Smoke Test (Create → Update → Delete)

  • Clear:

  • node scripts/clear-canvas.cjs

  • Create a large visible rectangle + label:

  • Use node scripts/create-element.cjs twice (rectangle + text).

  • Update:

  • Move the rectangle with node scripts/update-element.cjs .

  • Delete:

  • Remove both with node scripts/delete-element.cjs .

References

  • references/cheatsheet.md : MCP tool list + REST API endpoints + payload shapes

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

excalidraw-skill

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

Wip Ldm Os Private

LDM OS ... shared infrastructure for AI agents. Identity, memory, ownership, collaboration, compatibility, payments. One system across all your AIs.

Registry SourceRecently Updated
Automation

dchat

Decentralized P2P bot-to-bot messaging over NKN. Send and receive text, images, audio, and files without any centralized server. Private, encrypted, serverless.

Registry SourceRecently Updated
Automation

Ai Writing Agent

AI writing assistant that generates articles, blog posts, and structured content

Registry SourceRecently Updated