Excalidraw MCP Server
STDIOComprehensive server enabling LLMs to interact with Excalidraw diagrams through structured API.
Comprehensive server enabling LLMs to interact with Excalidraw diagrams through structured API.
📣 NEWS: Version 1.0.0 is now published to npm! You can run Excalidraw MCP directly using
npx excalidraw-mcp
without installation. No setup required - just run and enjoy!
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.
You can run the Excalidraw MCP server directly using npx without installing anything:
npx excalidraw-mcp
If you prefer to install it globally:
npm install -g excalidraw-mcp excalidraw-mcp
The following command-line options are available:
-d, --debug Enable debug logging
-?, --help Show this help message
Note: The following options are currently only fully functional in the Docker version:
-p, --port <port> Port to run the server on (default: 3000) -h, --host <host> Host to bind the server to (default: localhost) -m, --mode <mode> Transport mode: 'stdio' or 'http' (default: stdio)
Run with default options:
npx excalidraw-mcp
Enable debug logging:
npx excalidraw-mcp --debug
create_element
type
, x
, y
coordinatesupdate_element
id
of the element to updatedelete_element
id
of the element to deletequery_elements
type
to filter by element type, filter
object with key-value pairsresource
type (scene, library, theme, elements)group_elements
elementIds
array of element IDs to groupungroup_elements
groupId
of the group to ungroupalign_elements
elementIds
array and alignment
(left, center, right, top, middle, bottom)distribute_elements
elementIds
array and direction
(horizontal or vertical)lock_elements
elementIds
array of elements to lockunlock_elements
elementIds
array of elements to unlockTo use this server with the Claude Desktop application, add the following configuration to the "mcpServers" section of your claude_desktop_config.json
:
{ "mcpServers": { "mcp_excalidraw": { "command": "npx", "args": ["-y", "excalidraw-mcp"] } } }
To use this server with the Cursor application, add the following configuration to the "mcpServers" section of your .cursor/mcp.json
:
{ "mcpServers": { "mcp_excalidraw": { "command": "npx", "args": ["-y", "excalidraw-mcp"] } } }
To use this server with Cursor, create a .cursor/mcp.json
file in your workspace with the following configuration:
{ "mcpServers": { "mcp_excalidraw": { "command": "npx", "args": ["-y", "excalidraw-mcp"] } } }
Make sure to:
/path/to/your/directory
with the actual absolute path to your mcp_excalidraw installation.cursor
directory if it doesn't existindex.js
is correct and the file exists{ "mcpServers": { "excalidraw": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/excalidraw"], "env": { "LOG_LEVEL": "info", "DEBUG": "false" } } } }
# Install globally npm install -g excalidraw-mcp # Run the server excalidraw-mcp
# Clone the repository git clone <repository-url> cd excalidraw-mcp # Install dependencies npm install # Start the server npm start
# Build the Docker image docker build -t mcp/excalidraw . # Run the container docker run -i --rm mcp/excalidraw
The server can be configured using the following environment variables:
LOG_LEVEL
- Set the logging level (default: "info")DEBUG
- Enable debug mode (default: "false")DEFAULT_THEME
- Set the default theme (default: "light")Here are some practical examples of how to use the Excalidraw MCP server:
{ "type": "rectangle", "x": 100, "y": 100, "width": 200, "height": 100, "backgroundColor": "#ffffff", "strokeColor": "#000000", "strokeWidth": 2, "roughness": 1 }
{ "type": "rectangle", "filter": { "strokeColor": "#000000" } }
{ "elementIds": ["elem1", "elem2", "elem3"] }
This Excalidraw MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Clone the repository and install dependencies:
git clone <repository-url> cd excalidraw-mcp npm install
Start the development server:
npm run dev