Skip to main content
Glama

Excalidraw MCP Server

by yctimlin

Excalidraw MCP 服务器:用于 LLM 集成的强大绘图 API

全面的模型上下文协议 (MCP) 服务器,可实现与 Excalidraw 图表和绘图的无缝交互。该服务器通过结构化、开发人员友好的 API,为 LLM(大型语言模型)提供创建、修改、查询和操作 Excalidraw 绘图的功能。

特征

  • 完整的 Excalidraw 元素控制:创建、更新、删除和查询任何 Excalidraw 元素
  • 高级元素操作:分组、对齐、分布、锁定和解锁元素
  • 资源管理:访问和修改场景信息、库、主题和元素
  • 轻松集成:可与 Claude Desktop 和其他 LLM 平台配合使用
  • Docker 支持:使用容器化选项进行简单部署

API 工具参考

元素创建和修改

  • 创建元素
    • 创建一个新的 Excalidraw 元素(矩形、椭圆形、菱形等)
    • 所需输入: typexy坐标
    • 可选输入:尺寸、颜色、样式属性
  • 更新元素
    • 通过 ID 更新现有的 Excalidraw 元素
    • 必需输入:要更新的元素的id
    • 可选输入:要修改的任何元素属性
  • 删除元素
    • 删除 Excalidraw 元素
    • 必需输入:要删除的元素的id
  • 查询元素
    • 具有可选过滤功能的查询元素
    • 可选输入:按元素类型过滤的type ,使用键值对filter对象

资源管理

  • 获取资源
    • 获取特定资源,例如场景信息或所有元素
    • 必需输入: resource类型(场景、库、主题、元素)

元素组织

  • 组元素
    • 将多个元素组合在一起
    • 必需输入:要分组的元素 ID 的elementIds数组
  • 取消分组元素
    • 取消元素组组合
    • 必填输入:要取消分组的组的groupId
  • 对齐元素
    • 根据指定的对齐方式对齐多个元素
    • 必需输入: elementIds数组和alignment (左、中、右、上、中、下)
  • 分发元素
    • 在空间中均匀分布元素
    • 必需输入: elementIds数组和direction (水平或垂直)
  • 锁定元素
    • 锁定元素以防止修改
    • 必需输入:要锁定的元素的elementIds数组
  • 解锁元素
    • 解锁元素以允许修改
    • 必需输入:要解锁的元素的elementIds数组

与 Claude Desktop 集成

要将此服务器与 Claude Desktop 应用程序一起使用,请将以下配置添加到claude_desktop_config.json的“mcpServers”部分:

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

与 Cursor 集成

要将此服务器与 Cursor 一起使用,请在工作区中创建具有以下配置的.cursor/mcp.json文件:

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

请确保:

  1. /path/to/your/directory替换为 mcp_excalidraw 安装的实际绝对路径
  2. 如果.cursor目录不存在,则创建它
  3. 确保index.js的路径正确且文件存在

Docker 集成

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

安装指南

NPM 安装

# Install dependencies npm install # Start the server npm start

Docker 安装

# Build the Docker image docker build -t mcp/excalidraw . # Run the container docker run -i --rm mcp/excalidraw

配置选项

可以使用以下环境变量配置服务器:

  • LOG_LEVEL - 设置日志级别(默认值:“info”)
  • DEBUG - 启用调试模式(默认值:“false”)
  • DEFAULT_THEME - 设置默认主题(默认值:“light”)

使用示例

以下是一些如何使用 Excalidraw MCP 服务器的实际示例:

创建矩形元素

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

查询特定元素

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

对多个元素进行分组

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

执照

此 Excalidraw MCP 服务器采用 MIT 许可证。您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详细信息,请参阅项目存储库中的 LICENSE 文件。

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器使 LLM 能够通过结构化 API 创建、修改和操作 Excalidraw 图表。

  1. 特征
    1. API 工具参考
      1. 元素创建和修改
      2. 资源管理
      3. 元素组织
    2. 与 Claude Desktop 集成
      1. 与 Cursor 集成
        1. Docker 集成
      2. 安装指南
        1. NPM 安装
        2. Docker 安装
      3. 配置选项
        1. 使用示例
          1. 创建矩形元素
          2. 查询特定元素
          3. 对多个元素进行分组
        2. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
            Last updated -
            13
            13
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides API functionality for creating, managing, and exporting Excalidraw drawings in various formats like SVG, PNG, and JSON.
            Last updated -
            3
            JavaScript
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that connects LLMs to the Compiler Explorer API, enabling them to compile code, explore compiler features, and analyze optimizations across different compilers and languages.
            Last updated -
            Python
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.
            Last updated -
            6
            125
            12
            TypeScript
            MIT License
            • Linux

          View all related MCP servers

          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/yctimlin/mcp_excalidraw'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server