Command Palette

Search for a command to run...

Назад к скиллам
скилл № 44022

Mcp Integration

draw.io MCP server configuration, tools reference, and integration patterns

БесплатноБез исполняемых скриптов
TheLobbiот TheLobbi★ 22 звезды на GitHub

Установить Mcp Integration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

draw.io MCP Server Integration

Overview

There are two main MCP server options for draw.io integration:

  1. Official @drawio/mcp (by jgraph) - The official MCP server from the draw.io team
  2. Community drawio-mcp-server (by lgazo) - Community-built server with built-in editor

Both enable AI assistants to create, read, update, and manage draw.io diagrams programmatically.


Official @drawio/mcp Server (by jgraph)

The official MCP server operates in multiple modes depending on the deployment context.

Mode 1: MCP App Server (Hosted)

A hosted MCP endpoint that renders diagrams as interactive iframes directly in AI chat interfaces.

Endpoint: https://mcp.draw.io/mcp

Features:

  • Renders diagrams as interactive iframes in chat (Claude.ai, VS Code chat, MCP Apps hosts)
  • No installation required
  • Diagrams are viewable and editable inline
  • Supports all draw.io diagram types

Configuration for Claude.ai:

  1. Go to Claude.ai Settings > MCP Servers
  2. Add server URL: https://mcp.draw.io/mcp
  3. Diagrams render inline in conversations

Configuration for VS Code (Copilot Chat):

// .vscode/settings.json
{
  "mcp": {
    "servers": {
      "drawio": {
        "type": "http",
        "url": "https://mcp.draw.io/mcp"
      }
    }
  }
}

Mode 2: MCP Tool Server (Local)

A locally-run MCP server that opens diagrams in the draw.io editor.

Installation and Usage:

npx @drawio/mcp

Features:

  • Opens diagrams in local draw.io editor (desktop or browser)
  • Supports XML, CSV, and Mermaid.js input formats
  • Lightbox and dark mode options
  • Full draw.io editor capabilities

Configuration:

// .mcp.json (project-level)
{
  "mcpServers": {
    "drawio": {
      "command": "npx",
      "args": ["-y", "@drawio/mcp"]
    }
  }
}

Claude Desktop config:

// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "drawio": {
      "command": "npx",
      "args": ["-y", "@drawio/mcp"]
    }
  }
}

Mode 3: Skill + CLI

Uses draw.io Desktop's command-line interface for generating native .drawio files and exporting to image formats.

Requirements:

  • draw.io Desktop application installed
  • drawio CLI available in PATH

Capabilities:

  • Generate native .drawio files from XML
  • Export to PNG, SVG, PDF with --embed-diagram flag for round-trip editing
  • Batch export multiple pages
  • Headless rendering (with xvfb-run on Linux)

Export Commands:

# Export to editable SVG
drawio --export --format svg --embed-diagram --output diagram.drawio.svg diagram.drawio

# Export to editable PNG
drawio --export --format png --embed-diagram --output diagram.drawio.png diagram.drawio

# Export to PDF
drawio --export --format pdf --output diagram.pdf diagram.drawio

# Export specific page
drawio --export --format svg --page-index 2 --output page3.svg diagram.drawio

# Export with custom dimensions
drawio --export --format png --width 1920 --border 10 --output diagram.png diagram.drawio

# Crop to content
drawio --export --format svg --crop --output cropped.svg diagram.drawio

Mode 4: Project Instructions

Zero-installation mode that works by pasting draw.io generation instructions directly into a Claude Project's custom instructions. The AI generates clickable draw.io URLs using Python URL encoding.

How it works:

  1. Paste the draw.io skill instructions into your Claude Project
  2. Ask Claude to create a diagram
  3. Claude generates XML and encodes it as a draw.io URL
  4. Click the URL to open in draw.io

URL format:

https://app.diagrams.net/#R<URL-encoded-XML>

Python URL generation:

import urllib.parse

xml = '''<mxGraphModel>
  <root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <mxCell id="2" value="Hello" style="rounded=1;" vertex="1" parent="1">
      <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
    </mxCell>
  </root>
</mxGraphModel>'''

encoded = urllib.parse.quote(xml, safe='')
url = f'https://app.diagrams.net/#R{encoded}'
print(url)

Community drawio-mcp-server (by lgazo)

An open-source MCP server with a built-in web-based draw.io editor and comprehensive CRUD tools.

Installation

# Run directly with npx (recommended)
npx -y drawio-mcp-server --editor

# Or install globally
npm install -g drawio-mcp-server
drawio-mcp-server --editor

Version: 1.8.0+ (MIT License)

Built-in Editor

When started with --editor, the server launches a web-based draw.io editor:

http://localhost:3000/

Features:

  • Full draw.io editor in the browser
  • Real-time sync with MCP tool operations
  • No draw.io Desktop installation needed
  • Supports all draw.io features (shapes, styles, layers, etc.)

CLI Options

drawio-mcp-server [options]

Options:
  --editor          Launch built-in web editor (default port 3000)
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Mcp Integration?

draw.io MCP server configuration, tools reference, and integration patterns

Как установить скилл Mcp Integration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Mcp Integration запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Mcp Integration с