/ Diretório / Playground / draw.io MCP
● Oficial jgraph ⚡ Instantâneo

draw.io MCP

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

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

pronto

Instalar

Escolha seu cliente

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

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

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

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

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

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

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

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

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

O Continue usa um array de objetos de servidor em vez de um map.

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

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

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

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: draw.io MCP

Generate an architecture diagram from a README

👤 Developers ⏱ ~15 min intermediate

Quando usar: PR adds a new service; you want a diagram for the design doc.

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

Resultado: Diagram lives in repo as both .drawio (editable) and .svg (renderable).

Combinações

Combine com outros MCPs para 10× de alavancagem

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✓ Copiado

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
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

Custo e limites

O que custa rodar

Cota de API
N/A (local rendering)
Tokens por chamada
XML is moderate size
Monetário
Free OSS
Dica
Keep .drawio source in repo; commit .svg next to it for previews

Segurança

Permissões, segredos, alcance

Armazenamento de credenciais: No credentials
Saída de dados: None (local)

Solução de problemas

Erros comuns e correções

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

Alternativas

draw.io MCP vs. outros

AlternativaQuando usarTroca
Mermaid (text-only)Simple flow / sequence diagramsLess control over layout
Excalidraw MCPYou prefer hand-drawn aestheticDifferent file format

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills