MCP cover image
See in Github
2025-03-17

2

Github Watches

6

Github Forks

28

Github Stars

Excalidraw MCP Server: Powerful Drawing API for LLM Integration

A comprehensive Model Context Protocol (MCP) server that enables seamless interaction with Excalidraw diagrams and drawings. This server provides LLMs (Large Language Models) with the ability to create, modify, query, and manipulate Excalidraw drawings through a structured, developer-friendly API.

Features

  • Full Excalidraw Element Control: Create, update, delete, and query any Excalidraw element
  • Advanced Element Manipulation: Group, align, distribute, lock, and unlock elements
  • Resource Management: Access and modify scene information, libraries, themes, and elements
  • Easy Integration: Works with Claude Desktop and other LLM platforms
  • Docker Support: Simple deployment with containerization options

API Tools Reference

Element Creation and Modification

  • create_element

    • Create a new Excalidraw element (rectangle, ellipse, diamond, etc.)
    • Required inputs: type, x, y coordinates
    • Optional inputs: dimensions, colors, styling properties
  • update_element

    • Update an existing Excalidraw element by ID
    • Required input: id of the element to update
    • Optional inputs: any element property to modify
  • delete_element

    • Delete an Excalidraw element
    • Required input: id of the element to delete
  • query_elements

    • Query elements with optional filtering
    • Optional inputs: type to filter by element type, filter object with key-value pairs

Resource Management

  • get_resource
    • Get a specific resource like scene information or all elements
    • Required input: resource type (scene, library, theme, elements)

Element Organization

  • group_elements

    • Group multiple elements together
    • Required input: elementIds array of element IDs to group
  • ungroup_elements

    • Ungroup a group of elements
    • Required input: groupId of the group to ungroup
  • align_elements

    • Align multiple elements based on specified alignment
    • Required inputs: elementIds array and alignment (left, center, right, top, middle, bottom)
  • distribute_elements

    • Distribute elements evenly across space
    • Required inputs: elementIds array and direction (horizontal or vertical)
  • lock_elements

    • Lock elements to prevent modification
    • Required input: elementIds array of elements to lock
  • unlock_elements

    • Unlock elements to allow modification
    • Required input: elementIds array of elements to unlock

Integration with Claude Desktop

To use this server with the Claude Desktop application, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

{
  "mcpServers": {
    "excalidraw": {
      "command": "node",
      "args": ["src/index.js"],
      "env": {
        "LOG_LEVEL": "info",
        "DEBUG": "false"
      }
    }
  }
}

Integration with Cursor

To use this server with Cursor, create a .cursor/mcp.json file in your workspace with the following configuration:

{
  "mcpServers": {
    "excalidraw": {
      "command": "node",
      "args": [
        "/path/to/your/directory/mcp_excalidraw/src/index.js"
      ],
      "env": {
        "LOG_LEVEL": "info",
        "DEBUG": "false"
      }
    }
  }
}

Make sure to:

  1. Replace /path/to/your/directory with the actual absolute path to your mcp_excalidraw installation
  2. Create the .cursor directory if it doesn't exist
  3. Ensure the path to index.js is correct and the file exists

Docker Integration

{
  "mcpServers": {
    "excalidraw": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/excalidraw"],
      "env": {
        "LOG_LEVEL": "info",
        "DEBUG": "false"
      }
    }
  }
}

Installation Guide

NPM Installation

# Install dependencies
npm install

# Start the server
npm start

Docker Installation

# Build the Docker image
docker build -t mcp/excalidraw .

# Run the container
docker run -i --rm mcp/excalidraw

Configuration Options

The server can be configured using the following environment variables:

  • LOG_LEVEL - Set the logging level (default: "info")
  • DEBUG - Enable debug mode (default: "false")
  • DEFAULT_THEME - Set the default theme (default: "light")

Usage Examples

Here are some practical examples of how to use the Excalidraw MCP server:

Creating a Rectangle Element

{
  "type": "rectangle",
  "x": 100,
  "y": 100,
  "width": 200,
  "height": 100,
  "backgroundColor": "#ffffff",
  "strokeColor": "#000000",
  "strokeWidth": 2,
  "roughness": 1
}

Querying Specific Elements

{
  "type": "rectangle",
  "filter": {
    "strokeColor": "#000000"
  }
}

Grouping Multiple Elements

{
  "elementIds": ["elem1", "elem2", "elem3"]
}

License

This Excalidraw MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

    Reviews

    2 (1)
    Avatar
    user_NClKQVbo
    2025-04-18

    "I've been using mcp_excalidraw from yctimlin and it has completely improved my workflow. The intuitive interface and powerful features make it easy to create stunning visualizations. Highly recommend checking it out! For more information, visit https://github.com/yctimlin/mcp_excalidraw."