Skip to main content
Glama
jeel00dev

Excalidraw MCP Server

by jeel00dev

MCP-сервер Excalidraw

Генерируйте красивые диаграммы Excalidraw на основе естественного языка — полностью локально, без необходимости в облачном API.

Вы описываете, что хотите («нарисуй архитектуру микросервисов для приложения электронной коммерции»), а MCP-сервер обращается к вашей локальной LLM llama.cpp для создания корректного файла .excalidraw, который вы можете мгновенно открыть.


Как это работает

You (Claude Desktop / Cursor)
        ↓  natural language description
  MCP Server (this project)
        ↓  structured prompt + Excalidraw JSON spec
  llama.cpp  (localhost:8080)
        ↓  raw Excalidraw JSON
  MCP Server  →  validates + saves  →  ~/excalidraw_diagrams/my-diagram.excalidraw
        ↓
  Open in Excalidraw

Related MCP server: Excalidraw MCP App Server

Предварительные требования

Требование

Версия

Примечания

Python

≥ 3.11

python3 --version

uv

последняя

pip install uv (рекомендуется)

llama.cpp

последняя

см. Шаг 1

Модель GGUF

рекомендуется 7B+

см. Шаг 2

Excalidraw

веб или локально

см. Шаг 5


Настройка

Шаг 1 — Сборка llama.cpp

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
cmake -B build
cmake --build build -j$(nproc)

На macOS с Apple Silicon добавьте -DLLAMA_METAL=ON для ускорения на GPU.

Шаг 2 — Загрузка модели GGUF

Рекомендуемые модели (лучшее качество вывода JSON):

Модель

Размер

Путь HuggingFace

Qwen2.5-7B-Instruct (рекомендуется)

~4.5 ГБ

Qwen/Qwen2.5-7B-Instruct-GGUF

Llama-3.1-8B-Instruct

~4.7 ГБ

meta-llama/Meta-Llama-3.1-8B-Instruct-GGUF

Mistral-7B-Instruct-v0.3

~4.1 ГБ

mistralai/Mistral-7B-Instruct-v0.3-GGUF

# Inside the llama.cpp directory:
mkdir models
# Download with huggingface-cli (pip install huggingface_hub):
huggingface-cli download Qwen/Qwen2.5-7B-Instruct-GGUF \
    qwen2.5-7b-instruct-q4_k_m.gguf \
    --local-dir models/

Шаг 3 — Запуск сервера llama.cpp

# From inside the llama.cpp directory:
./build/bin/llama-server \
    -m models/qwen2.5-7b-instruct-q4_k_m.gguf \
    --port 8080 \
    -c 8192 \
    --host 0.0.0.0

Проверьте, что он запущен:

curl http://localhost:8080/health
# → {"status":"ok"}

Шаг 4 — Установка MCP-сервера

# Clone this repo
git clone <repo-url>
cd exclalidraw_mcp

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .

Проверьте, что точка входа CLI работает:

excalidraw-mcp --help

Шаг 5 — Настройка вашего MCP-клиента

Claude Desktop (Linux)

Отредактируйте ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "excalidraw": {
      "command": "excalidraw-mcp"
    }
  }
}

Если используете uv, замените "command": "excalidraw-mcp" на:

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

Claude Desktop (macOS)

Отредактируйте ~/Library/Application Support/Claude/claude_desktop_config.json, добавив то же содержимое.

Cursor / VS Code

Добавьте в настройки MCP с той же конфигурацией сервера, что указана выше.

Перезапустите приложение после редактирования конфигурации.

Шаг 6 — Запуск Excalidraw локально (опционально)

Вы всегда можете бесплатно использовать excalidraw.com. Но чтобы запустить его полностью локально:

docker run -p 5000:80 excalidraw/excalidraw:latest
# Open http://localhost:5000

Или через Node:

npx excalidraw

Использование

После подключения MCP-сервера попросите своего ИИ-клиента:

Generate a flowchart for a user login system with OAuth
Draw a microservices architecture for an e-commerce platform with cart, payment, and inventory services
Create a mind map about machine learning: supervised, unsupervised, reinforcement learning
Make a sequence diagram showing a REST API request from browser to server to database and back
Draw an ER diagram for a blog: users, posts, comments, tags

Доступные инструменты MCP

Инструмент

Описание

generate_diagram(description, diagram_type, filename)

Основной инструмент — генерация диаграммы из текста

check_llm_status()

Проверка работы llama.cpp

list_diagrams()

Список всех сохраненных диаграмм

Параметры generate_diagram

Параметр

Тип

По умолчанию

Описание

description

string

обязательно

Что должна отображать диаграмма

diagram_type

string

"flowchart"

flowchart, mindmap, sequence, architecture, erd, freeform

filename

string

"diagram"

Имя выходного файла (расширение не требуется)

Открытие созданной диаграммы

Диаграммы сохраняются в ~/excalidraw_diagrams/.

  1. Откройте excalidraw.com или ваш локальный экземпляр

  2. Нажмите на значок папки (слева вверху) → Открыть

  3. Выберите ваш файл .excalidraw


Запуск тестов

# Install test dependencies
uv add --dev pytest pytest-anyio respx

# Run all tests
pytest tests/ -v

Устранение неполадок

"llama.cpp server is not running"

Выполните curl http://localhost:8080/health. Если команда не удалась, запустите сервер (Шаг 3).

"Could not parse LLM output as valid Excalidraw JSON"

LLM вернула некорректный JSON. Попробуйте:

  • Использовать более качественную модель (Qwen2.5-7B или больше)

  • Убедиться, что llama.cpp запущена с параметром -c 8192 (достаточный контекст)

  • Сначала попробовать более простое описание, чтобы убедиться, что конвейер работает

"Diagram looks wrong / missing elements"

  • Будьте более конкретны в описании

  • Явно укажите diagram_type (например, "flowchart", а не "freeform")

  • Более крупные модели (13B+) создают значительно лучшую компоновку

Инструмент не появляется в Claude Desktop

  • Убедитесь, что в claude_desktop_config.json нет синтаксических ошибок JSON

  • Полностью перезапустите Claude Desktop

  • Проверьте логи: ~/.config/claude/logs/ (Linux) или ~/Library/Logs/Claude/ (macOS)


Структура проекта

exclalidraw_mcp/
├── src/excalidraw_mcp/
│   ├── server.py       ← MCP server + tool definitions
│   ├── llm_client.py   ← llama.cpp HTTP client
│   ├── generator.py    ← Prompt building + JSON parsing + validation
│   └── schema.py       ← Excalidraw element dataclasses
├── prompts/
│   └── examples/       ← Few-shot example diagrams (flowchart, mindmap, sequence)
├── examples/
│   └── sample.excalidraw  ← Reference diagram you can open immediately
├── tests/
│   ├── test_generator.py
│   └── test_llm_client.py
├── pyproject.toml
└── README.md

Советы для создания лучших диаграмм

  1. Будьте конкретны: "поток входа с email/паролем, JWT-токеном и хранилищем сессий" лучше, чем просто "поток входа"

  2. Именуйте элементы: "блоки с метками A, B, C, соединенные стрелками" — Excalidraw следует вашим именам

  3. Указывайте цвета: "используй синий для сервисов, желтый для баз данных"

  4. Сосредоточьтесь: одна логическая концепция на диаграмму работает лучше, чем попытка показать всё сразу

  5. Пересоздавайте свободно: если первый результат не идеален, попросите снова с другим именем файла — это происходит мгновенно


Лицензия

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