Excalidraw Mcp logo

Excalidraw Mcp

Community
exiao
excalidraw-mcp

Use when creating hand-drawn style Excalidraw diagrams via the Excalidraw MCP at https://mcp.excalidraw.com/mcp. Use for flow diagrams, architecture diagrams, slide visuals, and any time a sketchy/hand-drawn diagram is needed as a PNG file.

Overview

Publisherexiao
Repositoryskills
Skill nameexcalidraw-mcp
Stars
40
Forks
12
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by exiao on GitHub. Read the source before you install it.

Installation

Install the Excalidraw Mcp AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/exiao/skills/tree/main/design/excalidraw
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/exiao/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/design/excalidraw .claude/skills/excalidraw-mcp
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Excalidraw Mcp in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Excalidraw Mcp on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Excalidraw Mcp is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Excalidraw MCP

Streams hand-drawn Excalidraw diagrams via MCP. Remote endpoint: https://mcp.excalidraw.com/mcp

Connecting via mcporter

Critical: The --server flag auto-corrects to configured server names. Always use --http-url for the Excalidraw endpoint:

bash
# List tools
mcporter list --http-url https://mcp.excalidraw.com/mcp

# Call a tool
mcporter call 'https://mcp.excalidraw.com/mcp.create_view' --args '{"elements": "[...]"}'

Tools

ToolPurpose
read_meReturns element format reference. Call once per conversation.
create_viewRenders diagram in OpenClaw canvas panel (visible to user in chat).
export_to_excalidrawUploads to excalidraw.com, returns shareable URL you can screenshot.
save_checkpointSave user-edited state by ID.
read_checkpointRead checkpoint state for restore.

Getting a PNG File

create_view renders into a canvas panel — not a file. To get an embeddable image:

  1. Use export_to_excalidraw → get shareable URL (e.g. https://excalidraw.com/#json=...)
  2. Open URL in browser (browser action=open profile=clawd)
  3. Dismiss the "Load from link" dialog — it always appears. Take a snapshot to get the button ref, then click "Replace my content"
  4. Wait ~1.5s for diagram to render
  5. Screenshot
  6. Crop with ffmpeg: ffmpeg -y -i input.jpg -vf 'crop=in_w:HEIGHT:0:0' -update 1 -frames:v 1 out.png
python
# Step 3 automation — snapshot then click
snapshot = browser(action="snapshot", targetId=tid)
# Find button "Replace my content" in snapshot, note its ref (e.g. e218)
browser(action="act", request={"kind":"click","ref":"e218"}, targetId=tid)
browser(action="act", request={"kind":"wait","timeMs":1500}, targetId=tid)

Element Format

Elements are passed as a JSON string (double-encoded), not an array:

python
import json, subprocess

elements = [...]  # list of element dicts
args = {"elements": json.dumps(elements)}  # elements MUST be a string

result = subprocess.run([
    "mcporter", "call",
    "https://mcp.excalidraw.com/mcp.create_view",
    "--args", json.dumps(args),
    "--output", "raw"
], capture_output=True, text=True)

Element Reference

Rectangle / Box + Bound Text (CORRECT for export_to_excalidraw)

The label shorthand only works in create_view. For export_to_excalidraw, use a separate bound text element with containerId:

json
[
  {
    "type": "rectangle",
    "id": "r1",
    "x": 40, "y": 60, "width": 160, "height": 80,
    "angle": 0,
    "strokeColor": "#1e1e1e",
    "backgroundColor": "#e8f5e9",
    "fillStyle": "solid",
    "strokeWidth": 2, "strokeStyle": "solid",
    "roughness": 1, "opacity": 100,
    "roundness": {"type": 3}
  },
  {
    "type": "text",
    "id": "t1",
    "x": 40, "y": 60, "width": 160, "height": 80,
    "angle": 0,
    "strokeColor": "#1e1e1e",
    "backgroundColor": "transparent",
    "fillStyle": "solid",
    "strokeWidth": 1, "strokeStyle": "solid",
    "roughness": 1, "opacity": 100,
    "text": "My Label",
    "fontSize": 22,
    "fontFamily": 1,
    "textAlign": "center",
    "verticalAlign": "middle",
    "containerId": "r1",
    "originalText": "My Label"
  }
]

fontFamily values: 1=Virgil (hand-drawn) ← use this for the Excalidraw look, 2=Helvetica, 3=Cascadia (monospace)

Text element x/y/width/height must match the containing rectangle exactly.

Arrow

json
{
  "type": "arrow",
  "id": "a1",
  "x": 182, "y": 105,
  "width": 60, "height": 0,
  "angle": 0,
  "strokeColor": "#1e1e1e",
  "backgroundColor": "transparent",
  "fillStyle": "solid",
  "strokeWidth": 2,
  "strokeStyle": "solid",
  "roughness": 1,
  "opacity": 100,
  "points": [[0, 0], [60, 0]],
  "startArrowhead": null,
  "endArrowhead": "arrow"
}

Text

json
{
  "type": "text",
  "id": "t1",
  "x": 50, "y": 80,
  "width": 120, "height": 25,
  "text": "Hello",
  "fontSize": 20,
  "fontFamily": 1,
  "textAlign": "center",
  "verticalAlign": "middle",
  "strokeColor": "#1e1e1e"
}

Export JSON wrapper

python
excalidraw_json = json.dumps({
    "type": "excalidraw",
    "version": 2,
    "source": "https://excalidraw.com",
    "elements": elements,
    "appState": {"viewBackgroundColor": "#fffce8", "gridSize": None}
})
args = {"json": excalidraw_json}

Color Palette (from read_me)

NameHexUse
Blue#4a9eedPrimary actions
Amber#f59e0bWarnings, highlights
Green#22c55eSuccess
Red#ef4444Errors
Purple#8b5cf6Accents

Background fills: #e8f5e9 (green pastel), #fff3e0 (orange pastel), #ffd6d6 (red pastel), #fffce8 (cream/default canvas)

Layouts

Left-to-right flow (4 boxes)

Spacing: box width ~155px, gap ~60px for arrows. Start x=20, y=60.

  • Box 1: x=20
  • Arrow: x=177 (box1.x + width + 2)
  • Box 2: x=237 (arrow.x + 60)
  • Arrow: x=394
  • Box 3: x=454
  • etc.

Fan-in (3 sources → 1 center)

Use SVG <path> curves for the converging lines — Excalidraw arrows can't curve natively in the JSON format. Use export_to_excalidraw then screenshot.

Common Mistakes

  • Passing elements as array — create_view and export_to_excalidraw expect elements as a JSON string, not an array. Double-encode: json.dumps(elements)
  • Using --server flag — it auto-corrects to a configured server. Use --http-url https://mcp.excalidraw.com/mcp instead
  • Expecting create_view to return an image — it renders in the canvas panel only. Use export_to_excalidraw + screenshot for PNG files
  • Inline SVG marker ID conflicts — when embedding multiple SVGs in one HTML doc, each <marker id="..."> must be unique (ah-d1, ah-d2, ah-d3)

Frequently asked questions

What does the Excalidraw Mcp AI skill do?

Use when creating hand-drawn style Excalidraw diagrams via the Excalidraw MCP at https://mcp.excalidraw.com/mcp. Use for flow diagrams, architecture diagrams, slide visuals, and any time a sketchy/hand-drawn diagram is needed as a PNG file.

Why use Excalidraw Mcp on TypingMind?

Because you install it once and use it with any model. Excalidraw Mcp is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Excalidraw Mcp in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/exiao/skills/tree/main/design/excalidraw. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Excalidraw Mcp?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Excalidraw Mcp?

As many as you like. As long as a model supports skills, you can use Excalidraw Mcp with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Excalidraw Mcp AI skill free?

It is published on GitHub by exiao. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇