Draw Flow Mcp Server

io.github.hj1003862396由 GitHub 帳號 hj1003862396 發布v1.0.2更新於 Oct 24, 2026

MCP server for Next AI Draw.io - AI-powered diagram generation with real-time browser preview

發布方自己的服務:draw.io

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理產生與編輯 draw.io 圖表,在瀏覽器中即時預覽,並可匯出為 .drawio 檔案。

可以做什麼
啟動圖表工作階段,開啟含 draw.io 即時預覽的瀏覽器視窗,並在助理作業時持續更新,支援版本歷程以還原先前的狀態,並以工作階段 ID 連接瀏覽器與伺服器。依助理提供的 XML 建立新圖表。透過以 ID 為基礎的儲存格操作(更新、新增、刪除)編輯現有圖表。讀取目前圖表的 XML,並將圖表匯出為 .drawio 檔案。
適用情境
適合希望助理把自然語言描述轉成流程圖或架構圖、並在瀏覽器中即時查看產生與修改過程的情境,也適合修改與匯出既有的 draw.io 圖表。
執行需求
透過 stdio 在本機執行,通常以 npx 啟動,因此需要 Node.js。內建 HTTP 伺服器預設使用 6002 埠(被占用時依序嘗試至 6020),並會開啟瀏覽器視窗。draw.io 介面預設從 embed.diagrams.net 載入,可透過 DRAWIO_BASE_URL 指向自架實例;PORT 與 DRAWIO_BASE_URL 為選用設定。未宣告需要帳號或 API 金鑰。
安裝前請注意
瀏覽器預覽預設從 embed.diagrams.net 載入 draw.io 介面,圖表內容可能傳送給該第三方;涉及私密或安全敏感內容時應將 DRAWIO_BASE_URL 設為自架實例。匯出時伺服器會將 .drawio 檔案寫入磁碟,並開放本機 HTTP 埠。圖表依助理指示建立與修改,使用前應檢查產生的內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Draw Flow Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Next AI Draw.io MCP Server

MCP (Model Context Protocol) server that enables AI agents like Claude Desktop and Cursor to generate and edit draw.io diagrams with real-time browser preview.

Self-contained - includes an embedded HTTP server, no external dependencies required.

Quick Start

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"]    }  }}

Installation

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"]    }  }}

VS Code

Add to your VS Code settings (.vscode/mcp.json in workspace or user settings):

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"]    }  }}

Cursor

Add to Cursor MCP config (~/.cursor/mcp.json):

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"]    }  }}

Cline (VS Code Extension)

  1. Click the MCP Servers icon in Cline's top menu bar
  2. Select the Configure tab
  3. Click Configure MCP Servers to edit cline_mcp_settings.json
  4. Add the drawio server:
json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"]    }  }}

Claude Code CLI

bash
claude mcp add drawio -- npx @next-ai-drawio/mcp-server@latest

Other MCP Clients

Use the standard MCP configuration with:

  • Command: npx
  • Args: ["@next-ai-drawio/mcp-server@latest"]

Usage

  1. Restart your MCP client after updating config
  2. Ask the AI to create a diagram:

    "Create a flowchart showing user authentication with login, MFA, and session management"

  3. The diagram appears in your browser in real-time!

Features

  • Real-time Preview: Diagrams appear and update in your browser as the AI creates them
  • Version History: Restore previous diagram versions with visual thumbnails - click the clock button (bottom-right) to browse and restore earlier states
  • Natural Language: Describe diagrams in plain text - flowcharts, architecture diagrams, etc.
  • Edit Support: Modify existing diagrams with natural language instructions
  • Export: Save diagrams as .drawio files
  • Self-contained: Embedded server, works offline (except draw.io UI which loads from embed.diagrams.net by default, configurable via DRAWIO_BASE_URL)

Available Tools

ToolDescription
start_sessionOpens browser with real-time diagram preview
create_new_diagramCreate a new diagram from XML (requires xml argument)
edit_diagramEdit diagram by ID-based operations (update/add/delete cells)
get_diagramGet the current diagram XML
export_diagramSave diagram to a .drawio file

How It Works

┌─────────────────┐     stdio      ┌─────────────────┐│  Claude Desktop │ <───────────> │   MCP Server    ││    (AI Agent)   │               │  (this package) │└─────────────────┘               └────────┬────────┘                                          │                                 ┌────────▼────────┐                                 │ Embedded HTTP   │                                 │ Server (:6002)  │                                 └────────┬────────┘                                          │                                 ┌────────▼────────┐                                 │  User's Browser │                                 │ (draw.io embed) │                                 └─────────────────┘
  1. MCP Server receives tool calls from Claude via stdio
  2. Embedded HTTP Server serves the draw.io UI and handles state
  3. Browser shows real-time diagram updates via polling

Configuration

VariableDefaultDescription
PORT6002Port for the embedded HTTP server
DRAWIO_BASE_URLhttps://embed.diagrams.netBase URL for the draw.io embed. Set this to use a self-hosted draw.io instance for private deployments.

Private Deployment (Self-hosted draw.io)

For security-sensitive environments that require private deployment of draw.io:

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"],      "env": {         "DRAWIO_BASE_URL": "https://drawio.your-company.com"      }    }  }}

You can deploy your own draw.io instance using the official Docker image:

bash
docker run -d -p 8080:8080 jgraph/drawio

Then set DRAWIO_BASE_URL=http://localhost:8080 (or your server's URL).

Troubleshooting

Port already in use

If port 6002 is in use, the server will automatically try the next available port (up to 6020).

Or set a custom port:

json
{  "mcpServers": {    "drawio": {      "command": "npx",      "args": ["@next-ai-drawio/mcp-server@latest"],      "env": { "PORT": "6003" }    }  }}

"No active session"

Call start_session first to open the browser window.

Browser not updating

Check that the browser URL has the ?mcp= query parameter. The MCP session ID connects the browser to the server.

License

Apache-2.0

來源:README.md,提交 fe245b6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Draw 整合