Skip to main content
Glama
excalidraw-editor-mcp

excalidraw-editor-mcp

excalidraw-editor-mcp

中文

An Excalidraw editor delivered as an MCP App for DeepSeek Harness (DSH). It uses the official @excalidraw/excalidraw component and stores standard .excalidraw files in the active DSH Workspace.

Features

  • Managed multi-canvas projects and discovered standalone canvases.

  • Semantic inspect and atomic revision-checked edits.

  • Interactive inline/fullscreen editing with save, reload, conflict recovery, and Ask AI.

  • Bounded local PNG, JPEG, GIF, and WebP assets. Network images are rejected.

  • JSON, SVG, and PNG downloads through the MCP Host.

  • Revision-bound Browser captures with a standard MCP PNG and text clipping diagnostics for AI verification.

  • Self-contained App HTML, including all Excalidraw fonts; no runtime CDN is required.

Related MCP server: Excalidraw MCP App Server

Requirements

  • Node.js >=22.19.0

  • pnpm 10.25.0

  • DSH Web with @creative-dswork/dsh-uni-editor

Build And Pack

pnpm install --frozen-lockfile
pnpm run release:check
pnpm pack --pack-destination .tmp

The package intentionally remains private: true at version 0.0.0. Before publishing, a maintainer must choose the release version, remove the private guard, inspect the tarball, and confirm third-party notices.

Configure DSH

Install the tarball into a directory and point DSH at its executable:

mkdir -p /absolute/path/to/excalidraw-mcp-install
cd /absolute/path/to/excalidraw-mcp-install
pnpm init
pnpm add /absolute/path/to/excalidraw-editor-mcp-0.0.0.tgz

Copy examples/dsh/cordis.patch.yml into the Web profile configuration and replace the placeholder paths. The essential server entry is:

- id: mcp-apps
  config:
    maxBodyBytes: 33554432
    servers:
      - serverName: excalidraw
        transport: stdio
        command: /absolute/path/to/excalidraw-mcp-install/node_modules/.bin/excalidraw-editor-mcp
        args: []
        cwd: /absolute/path/to/excalidraw-mcp-install
        forwardWorkspace: true

forwardWorkspace is required. The server accepts the Workspace only from trusted DSH request metadata. maxBodyBytes allows the Host to carry the self-contained App Resource and embedded fonts.

Validate and start the Web profile:

DSH_HOME="${DSH_HOME:-$HOME/.dsh}" pnpm dsh web --dump-config
DSH_HOME="${DSH_HOME:-$HOME/.dsh}" pnpm dsh web --host 127.0.0.1 --port 3080 --no-open

Open http://127.0.0.1:3080/, select a Workspace, and start a Session. Tools are exposed with the configured prefix, such as mcp__excalidraw__create_project.

AI Visual Verification

After an edit, keep the canvas View open and call capture_canvas with the exact saved revision. The View renders the canvas with Excalidraw's official exportToBlob API and returns:

  • a standard MCP image/png content block;

  • the image dimensions, SHA-256 digest, and capture time;

  • bounded text diagnostics with stored width, measured width, overflow, and clipping state.

Image-capable models can inspect the PNG directly. If the selected model does not declare image input, DSH reports that limitation and the model can still use the text diagnostics. In that case, the result does not prove that the model inspected the pixels.

Safety Limits

  • Asset source: regular file inside the active Workspace only; no URL, symlink, or hardlink.

  • Asset types: PNG, JPEG, GIF, or WebP with a valid image header.

  • Per asset: 1 MiB; decoded assets per canvas: 2 MiB.

  • Dimensions: at most 8192 by 8192 and 32 million pixels.

  • Canonical canvas document: 4 MiB.

  • Model-visible tool result: 256 KiB.

  • Harness capture: at most 1024 by 1024, 512 KiB of base64 image data, and 100 text diagnostics; one pending capture per Session connection with a 15-second timeout.

  • All writes use revision checks; rejected mutations preserve the old file.

Development

pnpm typecheck
pnpm test
pnpm run release:check

Architecture and milestone details are in docs/DESIGN.md and docs/IMPLEMENTATION-PLAN.md.

Available Tools

25 tools
add_canvas_assetAdd Excalidraw canvas assetC

Imports one bounded local raster image from the current Workspace.

Inputs: canvasPath (required), mutationId (required), sourcePath (required), projectPath (required), +1 more.

apply_canvas_changesApply Excalidraw canvas changesB

Atomically applies semantic element and canvas changes at one base revision.

Inputs: changes (required), canvasPath (required), mutationId (required), projectPath (required), +1 more.

capture_canvasCapture Excalidraw canvasA

Returns a standard MCP PNG rendered by the open Browser View plus text clipping diagnostics. Image-capable models can inspect the PNG; other models can still use the diagnostics. The View must already be open on the same saved canvas revision.

Inputs: revision (required), canvasPath (required), projectPath (required), maxWidth, +1 more.

check_canvasCheck Excalidraw canvasC

Checks that a canvas is a valid bounded standard document.

Inputs: canvasPath (required), projectPath (required).

create_canvasCreate Excalidraw canvasB

Creates and opens an empty canvas inside one project.

Inputs: canvasPath (required), mutationId (required), projectPath (required), baseProjectRevision (required).

create_projectCreate Excalidraw projectC

Creates a managed project and opens its default canvas.

Inputs: name (required), mutationId (required), projectPath (required), defaultCanvasPath.

delete_canvasDelete Excalidraw canvasA

Deletes a canvas after exact path and revision confirmation.

Inputs: canvasPath (required), mutationId (required), projectPath (required), baseRevision (required), +1 more.

delete_projectDelete Excalidraw projectB

Deletes a managed project after exact path and revision confirmation.

Inputs: mutationId (required), projectPath (required), confirmProjectPath (required), baseProjectRevision (required).

duplicate_canvasDuplicate Excalidraw canvasC

Copies a canvas inside the same project.

Inputs: canvasPath (required), mutationId (required), projectPath (required), baseRevision (required), +1 more.

duplicate_projectDuplicate Excalidraw projectC

Copies a managed project when its project revision is current.

Inputs: mutationId (required), projectPath (required), newProjectPath (required), baseProjectRevision (required), +1 more.

export_canvasExport Excalidraw canvasB

Opens the export View and downloads the saved canvas as JSON, SVG, or PNG.

Inputs: format (required), canvasPath (required), projectPath (required).

inspect_canvasInspect Excalidraw canvasC

Returns filtered, paginated semantic elements and optionally a small standard document.

Inputs: canvasPath (required), projectPath (required), ids, text, +4 more.

inspect_projectInspect Excalidraw projectC

Returns a bounded project and canvas summary.

Inputs: projectPath (required).

list_canvasesList Excalidraw canvasesA

Lists canvases in one project.

Inputs: projectPath (required).

list_projectsList Excalidraw projectsA

Lists managed and discovered Excalidraw projects in the current Workspace.

Inputs: no named parameters.

open_canvasOpen Excalidraw canvasC

Opens one canvas inside its project.

Inputs: canvasPath (required), projectPath (required).

open_projectOpen Excalidraw projectA

Opens the default canvas of an existing Excalidraw project.

Inputs: projectPath (required).

pull_canvasPull Excalidraw canvasB

Returns the bound document when the app revision is stale.

Inputs: canvasPath (required), currentRevision.

push_canvasSave Excalidraw canvasC

Saves the bound standard document with compare-and-swap.

Inputs: document (required), canvasPath (required), mutationId (required), baseRevision (required).

remove_unused_assetsRemove unused Excalidraw canvas assetsB

Atomically removes files not referenced by any live image element.

Inputs: canvasPath (required), mutationId (required), projectPath (required), baseRevision (required).

rename_canvasRename Excalidraw canvasC

Renames a canvas inside the same managed project.

Inputs: canvasPath (required), mutationId (required), projectPath (required), baseRevision (required), +1 more.

rename_projectRename Excalidraw projectC

Renames a managed project when its project revision is current.

Inputs: mutationId (required), projectPath (required), newProjectPath (required), baseProjectRevision (required), +1 more.

replace_canvasReplace Excalidraw canvasC

Validates, restores, and atomically replaces one complete standard document.

Inputs: document (required), canvasPath (required), mutationId (required), projectPath (required), +1 more.

report_canvas_captureReport Excalidraw canvas captureC

Settles one pending Canvas Harness capture from the bound Browser View.

Inputs: outcome (required), commandId (required).

save_canvas_copySave Excalidraw canvas copyC

Saves the bound draft as a new canvas in the same project.

Inputs: document (required), canvasPath (required), mutationId (required), newCanvasPath (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools have clear, distinct purposes, especially the project vs. canvas CRUD operations. Some slight overlap exists among retrieve/render/modify tools like inspect_canvas vs. pull_canvas, export_canvas vs. capture_canvas, and push_canvas vs. replace_canvas, but their descriptions sufficiently differentiate them.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun snake_case pattern across the entire set, such as list_projects, create_canvas, delete_canvas, and export_canvas. Pluralization is used logically for collection operations, and no mixed naming conventions are present.

    Tool Count3/5

    At 25 tools, the set sits at the heavy end of the acceptable range. Each tool appears purpose-driven for Excalidraw editing workflows, but the count feels somewhat large and could be consolidated, especially around canvas mutation and retrieval operations.

    Completeness4/5

    The tool surface covers project and canvas CRUD, inspection, import/export, rendering, synchronization, and asset management. Minor gaps exist around more granular asset handling and direct deletion of specific assets, but the core Excalidraw editing lifecycle is well represented.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to build, edit, organize, and export Excalidraw diagrams (architecture, flowcharts, etc.) entirely headless, producing .excalidraw files, SVG, and PNG renders.
      3,392 npm
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding assistants to generate and revise hand-drawn Excalidraw diagrams across 25 types, including architecture, flowcharts, sequence diagrams, Gantt charts, and charts, with automatic layout, styling, and offline SVG/PNG export. It can also optionally maintain a queryable architecture knowledge graph for version-controlled system models.
      -