← Back to directory
E

Excalidraw MCP Server

Community
A live Excalidraw canvas for AI agents to create, edit, and export diagrams programmatically.
GitHub source repository ↗
★ 2.3k Stars Category · Collaboration Very popular Source revision ff42de9e352e
43FMRS · D
Reliability
4/20
Security and permissions
6/20
Maintenance
5/20
Documentation
16/20
Setup experience
12/20

This server is powerful and well-suited for agents needing programmatic diagram control. It provides element-level CRUD, layout tools, screenshot feedback, and file export, especially useful for diagrams as repo artifacts. However, note that the canvas is in-memory and clears on restart, and screenshots require a browser tab.

Read the FMRS scoring method →

mcp-excalidraw-server gives AI agents a live Excalidraw canvas to draw on, look at, refine, and save into your repo. Agents can create architecture diagrams and flowcharts programmatically, see their own work via screenshots, fix layout issues, and export .excalidraw files that live alongside code. Core drawing runs fully locally with no API keys (Node ≥ 18, MIT licensed). It offers a CLI, an MCP server with 26 tools, and a REST API.

Tools

create_element
Create an element
get_element
Get a single element
update_element
Update an element
delete_element
Delete an element
query_elements
Query elements by criteria
batch_create_elements
Batch create elements
duplicate_elements
Duplicate elements
align_elements
Align elements
distribute_elements
Distribute elements
group_elements
Group elements
ungroup_elements
Ungroup elements
lock_elements
Lock elements
unlock_elements
Unlock elements
describe_scene
Get a text summary of the scene
get_canvas_screenshot
Get a screenshot of the canvas
export_scene
Export scene to .excalidraw file
import_scene
Import a .excalidraw file
export_to_image
Export to image (PNG/SVG)
export_to_excalidraw_url
Export to a shareable excalidraw.com URL
create_from_mermaid
Create a diagram from Mermaid code
clear_canvas
Clear the canvas
snapshot_scene
Create a scene snapshot
restore_snapshot
Restore a scene snapshot
set_viewport
Set the viewport
read_diagram_guide
Read the diagram guide
get_resource
Get a resource

Setup

Prerequisite: Node.js ≥ 18.

  1. Add the following configuration to your Claude Desktop config file:
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": ["-y", "mcp-excalidraw-server"]
    }
  }
}
  1. Save and restart Claude Desktop.
  2. Or use the CLI: npx -y mcp-excalidraw-server start.
claude_desktop_config.json
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-excalidraw-server"
      ]
    }
  }
}

Fit and risk

Best for

  • Programming agents that need iterative diagram design
  • Teams that want diagrams managed as repository artifacts
  • Environments using agents like Claude Code, Cursor

Not for

  • One-shot diagram generation where the official MCP might be simpler
  • Scenarios requiring persistent storage (canvas is in-memory by default, clears on restart)

Required permissions

  • Local network access: canvas server binds to 127.0.0.1:3000 by default
  • File system: export and import .excalidraw files
  • Optional share feature uploads an encrypted scene to excalidraw.com

Risks and side effects

  • Canvas data is stored in memory; restarting the server clears all elements
  • If configured to listen on non-loopback addresses, the API has no built-in authentication
  • Share feature depends on excalidraw.com service, may be affected by network

Troubleshooting

  1. CLI exit code 3: canvas unreachable, check EXPRESS_SERVER_URL or run `start`
  2. CLI exit code 4: screenshots and exports require a browser tab open to the canvas, open http://127.0.0.1:3000
  3. Canvas not updating: confirm EXPRESS_SERVER_URL points to the running canvas server

Use cases

Let AI agents create and edit architecture diagrams and flowcharts in real time
Export diagrams as repository artifacts that stay in sync with code changes
Edit and sync diagrams directly in Obsidian via the Excalidraw plugin
Drive diagram generation via CLI without MCP configuration

Supported clients

Claude DesktopFull support
Claude CodeFull support
CursorFull support
Codex CLIFull support
OpenCodeFull support
AntigravityFull support