Excalidraw MCP Server logo

Excalidraw MCP Server

Community
Scofieldfree

excalidraw mcp

PublisherScofieldfree
Repositoryexcalidraw-mcp
LanguageTypeScript
Forks
5
Stars
91
Available tools
11
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Excalidraw MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 11 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    91 stars and 5 forks from the linked repository.

Excalidraw MCP Server

npm version License: MIT

An MCP (Model Context Protocol) server that empowers AI agents (like Claude, Cursor, Windsurf) to create, edit, and manage Excalidraw diagrams directly within your conversation.

Why Excalidraw? Its hand-drawn aesthetic and JSON-based format are perfect for rapid, programmable diagramming. This server bridges standard MCP clients with a local Excalidraw instance, enabling AI-powered visual thinking.

✨ Features

FeatureDescription
šŸŽØ Real-time PreviewChanges appear instantly in a local browser window via WebSocket
šŸ“ Smart LayoutAutomatically calculates text width and binds labels to containers
šŸ”„ Multi-SessionSwitch between different diagrams seamlessly
🧜 Mermaid SupportConvert Mermaid syntax to Excalidraw diagrams instantly
šŸ“¦ Export OptionsExport to PNG, SVG, or JSON formats
šŸ—ļø TemplatesBuilt-in architecture diagram templates

šŸš€ Quick Start

You don't need to clone this repo. Just configure your MCP client:

Claude Code (cc)

bash
claude mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcp

Codex CLI

bash
codex mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcp

Cursor / Windsurf

Go to Settings > MCP → Add New MCP Server:

FieldValue
Nameexcalidraw
Typecommand
Commandnpx -y @scofieldfree/excalidraw-mcp

Cline (VS Code Extension)

Open Cline settings and add to MCP Servers:

json
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": ["-y", "@scofieldfree/excalidraw-mcp"]
    }
  }
}

GitHub Copilot

Use the Copilot CLI to interactively add:

bash
/mcp add

Alternatively, create or edit ~/.copilot/mcp-config.json:

json
{
  "mcpServers": {
    "excalidraw": {
      "type": "local",
      "command": "npx",
      "tools": ["*"],
      "args": ["-y", "@scofieldfree/excalidraw-mcp"]
    }
  }
}

Kiro

Follow the MCP Servers documentation. Add to .kiro/settings/mcp.json:

json
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": ["-y", "@scofieldfree/excalidraw-mcp"]
    }
  }
}

opencode

bash
opencode mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcp

VS Code

One-click install:

Or install via CLI:

bash
# For VS Code
code --add-mcp '{"name":"excalidraw","command":"npx","args":["-y","@scofieldfree/excalidraw-mcp"]}'

# For VS Code Insiders
code-insiders --add-mcp '{"name":"excalidraw","command":"npx","args":["-y","@scofieldfree/excalidraw-mcp"]}'

Claude Desktop

Add to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": ["-y", "@scofieldfree/excalidraw-mcp"]
    }
  }
}

šŸ› ļø Available Tools

ToolDescription
start_sessionStart browser preview and open Excalidraw editor
add_elementsAdd shapes, text, arrows to the canvas
update_elementModify existing element properties
delete_elementRemove elements from canvas
get_sceneRetrieve current diagram state
create_from_mermaidConvert Mermaid syntax to Excalidraw
add_template_architectureAdd a pre-built architecture diagram template
create_diagramCreate a new diagram or clear existing
export_diagramExport diagram to PNG, SVG, or JSON
list_sessionsList all active diagram sessions
delete_diagramDelete a diagram session

šŸ’¬ Usage Examples

Example 1: Create a Simple Diagram

You say:

"Draw a flowchart with three boxes: Input → Process → Output"

AI uses:

start_session → add_elements (3 rectangles + 2 arrows)

Example 2: Convert Mermaid to Excalidraw

You say:

"Convert this Mermaid diagram to Excalidraw: graph LR: A[User] --> B[API Gateway] --> C[Service] --> D[(Database)]"

AI uses:

start_session → create_from_mermaid

Example 3: Architecture Diagram

You say:

"Create an architecture diagram for a microservices system"

AI uses:

start_session → add_template_architecture (or) add_elements with custom layout

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                     AI Agent (Claude/Cursor)                │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                          │ MCP Protocol (JSON-RPC over stdio)
                          ā–¼
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                   Excalidraw MCP Server                     │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  │
│  │ Tool Router │──│ State Store │──│ WebSocket Broadcast │  │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                                                 │ WebSocket
                                                 ā–¼
                          ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                          │     Browser (Excalidraw Editor)   │
                          ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ”§ Development

Prerequisites

  • Node.js >= 18
  • pnpm >= 9

Setup

bash
# Clone the repository
git clone https://github.com/Scofieldfree/excalidraw-mcp.git
cd excalidraw-mcp

# Install dependencies
pnpm install

# Start development server
pnpm dev

Scripts

CommandDescription
pnpm devStart dev server (backend + frontend)
pnpm buildBuild for production
pnpm typecheckRun TypeScript type checking
pnpm lintRun ESLint
pnpm releaseCreate a new release version

šŸ“¦ Project Structure

excalidraw-mcp/
ā”œā”€ā”€ packages/
│   └── mcp-server/          # Core MCP server + Excalidraw frontend
│       ā”œā”€ā”€ src/
│       │   ā”œā”€ā”€ index.ts     # Entry point
│       │   ā”œā”€ā”€ state.ts     # Session state management
│       │   ā”œā”€ā”€ http-server.ts
│       │   └── tools/       # MCP tool implementations
│       └── web/             # Excalidraw React frontend
ā”œā”€ā”€ docs/                    # Documentation
└── package.json             # Workspace configuration

šŸ› Troubleshooting

Port Already in Use

The server automatically finds an available port starting from 3100. If you need a specific port, set the PORT environment variable.

Browser Doesn't Open

Ensure you have a default browser configured. The server uses the open package to launch the browser.

WebSocket Connection Failed

Check if any firewall or antivirus is blocking WebSocket connections on localhost.


šŸ¤ Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ“œ License

MIT Ā© Scofieldfree


šŸ”— Links

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "excalidraw": {
      "command": "npx",
      "args": [
        "-y",
        "@scofieldfree/excalidraw-mcp"
      ]
    }
  }
}

Available Tools

  • start_session

    Start browser preview and open Excalidraw editor interface.

    Multi-session support:

    • No sessionId: Uses default session (default)
    • sessionId specified: Open/Create specific session
    • Multiple sessions can be opened simultaneously for different diagrams

    After calling this tool:

    1. Browser window opens automatically
    2. Excalidraw editor loads
    3. WebSocket realtime connection is established

    Please pass the same sessionId when using tools like add_elements, update_element subsequently.

  • list_sessions

    List all currently active Excalidraw sessions.

  • create_diagram

    Create a new diagram or clear an existing session.

    This action will:

    1. If a sessionId is specified, clear all elements in that session.
    2. If no sessionId is specified, create a new session.
    3. Reset the application state.

    Usage scenarios: • Starting a new project (no sessionId specified) • Clearing an existing diagram (sessionId specified) • Creating multiple independent diagrams (specify different sessionIds each time)

  • delete_diagram

    Delete the specified diagram session.

    Note: This will completely delete the session and all its elements, and cannot be undone. If you only want to clear elements but keep the session, use create_diagram and specify the sessionId.

  • add_elements

    Add multiple Excalidraw elements to the canvas.

    Supported element types:

    • rectangle
    • ellipse
    • diamond
    • arrow
    • text
    • line
    • freedraw
    • image
    • frame/magicframe
    • iframe/embeddable

    Style options:

    • strokeColor: e.g. #1e1e1e
    • backgroundColor: e.g. #D97706
    • fillStyle: solid/hachure/cross-hatch
    • strokeWidth: 1-4
    • roughness: 0=architect, 1=artist, 2=cartoonist

    Advanced options:

    • label: Auto-create bound text inside shape/arrow containers
    • start/end: Arrow endpoint binding to new or existing elements
    • containerId: DEPRECATED (use label instead)

    Multi-session support: Specify sessionId to target a specific session.

  • create_from_mermaid

    Create diagram elements from Mermaid syntax.

    Converts Mermaid text to Excalidraw elements through connected browser client. If browser is not connected yet, request is queued and sent after websocket ready. Returns clear errors for timeout and mermaid syntax problems.

  • add_template_architecture

    Add a built-in architecture diagram template to the canvas.

    This template visualizes the MCP server architecture with grouped layers and connected arrows. By default it resets the current session before adding template elements.

  • update_element

    Update attributes of an existing element.

    Updatable attributes:

    • x, y: Position coordinates
    • width, height: Dimensions
    • strokeColor: Stroke color
    • backgroundColor: Background color
    • fillStyle: Fill style
    • strokeWidth: Stroke width
    • roughness: Roughness
    • opacity: Opacity
    • text: Text content (only for text type)

    Multi-session support: Specify sessionId to target a specific session.

  • delete_element

    Delete a specific element from the canvas.

    Usage scenarios:

    • Remove unwanted elements
    • Clean up temporary elements
    • Delete erroneously added elements

    Multi-session support: Specify sessionId to target a specific session.

  • get_scene

    Retrieve complete information about the current diagram scene.

    Returns:

    • List of all elements
    • Application state
    • Version number
    • Session ID

    Usage scenarios:

    • Viewing current diagram content
    • Analyzing scene structure
    • Obtaining element IDs for updates/deletion

    Multi-session support: Specify sessionId to query a specific session.

  • export_diagram

    Export the current diagram to a PNG, SVG, or JSON file.

    Notes:

    • JSON format is saved directly by the server.
    • PNG/SVG are generated by the browser and sent back to the server to save.
    • Requires start_session to be called first and the browser to be connected.

    Multi-session support: Specify sessionId to target a specific session.

Use Excalidraw MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Excalidraw MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Excalidraw MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Excalidraw MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "excalidraw-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@scofieldfree/excalidraw-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Excalidraw MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Excalidraw MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Excalidraw MCP Server to help me with this task?
Excalidraw MCP Server
Sure. I read it.
Here is what I found using Excalidraw MCP Server.

Frequently asked questions

What is the Excalidraw MCP Server MCP server used for?

Excalidraw MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Excalidraw MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Excalidraw MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Excalidraw MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Excalidraw MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Excalidraw MCP Server MCP to TypingMind?

Excalidraw MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Excalidraw MCP Server MCP provide in TypingMind?

Excalidraw MCP Server exposes 11 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Excalidraw MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Excalidraw MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter šŸ‘‡