Excalidraw Mcpのロゴ

Excalidraw Mcp

コミュニティ
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.

概要

公開者exiao
リポジトリskills
スキル名excalidraw-mcp
スター
40
フォーク
12
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    exiaoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Excalidraw Mcp」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/exiao/skills/tree/main/design/excalidraw
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでExcalidraw Mcpを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にExcalidraw Mcpを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Excalidraw Mcpは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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)

よくある質問

AIスキル「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.

TypingMindでExcalidraw Mcpを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Excalidraw Mcpはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにExcalidraw Mcpをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/exiao/skills/tree/main/design/excalidrawを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Excalidraw Mcpを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Excalidraw Mcpで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもExcalidraw Mcpを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Excalidraw Mcp」は無料ですか?

exiaoがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇