Excalidraw MCP Server: Powerful Drawing API for LLM Integration
A comprehensive Model Context Protocol (MCP) server that enables seamless interaction with Excalidraw diagrams and drawings. This server provides LLMs (Large Language Models) with the ability to create, modify, query, and manipulate Excalidraw drawings through a structured, developer‑friendly API.
Features
- Full Excalidraw Element Control
Create, update, delete, and query any Excalidraw element (rectangle, ellipse, diamond, text, arrow, etc.), including support for:- position (
x
,y
) - dimensions (
width
,height
) - styling (
backgroundColor
,strokeColor
,strokeWidth
,roughness
,opacity
) - text (
text
,fontSize
,fontFamily
) - line geometry (
points
) - locking (
locked
flag)
- position (
- Advanced Element Manipulation
Group, ungroup, align, distribute, lock, and unlock elements. - Scene & AppState Management
- Track and modify scene‑level state:
theme
,viewBackgroundColor
,viewport
(scroll & zoom),selectedElements
,groups
. - Retrieve library of all elements or individual scene properties.
- Track and modify scene‑level state:
- Save Scene
Export the current scene (elements + appState) to a.excalidraw
file on disk. - Resource Management
Access and modify scene information, element library, theme, and raw element data. - Easy Integration
Compatible with Claude Desktop, Cursor, and any other LLM platforms that support MCP. - Docker Support
Simple containerized deployment for zero‑dependency installs.
API Tools Reference
Element Creation and Modification
create_element
Create a new Excalidraw element.
- Input Copy
- Output Copy
update_element
Update properties of an existing element.
- Input Copy
- Output Copy
delete_element
Remove an element from the scene.
- Input Copy
- Output Copy
query_elements
List elements matching optional filters.
- Input Copy
- Output Copy
Resource Management
get_resource
Retrieve scene or library information.
- Input Copy
- Output
- scene →
{ theme, viewport: {x,y,zoom}, selectedElements: […] }
- library/elements →
{ elements: [ … ] }
- theme →
{ theme: "light"|"dark" }
- scene →
Element Organization
group_elements
/ ungroup_elements
Group or ungroup element collections.
- Input Copy
- Output Copy
align_elements
Align multiple elements to specified edge or center.
- Input Copy
- Output
{ aligned: true, elementIds: […], alignment: "<alignment>" }
distribute_elements
Evenly space elements horizontally or vertically.
- Input Copy
- Output
{ distributed: true, elementIds: […], direction: "<direction>" }
lock_elements
/ unlock_elements
Prevent or allow editing of elements.
- Input Copy
- Output
{ locked: true|false, elementIds: […] }
Scene Management
save_scene
Export current scene (elements + appState) to a .excalidraw
file.
- Input Copy
- Output
Scene saved successfully to <filename>
or error message.
Integration Examples
Claude Desktop
Cursor
Create .cursor/mcp.json
:
Docker
Or in MCP config:
Installation Guide
Docker
Configuration Options
Set via environment variables in .env
or your container:
LOG_LEVEL
— logging level (default:"info"
)DEBUG
— debug mode ("true"
/"false"
, default:"false"
)DEFAULT_THEME
— default UI theme ("light"
/"dark"
, default:"light"
)
Usage Examples
Create & Lock a Rectangle
Save Scene to File
This server cannot be installed
A Model Context Protocol server that enables LLMs to create, modify and manipulate Excalidraw diagrams through a structured API, supporting element creation, styling, organization, and scene management.