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
- Output
update_element
Update properties of an existing element.
- Input
- Output
delete_element
Remove an element from the scene.
- Input
- Output
query_elements
List elements matching optional filters.
- Input
- Output
Resource Management
get_resource
Retrieve scene or library information.
- Input
- 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
- Output
align_elements
Align multiple elements to specified edge or center.
- Input
- Output
{ aligned: true, elementIds: […], alignment: "<alignment>" }
distribute_elements
Evenly space elements horizontally or vertically.
- Input
- Output
{ distributed: true, elementIds: […], direction: "<direction>" }
lock_elements
/ unlock_elements
Prevent or allow editing of elements.
- Input
- Output
{ locked: true|false, elementIds: […] }
Scene Management
save_scene
Export current scene (elements + appState) to a .excalidraw
file.
- Input
- 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
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
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.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.Last updated -313232TypeScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables LLMs to create, modify, and manipulate Excalidraw diagrams through a structured API.Last updated -1110645JavaScript
- -securityFlicense-qualityA Model Context Protocol server that provides API functionality for creating, managing, and exporting Excalidraw drawings in various formats like SVG, PNG, and JSON.Last updated -3JavaScript
- -securityFlicense-qualityA Model Context Protocol server that connects LLMs to the Compiler Explorer API, enabling them to compile code, explore compiler features, and analyze optimizations across different compilers and languages.Last updated -Python