Skip to main content
Glama
jeel00dev

Excalidraw MCP Server

by jeel00dev

Excalidraw AI — Local Diagram Generator

Generate rich, annotated Excalidraw diagrams from plain English — entirely on your own machine. No cloud, no API keys, no internet required after setup.

Describe a topic and the tool runs a 4-phase LLM pipeline to produce a paper-like vertical document: hierarchical tree diagrams, per-node annotations, and a full educational summary — all saved as a .excalidraw file ready to open.


One-Line Install

Linux (Ubuntu · Debian · Fedora · Arch · Void) and macOS:

curl -fsSL https://raw.githubusercontent.com/jeel00dev/exclalidraw_mcp/main/install.sh | bash

Windows (PowerShell, run as Administrator):

iwr -useb https://raw.githubusercontent.com/jeel00dev/exclalidraw_mcp/main/install.ps1 | iex

The installer handles everything automatically — no manual steps:

  • Installs Docker (per-distro: apt / dnf / pacman / xbps / brew)

  • Clones this repo to ~/.excalidraw-ai/

  • Downloads the AI model (~1.2 GB, cached after first run)

  • Pulls Docker images and starts all services

  • Installs the excalidraw-ai command


Related MCP server: Excalidraw MCP App Server

Usage

After install, generate diagrams with one command:

excalidraw-ai "machine learning pipeline" --type mindmap
excalidraw-ai "TCP/IP network stack" --type architecture --out tcp_ip
excalidraw-ai "user login with OAuth2 and JWT" --type flowchart
excalidraw-ai "photosynthesis in plants" --type mindmap --out plants

Then open http://localhost:3333 in your browser, press Ctrl+O, and load the file from ~/excalidraw_diagrams/.

Service commands

excalidraw-ai start     # start all services
excalidraw-ai stop      # stop all services
excalidraw-ai status    # show container status + health
excalidraw-ai update    # pull latest code + images
excalidraw-ai help      # show all options

What Gets Generated

Each diagram is a vertical document (reads top-to-bottom like study notes):

─── Section 1: Encoder ──────────────────────────────
  [Tree diagram — root → groups → detail nodes]

  • Input Embedding: Converts token IDs to dense vectors...
  • Positional Encoding: Adds position info since attention...
  ...

─── Section 2: Decoder ──────────────────────────────
  [Tree diagram]

  • notes...

─── Educational Summary ─────────────────────────────
  The Transformer architecture introduced in "Attention is All
  You Need" (2017) replaced recurrence with self-attention...

Diagram structure:

  • 2-3 sections per topic (auto-decomposed by the LLM)

  • Hierarchical tree per section: root → category nodes → detail leaves

  • Shape variety: rectangles (components), ovals (actors/terminals), diamonds (decisions)

  • Compact notes block below each tree — 1-2 sentence explanation per node

  • Educational summary — 400-500 word prose at the bottom

Variable complexity — the number of shapes scales with the topic:

  • Simple topic (3-5 components) → 5-8 shapes per section

  • Complex topic (many layers) → 12-16 shapes per section


Examples

Transformer Architecture

excalidraw-ai "attention is all you need encoder decoder" --type architecture

Produces two sections (Encoder, Decoder), each with a 3-level tree covering input embedding, positional encoding, multi-head attention, feed-forward networks, and normalization layers.

Machine Learning Mindmap

excalidraw-ai "machine learning supervised unsupervised reinforcement" --type mindmap

Three sections, one per paradigm, each branching into algorithms, use cases, and key concepts.

Network Stack

excalidraw-ai "TCP/IP network stack" --type architecture

Generates the full layer hierarchy: Application → Transport → Internet → Network Access, with specific protocols (HTTP, TCP, UDP, IP, Ethernet) as leaf nodes.

OAuth2 Login Flow

excalidraw-ai "user login with OAuth2 JWT session management" --type flowchart

Decision-tree flowchart with diamond nodes for validation steps, success/failure branches, and JWT issuance.


Diagram Types

Type

Best for

flowchart

Processes, decision trees, algorithms

mindmap

Study notes, topic overviews, brainstorming

architecture

System designs, service maps, layer diagrams

sequence

API calls, message passing, protocol flows

erd

Database schemas, entity relationships


How It Works

Your description
      │
      ▼
Phase 0 — Decompose   topic → 2-3 focused sub-sections    (~150 tokens)
      │
      ▼  (per section)
Phase 1 — Structure   SHAPE + ARROW lines (tree hierarchy)  (~800 tokens)
Phase 2 — Notes       1-2 sentence annotation per shape     (~600 tokens)
      │
      ▼
Phase 3 — Summary     educational prose paragraph           (~600 tokens)
      │
      ▼
Layout engine → vertical document → .excalidraw file

Each phase is a separate, focused LLM call — works reliably on small (1.5B–7B) models.

Layout engine:

  • Sections stack top-to-bottom (document layout, not a spreadsheet)

  • Tree layout uses subtree-width centering — children center under their parent

  • Dynamic column stride scales the tree to fit the 1400px document width

  • Notes appear as a bullet-list block below each section's tree


Docker Stack

The full stack runs as three Docker services:

Service

Image

Port

Role

excalidraw-ui

excalidraw/excalidraw:latest

3333

Web viewer

llama-server

ghcr.io/ggerganov/llama.cpp:server

8080

LLM inference

generator

built from Dockerfile

CLI (run on demand)

Start / stop manually:

cd ~/.excalidraw-ai
docker compose up -d excalidraw-ui llama-server
docker compose run --rm generator "your topic" --type mindmap
docker compose down

Configuration

Edit ~/.excalidraw-ai/.env to customise:

# AI model (filename inside MODELS_DIR)
MODEL_FILE=qwen2.5-1.5b-instruct-q5_k_m.gguf

# Storage paths
MODELS_DIR=/home/you/.excalidraw-ai/models
DIAGRAMS_DIR=/home/you/excalidraw_diagrams

# Ports
EXCALIDRAW_PORT=3333
LLAMA_PORT=8080

# If you already have llama-server running elsewhere:
# LLAMA_BASE_URL=http://192.168.1.10:8080

Bring your own model

If you already have a GGUF model (e.g. DeepSeek-Coder-6.7B), copy or symlink it:

cp /path/to/your/model.gguf ~/.excalidraw-ai/models/
# Then update .env:
MODEL_FILE=your_model.gguf
docker compose restart llama-server

Recommended models:

Model

Size

Notes

Qwen2.5-1.5B-Instruct Q5_K_M

1.2 GB

Default auto-download — fast

Qwen2.5-3B-Instruct Q4_K_M

1.9 GB

Better quality, still small

DeepSeek-Coder-6.7B-Instruct

4 GB

Strong structured output

Qwen2.5-7B-Instruct Q4_K_M

4.5 GB

Best quality


MCP Server (Claude Desktop / Cursor)

If you use Claude Desktop or Cursor, you can generate diagrams directly from chat.

Linux — edit ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "excalidraw": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/exclalidraw_mcp", "run", "excalidraw-mcp"]
    }
  }
}

macOS — edit ~/Library/Application Support/Claude/claude_desktop_config.json (same content).

Restart Claude Desktop, then ask: "Generate a mindmap about photosynthesis"

Available MCP tools:

Tool

Description

generate_diagram(description, diagram_type, filename)

Generate and save a diagram

check_llm_status()

Check if llama-server is running

list_diagrams()

List all saved diagrams


Manual Setup (without install.sh)

If you prefer to set up manually:

# 1. Clone
git clone https://github.com/jeel00dev/exclalidraw_mcp
cd exclalidraw_mcp

# 2. Python venv
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

# 3. Start llama-server (you provide the model)
llama-server -m /path/to/model.gguf --port 8080 -c 8192

# 4. Generate
./generate.sh "your topic" --type mindmap

generate.sh starts the Excalidraw Docker viewer automatically if Docker is available.


Project Structure

exclalidraw_mcp/
├── src/excalidraw_mcp/
│   ├── server.py       — MCP server + tool definitions
│   ├── pipeline.py     — 4-phase generation pipeline
│   ├── generator.py    — prompts, parser, tree layout, file I/O
│   ├── cli.py          — excalidraw-generate CLI entry point
│   └── llm_client.py   — llama.cpp HTTP client
├── Dockerfile          — generator container image
├── docker-compose.yml  — full stack (UI + LLM + generator)
├── install.sh          — one-liner installer (Linux/macOS)
├── install.ps1         — one-liner installer (Windows)
├── generate.sh         — standalone script (manual setup)
├── .env.example        — configuration template
└── pyproject.toml

Troubleshooting

excalidraw-ai command not found after install Run source ~/.bashrc (or open a new terminal). If it's in ~/.local/bin, add to PATH:

export PATH="$HOME/.local/bin:$PATH"

LLM server not running / health check fails

excalidraw-ai status           # check container state
docker logs excalidraw-llama   # see server output
excalidraw-ai start            # restart services

Model loading takes too long Large models (4B+) can take 30-60 seconds to load. The installer waits automatically. If you get a timeout, check docker logs excalidraw-llama — it will show loading progress.

Diagram has very few shapes (2-3) The LLM may have output an unexpected format. The pipeline retries up to 4 times automatically. Try a more specific description or a larger model.

Docker not available on install On Void Linux, Docker requires the runit service to be enabled:

sudo ln -sf /etc/sv/docker /var/service/
sudo sv start docker
sudo usermod -aG docker $USER   # then log out and back in

Then re-run install.sh.

Tool not appearing in Claude Desktop Check claude_desktop_config.json for JSON syntax errors, then fully quit and restart Claude Desktop (not just reload).


License

MIT

Available Tools

3 tools
check_llm_statusA

Check whether the local llama.cpp server is running and reachable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. The description indicates a read-only check operation, but does not describe behavior like timeout, error handling, or what constitutes 'reachable'. However, it is not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that conveys the full purpose with no extraneous words. It is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and the existence of an output schema, the description is mostly complete. It could mention the expected return value format (e.g., boolean or status object), but the output schema presumably covers that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so schema coverage is 100%. The description adds meaning beyond the schema by explaining the tool's purpose. With zero parameters, baseline is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks if a local llama.cpp server is running and reachable. It uses a specific verb ('check') and resource ('local llama.cpp server'). This purpose is distinct from sibling tools (generate_diagram, list_diagrams).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use or alternatives. The context implies usage before other server-dependent tools, but the description does not state this. No exclusions or alternatives are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_diagramA

Generate an Excalidraw diagram from a natural-language description.

Args: description: What the diagram should show, e.g. "user login flow with OAuth and MFA" diagram_type: One of: flowchart, mindmap, sequence, architecture, erd, freeform filename: Output filename without extension (saved to ~/excalidraw_diagrams/)

ParametersJSON Schema
NameRequiredDescriptionDefault
descriptionYes
diagram_typeNoflowchart
filenameNodiagram

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries burden. Discloses save location (~/excalidraw_diagrams/) and allowed diagram types, but lacks details on overwrite behavior, permissions, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise docstring format with front-loaded purpose. No redundant information, but the Args section somewhat duplicates the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers key aspects: purpose, parameters, output location, example. But missing behavioral details like file overwrite, error handling, and output format (though output schema exists but unknown).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% coverage, so description compensates well: explains description parameter with example, lists diagram_type options, and clarifies filename extension and save location. Could be more precise about allowed diagram_type values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it generates an Excalidraw diagram from natural language, with an example. Distinguishes from siblings (check_llm_status, list_diagrams) by being the only diagram generation tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage from description, but no explicit when-to-use or when-not-to-use guidance. No comparisons with alternatives, though siblings are unrelated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_diagramsA

List all Excalidraw diagrams previously generated by this server.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool lists diagrams previously generated by this server, implying read-only behavior. However, it does not elaborate on ordering, pagination (if any), or authorization. Given the tool's simplicity, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately conveys the tool's purpose. It is concise and front-loaded with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and an existing output schema, the description provides all necessary information for an agent to understand and invoke the tool correctly. It is complete for its complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, and schema coverage is 100%. The description has no need to explain parameters. Per guidelines, a baseline of 4 is appropriate for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('list') and resource ('all Excalidraw diagrams previously generated by this server'). It distinguishes from sibling tools: generate_diagram creates diagrams, check_llm_status checks LLM status, so there is no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Although the description does not explicitly state when to use this tool versus alternatives, the context makes it obvious: it lists all diagrams, while siblings create or check status. The simplicity means the purpose is self-evident, but a slight lack of explicit guidance prevents a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedcheck_llm_status
    • First observedgenerate_diagram
    • First observedlist_diagrams

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clear, non-overlapping purpose: checking server status, generating a diagram, and listing previously generated diagrams. No ambiguity in choosing which tool to use.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (check_llm_status, generate_diagram, list_diagrams), making them predictable and easy to understand.

Tool Count5/5

With only 3 tools, the server is tightly focused on diagram generation and management. Each tool serves a distinct need without unnecessary bloat, perfectly scoped for its purpose.

Completeness4/5

The core workflows are covered: health check, diagram creation, and listing past diagrams. Missing deletion is a minor gap, but the server still fulfills its primary function effectively.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeel00dev/exclalidraw_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server