/ Annuaire / Playground / draw.io MCP
● Officiel jgraph ⚡ Instantané

draw.io MCP

par 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.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

prêt

Installer

Choisissez votre client

~/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"
      ]
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

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

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

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

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

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

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

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

Continue utilise un tableau d'objets serveur plutôt qu'une map.

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

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

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

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : draw.io MCP

Generate an architecture diagram from a README

👤 Developers ⏱ ~15 min intermediate

Quand l'utiliser : PR adds a new service; you want a diagram for the design doc.

Déroulement
  1. Describe
    Paste the README prose; ask for an architecture diagram.✓ Copié
    → XML drawio generated
  2. Validate
    drawio_validate the XML.✓ Copié
    → Schema OK
  3. Export
    Export to SVG; embed in the design doc.✓ Copié
    → SVG ready to commit

Résultat : Diagram lives in repo as both .drawio (editable) and .svg (renderable).

Combinaisons

Associez-le à d'autres MCPs pour un effet 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✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
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

Coût et limites

Coût d'exécution

Quota d'API
N/A (local rendering)
Tokens par appel
XML is moderate size
Monétaire
Free OSS
Astuce
Keep .drawio source in repo; commit .svg next to it for previews

Sécurité

Permissions, secrets, portée

Stockage des identifiants : No credentials
Sortie de données : None (local)

Dépannage

Erreurs courantes et correctifs

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

Alternatives

draw.io MCP vs autres

AlternativeQuand l'utiliserCompromis
Mermaid (text-only)Simple flow / sequence diagramsLess control over layout
Excalidraw MCPYou prefer hand-drawn aestheticDifferent file format

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills