Model Context Protocol server enabling Large Language Models to create, modify, query, and manage Excalidraw diagrams with full element control, scene management, grouping, alignment, and export capabilities via a developer-friendly API.
Unlock the full potential of Excalidraw MCP Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
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.
x
, y
)width
, height
)backgroundColor
, strokeColor
, strokeWidth
, roughness
, opacity
)text
, fontSize
, fontFamily
)points
)locked
flag)theme
, viewBackgroundColor
, viewport
(scroll & zoom), selectedElements
, groups
..excalidraw
file on disk.create_element
Create a new Excalidraw element.
{ "type": "", "x": , "y": , "width": , "height": , "points": [{"x":,"y":}…], "backgroundColor": "", "strokeColor": "", "strokeWidth": , "roughness": , "opacity": , "text": "", "fontSize": , "fontFamily": "", "locked": }
{ "id": "", "type": "", "created": true }
update_element
Update properties of an existing element.
{ "id": "", }
{ "id": "", "updated": true, "version": }
delete_element
Remove an element from the scene.
{ "id": "" }
{ "id": "", "deleted": true }
query_elements
List elements matching optional filters.
{ "type": "", "filter": { "": } }
[ { /* element objects */ } … ]
get_resource
Retrieve scene or library information.
{ "resource": "scene"|"library"|"theme"|"elements" }
{ theme, viewport: {x,y,zoom}, selectedElements: […] }
{ elements: [ … ] }
{ theme: "light"|"dark" }
group_elements
/ ungroup_elements
Group or ungroup element collections.
{ "elementIds": ["id1","id2",…] } { "groupId": "" }
{ "groupId": "", "elementIds": […], "ungrouped": true? }
align_elements
Align multiple elements to specified edge or center.
{ "elementIds": […], "alignment": "left"|"center"|"right"|"top"|"middle"|"bottom" }
{ aligned: true, elementIds: […], alignment: "" }
distribute_elements
Evenly space elements horizontally or vertically.
{ "elementIds": […], "direction": "horizontal"|"vertical" }
{ distributed: true, elementIds: […], direction: "" }
lock_elements
/ unlock_elements
Prevent or allow editing of elements.
{ "elementIds": [… ] }
{ locked: true|false, elementIds: […] }
save_scene
Export current scene (elements + appState) to a .excalidraw
file.
{ "filename": "" }
Scene saved successfully to
or error message."mcpServers": { "excalidraw": { "command": "node", "args": ["src/index.js"], "env": { "LOG_LEVEL": "info", "DEBUG": "false" } } }
Create .cursor/mcp.json
:
{ "mcpServers": { "excalidraw": { "command": "node", "args": ["/absolute/path/to/mcp_excalidraw/src/index.js"], "env": { "LOG_LEVEL": "info", "DEBUG": "false" } } } }
docker run -i --rm mcp/excalidraw
Or in MCP config:
"mcpServers": { "excalidraw": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/excalidraw"], "env": { "LOG_LEVEL": "info", "DEBUG": "false" } } }
# Install dependencies npm install # Run development server npm start
docker build -t mcp/excalidraw . docker run -i --rm mcp/excalidraw
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"
){"type":"rectangle","x":50,"y":50,"width":100,"height":80,"backgroundColor":"#f3f3f3","strokeColor":"#333","locked":true} { "id":"abc123","type":"rectangle","created":true } {"elementIds":["abc123"]}
{"filename":"my_drawing.excalidraw"} "Scene saved successfully to my_drawing.excalidraw"
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!