mcp_excalidraw

by @yctimlin

Excalidraw MCP Server

Give coding agents a live local Excalidraw workbench they can draw on, inspect via headless PNG screenshots, refine element by element, and commit as repo artifacts. Runs locally on Node 20+ via CLI, 27 stdio MCP tools, or REST with no API keys.

Design & Creative2,687nodeMIT

Server facts

mcp_excalidraw MCP Server

GitHub stars

2,687

Last commit

Nov 10, 2026

Runtime

node

License

MIT

Tech

Runtime
node
Transports
stdio
Remote access
No
Authentication
None

Activity

GitHub stars
2,687
Last commit
Data as of

Tags

  • drawing api
  • excalidraw
  • mcp excalidraw

Overview

Unlike Excalidraw's official chat-widget MCP that streams single-prompt visuals into a conversation, `mcp-excalidraw-server` gives coding agents a persistent local diagramming workbench. Under the hood, an auto-started canvas server (`http://127.0.0.1:3000`) pairs an Excalidraw web UI, REST API, and WebSocket sync with your choice of CLI (`npx -y mcp-excalidraw-server`), agent skill, or a 27-tool stdio MCP server speaking both MCP `2026-07-28` and legacy `initialize`. Agents create and patch individual elements, check layouts via `describe_scene` and deterministic headless PNG screenshots rendered in Node without a browser tab, and export byte-stable `.excalidraw`, Obsidian `.excalidraw.md`, or editable `.excalidraw.png` files straight into your repository.

Setup needs only Node.js 20 or higher and zero API keys under the MIT license: register `npx -y mcp-excalidraw-server` in Claude Desktop, Cursor, Claude Code (`claude mcp add`), Codex CLI, OpenCode, or Antigravity—or install the portable CLI skill via `install-skill` for coding agents. By default scenes stay in memory and reset on restart; set `EXCALIDRAW_DATA_DIR` for atomic local persistence across restarts. Note that Mermaid conversion and `set_viewport` still require an open browser tab, while MCP file reads and writes stay sandboxed inside `EXCALIDRAW_EXPORT_DIR`.

Install & configure

Requirements

  • Node.js >= 20
  • Optional Docker runtime for separate canvas and stdio MCP containers
  • Open browser tab at http://127.0.0.1:3000 only when using Mermaid conversion, viewport controls, or live viewing
Documented launch / install command
npx -y mcp-excalidraw-server

Add `npx -y mcp-excalidraw-server` under `mcpServers` for Claude Desktop, Cursor, or Antigravity, or run `claude mcp add excalidraw --scope user -- npx -y mcp-excalidraw-server`. Coding agents can alternatively install the CLI skill via `npx -y mcp-excalidraw-server install-skill --dir <dir>`.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "excalidraw": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "excalidraw": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
create_elementAdds a single Excalidraw shape, text, arrow, or frame element to the live canvas.
batch_create_elementsCreates multiple diagram shapes and bound arrows in a single call.
get_elementReads detailed properties for a specific element ID on the canvas.
update_elementModifies position, styling, text, or metadata on an existing element.
delete_elementRemoves an element from the active Excalidraw scene.
query_elementsFilters elements on the canvas by type, bounding box, or typed attribute matches.
duplicate_elementsClones selected elements on the canvas for repeatable diagram components.
align_elementsAligns multiple elements along edges or centers to clean up diagram geometry.
distribute_elementsDistributes spacing evenly across a set of diagram elements.
group_elementsGroups element IDs together using native canvas groupIds.
ungroup_elementsUngroups previously grouped elements across sessions.
describe_sceneReturns an AI-readable structured text summary of element IDs, coordinates, labels, and arrow connections.
get_canvas_screenshotRenders a deterministic headless PNG screenshot inside the canvas server so agents can inspect overlaps and labels.
get_selectionReturns currently selected element IDs and count from the active browser tab.
export_sceneExports deterministic `.excalidraw`, `.json`, or Obsidian `.excalidraw.md` files inside `EXCALIDRAW_EXPORT_DIR`.
import_sceneImports `.excalidraw`, `.json`, Obsidian `.excalidraw.md`, or embedded-scene `.png` diagrams onto the canvas.
export_to_imageExports the diagram or a specific frame/subset to PNG or SVG with dark mode, scale, and optional embedded scene.
export_to_excalidraw_urlUploads an AES-GCM encrypted scene to excalidraw.com (or a self-hosted backend) and returns a shareable link.
create_from_mermaidConverts Mermaid syntax into editable Excalidraw elements merged onto the canvas (requires an open browser tab).
snapshot_sceneSaves a named server-side scene checkpoint for rollback via `restore_snapshot`.

Use cases

  • Generate architecture diagrams in Claude Code or Cursor, verify legibility via headless screenshots, and commit byte-stable `.excalidraw` files.
  • Export Obsidian-compatible `.excalidraw.md` diagrams directly into a knowledge vault without breaking block references.
  • Create README-ready `.excalidraw.png` images with embedded scene data so visuals stay re-importable and editable.
  • Render committed `.excalidraw` diagrams offline in CI pipelines via `npx -y mcp-excalidraw-server render`.

Strengths

  • Headless PNG and SVG rendering lets agents visually inspect and fix overlapping labels without opening a browser.
  • Zero API keys required; runs locally under MIT with auto-started canvas server and optional `EXCALIDRAW_DATA_DIR` persistence.
  • Supports CLI + Agent Skill, 27 stdio MCP tools (MCP 2026-07-28 and legacy), REST API, and self-hosted share backends.

Limitations

  • Mermaid diagram conversion (`create_from_mermaid`) and `set_viewport` still require an open browser tab.
  • Canvas state is in-memory by default and clears on restart unless `EXCALIDRAW_DATA_DIR` is configured.
  • Canvas HTTP/WebSocket server has no built-in authentication and should stay bound to `127.0.0.1` (or accessed over SSH tunnel) on untrusted networks.

mcp_excalidraw setup notes

  • mcp_excalidraw's stdio example needs a client that launches local processes.

Frequently asked questions

The official Excalidraw MCP is an inline chat widget with two tools for prompt-to-diagram rendering. `mcp-excalidraw-server` provides a persistent local workbench with 27 element-level CRUD and layout tools, headless screenshots, snapshots, and `.excalidraw` file exports.

Related MCP servers