Excalidraw MCP Agent

Excalidraw MCP Agent

Generates hand-drawn Excalidraw diagrams from natural language prompts or structured descriptions, with tools for creating, listing, and opening diagrams directly in the browser.

Category
Visit Server

README

Excalidraw MCP Agent ๐ŸŽจ

Local Model Context Protocol (MCP) server that generates beautifully formatted, hand-drawn Excalidraw diagrams (.excalidraw) directly from natural language text prompts or structured descriptions.


๐ŸŒŸ Features

  • Prompt-to-Diagram Generator: Create complex architecture diagrams, flowcharts, and system pipelines directly from free-text prompts (generate_diagram_from_prompt).
  • Structured MCP Control: Fine-grained shape control (create_excalidraw_diagram) supporting Rectangles, Diamonds, Ellipses, and Arrow labels.
  • Dynamic Geometry Engine:
    • Auto-calculates box dimensions and text metrics to eliminate text clipping.
    • Native Virgil hand-drawn font rendering with 100% mathematical text centering inside containers.
    • Smart perimeter intersection math (getNodeEdgePoint) preventing arrows from crossing through shapes.
    • Directional perpendicular arrow label offsets preventing line collisions.
  • Excalidraw Browser Integration: Open generated diagrams directly on excalidraw.com via open_excalidraw_diagram.

๐Ÿ“ฆ Installation & Setup

1. Clone & Install Dependencies

git clone https://github.com/Anuraj4/Excalidraw-MCP-Agent.git
cd Excalidraw-MCP-Agent
npm install

2. Link Binary Globally

Link the package binary globally so any MCP client can run excalidraw-mcp-agent:

npm link

โš™๏ธ MCP Client Configuration

Add the server entry to your MCP client configuration file (e.g. Claude Desktop, Cursor, VS Code, or Antigravity Desktop):

Option A: Using the Globally Linked Command (Recommended)

{
  "mcpServers": {
    "excalidraw": {
      "command": "excalidraw-mcp-agent",
      "env": {
        "EXCALIDRAW_WORKSPACE": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

Option B: Using Node Directly

{
  "mcpServers": {
    "excalidraw": {
      "command": "node",
      "args": [
        "C:\\path\\to\\Excalidraw-MCP-Agent\\src\\server.js"
      ],
      "env": {
        "EXCALIDRAW_WORKSPACE": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

๐Ÿ› ๏ธ Available MCP Tools

Tool Description
generate_diagram_from_prompt Generates a complete Excalidraw diagram directly from a natural language prompt string.
create_excalidraw_diagram Generates a diagram from structured nodes and arrows with custom geometry and colors.
list_excalidraw_diagrams Lists all .excalidraw diagram files in the current workspace directory.
open_excalidraw_diagram Launches excalidraw.com in your browser to inspect or edit a file.

๐ŸŽจ Diagram Palette & Style Guidelines

The builder applies color palettes and shape semantics automatically according to standard architectural conventions:

Component Type Color Shape
Actors / Users / Clients purple Ellipse
Ingestion / Data Sources blue Rectangle
Processing / Logic green Rectangle
Database / Vector DB / Storage cyan Rectangle
Decisions / Conditionals yellow Diamond
Output / ERP / External Systems orange Rectangle
Exceptions / Errors / Warnings red Rectangle

๐Ÿ’ก Prompt Examples

Once configured, simply interact with your AI assistant using prompts like:

  • RAG Architecture:

    "Create an Excalidraw diagram for a RAG system: User uploads PDFs -> Chunking & embedding -> Vector DB -> User query -> Similarity search -> LLM answer generation."

  • Invoice Extraction Pipeline:

    "Generate an Excalidraw flowchart for Invoice Data Extraction: Supplier submits invoice -> Document Ingestion -> Classification (Invoice vs Receipt) -> Check valid invoice -> Key data extraction -> Validation rules check -> ERP integration export (if valid) or Exception Queue (if error)."


๐Ÿงช Testing

Run unit tests and end-to-end stdio MCP integration tests:

npm test

๐Ÿ“„ License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured