/ الدليل / الملعب / draw.io MCP
● رسمي jgraph ⚡ فوري

draw.io MCP

بواسطة jgraph · jgraph/drawio-mcp

First-party draw.io MCP — Claude authors and edits .drawio diagrams as XML, validates against the schema, and exports to PNG/SVG.

draw.io's official MCP lets Claude work with its native XML diagram format. Use it to generate architecture diagrams from prose, edit existing diagrams via instructions, validate XML, and export to SVG/PNG for embedding in PRs and docs.

لماذا تستخدمه

الميزات الأساسية

عرض مباشر

كيف يبدو في الممارسة

جاهز

التثبيت

اختر العميل

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

افتح Claude Desktop → Settings → Developer → Edit Config. أعد التشغيل بعد الحفظ.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "drawio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@jgraph/drawio-mcp"
      ]
    }
  }
}

يستخدم Cursor نفس مخطط mcpServers مثل Claude Desktop. إعدادات المشروع أولى من الإعدادات العامة.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "drawio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@jgraph/drawio-mcp"
      ]
    }
  }
}

انقر على أيقونة MCP Servers في شريط Cline الجانبي، ثم "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "drawio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@jgraph/drawio-mcp"
      ]
    }
  }
}

نفس الصيغة مثل Claude Desktop. أعد تشغيل Windsurf لتطبيق التغييرات.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "drawio-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@jgraph/drawio-mcp"
      ]
    }
  ]
}

يستخدم Continue مصفوفة من كائنات الخادم بدلاً من خريطة.

~/.config/zed/settings.json
{
  "context_servers": {
    "drawio-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@jgraph/drawio-mcp"
        ]
      }
    }
  }
}

أضف إلى context_servers. يعيد Zed التحميل تلقائيًا عند الحفظ.

claude mcp add drawio-mcp -- npx -y @jgraph/drawio-mcp

أمر من سطر واحد. تحقق باستخدام claude mcp list. احذف باستخدام claude mcp remove.

حالات الاستخدام

استخدامات عملية: draw.io MCP

Generate an architecture diagram from a README

👤 Developers ⏱ ~15 min intermediate

متى تستخدمه: PR adds a new service; you want a diagram for the design doc.

الخطوات
  1. Describe
    Paste the README prose; ask for an architecture diagram.✓ تم النسخ
    → XML drawio generated
  2. Validate
    drawio_validate the XML.✓ تم النسخ
    → Schema OK
  3. Export
    Export to SVG; embed in the design doc.✓ تم النسخ
    → SVG ready to commit

النتيجة: Diagram lives in repo as both .drawio (editable) and .svg (renderable).

التركيبات

اجمعها مع خوادم MCP أخرى لتحقيق نتائج x10

drawio-mcp + filesystem

Save .drawio + .svg next to the doc that references them

Combine drawio-mcp with filesystem: Save .drawio + .svg next to the doc that references them✓ تم النسخ

الأدوات

ما يوفره هذا الـ MCP

الأداةالمدخلاتمتى تستدعيهاالتكلفة
generate_diagram (see docs) NL → drawio XML 1 call
edit_diagram (see docs) Apply instructions to existing XML 1 call
validate (see docs) Schema-check XML 1 call
export (see docs) Render to PNG / SVG / PDF 1 call

التكلفة والحدود

تكلفة التشغيل

حصة API
N/A (local rendering)
الرموز لكل استدعاء
XML is moderate size
التكلفة المالية
Free OSS
نصيحة
Keep .drawio source in repo; commit .svg next to it for previews

الأمان

الصلاحيات والأسرار ونطاق الأثر

تخزين بيانات الاعتماد: No credentials
نقل البيانات الخارجي: None (local)

استكشاف الأخطاء

الأخطاء الشائعة وحلولها

Validation fails on generated XML

Ask the model to regenerate citing the schema; common issues: missing geometry parents

Exported SVG huge

Use --simplify; flatten transforms before export

البدائل

draw.io MCP مقابل البدائل

البديلمتى تستخدمهاالمقايضة
Mermaid (text-only)Simple flow / sequence diagramsLess control over layout
Excalidraw MCPYou prefer hand-drawn aestheticDifferent file format

المزيد

الموارد

📖 اقرأ ملف README الرسمي على GitHub

🐙 تصفح القضايا المفتوحة

🔍 تصفح أكثر من 400 خادم MCP و Skills