Duyệt miễn phí mỗi ngày. Lên Pro để cài đặt và dùng Airsc MCP không giới hạn.

Xem gói Pro
MCP serverAn toànTài liệu & nội dungDễ cho người mới Đã chạy thử thật

mcp_excalidraw

yctimlin · yctimlin/mcp_excalidraw

Cung cấp cho agent một bảng vẽ để tạo, chỉnh sửa và xuất các sơ đồ kiến trúc và lưu đồ bằng Excalidraw.

MCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.

2.6k sao288Giấy phép: MITCập nhật 13 ngày trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Mô tả kiến trúc hệ thống và để agent vẽ sơ đồ
  • Để agent trực quan hóa lược đồ cơ sở dữ liệu phức tạp thành lưu đồ
  • Xuất các tệp sơ đồ có thể chỉnh sửa trực tiếp vào kho lưu trữ git

Đã chạy thử thật · 26 tool

Chúng tôi đã khởi động MCP server này trong máy ảo cách ly, và nó cung cấp các tool sau:

  • create_element

    Create a new Excalidraw element. For arrows, use startElementId/endElementId to bind to shapes (auto-routes to edges).

  • update_element

    Update an existing Excalidraw element

  • delete_element

    Delete an Excalidraw element

  • query_elements

    Query Excalidraw elements with optional filters

  • get_resource

    Get an Excalidraw resource

  • group_elements

    Group multiple elements together

  • ungroup_elements

    Ungroup a group of elements

  • align_elements

    Align elements to a specific position

  • distribute_elements

    Distribute elements evenly

  • lock_elements

    Lock elements to prevent modification

  • unlock_elements

    Unlock elements to allow modification

  • create_from_mermaid

    Convert a Mermaid diagram to Excalidraw elements and render them on the canvas

  • batch_create_elements

    Create multiple Excalidraw elements at once. For arrows, use startElementId/endElementId to bind arrows to shapes — Excalidraw auto-routes to element edges. Assign custom id to shapes so arrows can re

  • get_element

    Get a single Excalidraw element by ID

  • clear_canvas

    Clear all elements from the canvas

npx -y mcp-excalidraw-server · 21/10/2026

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

Excalidraw MCP Server, CLI & Agent Skill

mcp-excalidraw-server gives AI agents a live Excalidraw canvas they can draw on, look at, refine, and save into your repo. Your agent creates architecture diagrams and flowcharts programmatically, sees its own work via screenshots, fixes layout problems, and exports .excalidraw files you can commit next to your code.

One canvas, three ways to drive it:

  • Agent Skill + CLI — recommended for coding agents (Claude Code, Codex CLI, Cursor, OpenCode): npx -y mcp-excalidraw-server <command>. Zero config, auto-starts the canvas, composable JSON in/out.
  • MCP Server — 26 tools over stdio for any Model Context Protocol client (Claude Desktop, Cursor, Codex CLI, Antigravity, ...). Speaks MCP 2026-07-28 (server/discover, per-request _meta envelope, tool calls without a handshake) and stays compatible with 2025-era clients that open with initialize.
  • REST API — plain HTTP for LangChain and custom frameworks.

Core drawing runs locally (Node ≥ 20, MIT licensed) — no API keys or accounts. Mermaid conversion runs in the local browser canvas; share is optional and uploads an encrypted scene to excalidraw.com. The canvas page loads Excalidraw's fonts from the esm.sh CDN.

Demo

AI agent creates a complete architecture diagram from a single prompt (4x speed). Watch full video on YouTube

Table of Contents

What It Is

Ask your agent to "draw the architecture of this service" and it produces a real, editable Excalidraw diagram — not a one-shot image. Because the agent can query, screenshot, and update individual elements, it iterates until labels fit, nothing overlaps, and arrows route cleanly; then it exports the result as a .excalidraw file that lives in your repo and gets updated when the code changes.

Under the hood there are two processes, one product:

  • Canvas server: Excalidraw web UI + REST API + WebSocket real-time sync (default http://127.0.0.1:3000)
  • A thin front-end of your choice: the CLI, the MCP stdio server, or raw HTTP — all drive the same canvas

Since v1.1 the canvas server starts itself: canvas-driving CLI commands (and the MCP server on launch) auto-spawn it if nothing is listening. status only inspects the current server state. Set EXCALIDRAW_NO_AUTOSTART=1 to opt out.

How We Differ from the Official Excalidraw MCP

Excalidraw has an official MCP — a chat widget that streams a diagram inline from a single prompt (the model gets two tools: a format reference and create_view). It's great for "draw me a cat" in Claude or ChatGPT. We solve a different problem: giving coding agents a persistent canvas workbench.

Official Excalidraw MCPThis Project
ApproachPrompt in, diagram out (one-shot widget)Programmatic element-level control (CLI + 26 MCP tools)
StateCheckpoints inside the chat widgetLive canvas with real-time sync and optional restart-safe checkpoints
Element CRUDDeclarative re-send with delete markersFull create / read / update / delete per element
AI sees the canvasNodescribe (structured text) + screenshot (image)
Iterative refinementRegenerate from checkpointDraw → look → adjust → look again, element by element
Layout toolsNoalign, distribute, group / ungroup, lock, duplicate
File I/ONo model-facing export.excalidraw export/import — diagrams as repo artifacts
Snapshot & rollbackWidget-side checkpointsNamed server-side snapshots
Mermaid conversionNomermaid / create_from_mermaid
Shareable URLsWidget-onlyshare / export_to_excalidraw_url
Viewport controlCamera animationsset_viewport (zoom-to-fit all or selected elements, center on one element, manual zoom)
Works without MCPNoYes — CLI + agent skill + REST API
Multi-agentSingle chatMultiple agents on the same canvas concurrently

TL;DR — The official MCP shows Excalidraw diagrams in your chat. This project gives your coding agent a full Excalidraw workbench: a canvas it can draw on, inspect, refine, and commit to your repo.

What's New

Current package version: 2.1.2. The current release line is v2.1 — Headless Rendering.

v2.1.2 — Fixes

  • Snapshot restore no longer wipes the canvas; frames restore and import. (#101, thanks @sanjayy0612; #120)
  • One label per shape, even across updates and renames. (#121, thanks @sdrshn-nmbr)
  • Dropped images survive reload and show up in exports. (#122, thanks @appdesigngeeks)
  • Text is no longer clipped when the font loads late. (#123, #124)

v2.1.1 — Fixes

  • Large exports no longer fail with invalid order key. (#115, thanks @fernandovmacedo)
  • Text and arrows no longer drift on each canvas sync. (#116, thanks @hidinginabunker)
  • Library installs work and persist; labels re-wrap on resize. (#113, thanks @lukemariano)

v2.1 — Headless Rendering

  • **Screenshots and image exports no longer need a browse
Xem mã nguồn trên GitHub