drawler-mcp

v0.1.7
drawler-mcp Checked 2 days ago Published 13 days ago

MCP server for Drawler (drawler.9tools.net): let Claude, Codex, Cursor… draw workflows, mind maps, ERD diagrams live on your canvas via peer-to-peer share

An MCP server that lets AI draw workflows, mind maps, use cases, ERDs and MongoDB schemas directly on your Drawler canvas. The AI joins your live-share room like an invited guest: you approve it, watch it draw in real time, and change its access or remove it at any time. Diagram data travels peer-to-peer (WebRTC) and is never stored on a server. Requires Node.js ≥ 20. No clone or build needed — pick your tool: The Drawler UI is available in English and Vietnamese; Vietnamese button names are shown in brackets.

Summary extracted from the README.

drawler-mcp — let Claude, Codex… draw diagrams in Drawler

An MCP server that lets AI draw workflows, mind maps, use cases, ERDs and MongoDB schemas directly on your Drawler canvas. The AI joins your live-share room like an invited guest: you approve it, watch it draw in real time, and change its access or remove it at any time. Diagram data travels peer-to-peer (WebRTC) and is never stored on a server.

Install

Requires Node.js ≥ 20. No clone or build needed — pick your tool:

Claude Code

claude mcp add --scope user drawler -- npx -y drawler-mcp@latest

Claude Desktop (claude_desktop_config.json)

{ "mcpServers": { "drawler": { "command": "npx", "args": ["-y", "drawler-mcp@latest"] } } }

Codex CLI (~/.codex/config.toml)

[mcp_servers.drawler]
command = "npx"
args = ["-y", "drawler-mcp@latest"]

Cursor / Windsurf / VS Code: add an MCP server to your global config (Cursor: ~/.cursor/mcp.json; VS Code: the "MCP: Open User Configuration" command) with command npx and arguments -y drawler-mcp@latest.

Updating: always use drawler-mcp@latest (without @latest, npx may run an old cached version). If you installed with npx -y drawler-mcp, reinstall (Claude Code: claude mcp remove drawler, then run the command above). Without --scope user the server only works in the folder where you added it. Restart your tool afterwards. Still seeing old tools? Run npm cache clean --force.

If live mode reports that WebRTC is missing, npm blocked the install script of node-datachannel. Install globally with scripts allowed (npm install -g drawler-mcp --foreground-scripts) and use the drawler-mcp command instead of npx -y drawler-mcp.

Usage

The Drawler UI is available in English and Vietnamese; Vietnamese button names are shown in brackets.

Live (draw straight onto the canvas):

  1. In Drawler click Share [Chia sẻ] → Start sharing → Edit link → Copy link.
  2. Tell the AI, e.g. "Join https://drawler.9tools.net/share/… and draw an OTP login flow".
  3. Drawler shows a join request from AI → click Allow edit [Cho sửa]. The AI starts drawing and you can see its cursor.

Offline (no link needed): ask the AI to draw, then "save it to login.json" → open the file with the Open button in Drawler.

Chat: while connected, you can send further requests in the share session's chat panel; the AI reads them and keeps drawing. Only the owner and people the owner allows (🤖 button in the Share panel) can command the AI.

Tools

Tool Purpose
drawler_connect / drawler_status / drawler_disconnect Join / check status / leave a share room
drawler_chat_read / drawler_chat_send Read room chat messages (optionally waiting for new ones) / reply to the user
drawler_get_diagram Read the current diagram (ids, shape kinds, text, positions, columns…)
drawler_list_shapes Available shape kinds (kind)
drawler_new Switch diagram type (if the current diagram has content, a new diagram is created instead of overwriting it)
drawler_draw_text Draw a whole diagram from Mermaid, a Markdown outline, a use case list, SQL or MongoDB JSON
drawler_add Add shapes + connectors in one call (auto-placed when no coordinates are given)
drawler_update / drawler_delete Edit / delete shapes and connectors
drawler_relayout Tidy up the layout (top-to-bottom or left-to-right)
drawler_export_file Save to a .json file that Drawler can open

Notes

  • The AI can only edit while you grant Can edit; switching it to View only or removing it stops it immediately. Ctrl+Z in the app undoes the AI's changes.
  • The default signaling server is PeerJS's public server (it only helps the two peers find each other and never sees the content). Networks that block P2P need a TURN server (see the main README).

Development

npm install                      # at the repo root (code is shared with the web app)
cd mcp && npm install && npm run build
npm test                         # offline
npm run test:live                # real P2P connection, needs Internet
claude mcp add drawler-dev -- node "$PWD/dist/drawler-mcp.js"   # run your local build

Release: bump version in package.json, then npm publish (builds and tests before publishing).