drawio-mcp
Local Draw.io MCP
本地 STDIO MCP 服务,用于让 Codex 直接创建和维护可编辑的 draw.io XML 文件。
工具
server_info:查看版本及允许访问的目录。create_diagram:根据分组、节点和连线创建.drawio。inspect_diagram:读取第一页的节点、连线和几何信息。validate_diagram:检查重复 ID、无效坐标、越界、失效连线和节点重叠。update_diagram:添加节点/连线,或修改已有节点。
文件中的文字只作为数据处理,不作为 MCP 指令执行。
Related MCP server: Draw.io MCP Server
本地运行
npm install
npm test
npm startnpm start 使用 STDIO,正常启动后会等待 MCP 客户端连接,不会显示交互式界面。
接入 Codex
在 Codex 桌面版中打开“设置 → MCP servers → Add server”,选择 STDIO,然后填写:
Command:
C:\Program Files\nodejs\node.exeArguments:本项目的
src\server.mjs绝对路径Working directory:本项目目录
也可复制 config.example.toml 的内容到 ~/.codex/config.toml,修改其中路径后重启 Codex。
在 Codex CLI 中可运行:
codex mcp list在会话输入框中可使用 /mcp 查看连接状态。
路径限制
通过以下环境变量控制访问范围,Windows 下使用分号分隔多个目录:
DRAWIO_MCP_READ_ROOTSDRAWIO_MCP_WRITE_ROOTS
未配置时仅允许访问本 MCP 项目目录。建议只开放项目工作区,不要把整个磁盘配置为可写。
调用示例
连接后可直接告诉 Codex:
使用 drawio MCP 创建一个包含数据平台层、预警引擎层和响应反馈层的
主动预警系统.drawio,完成后运行validate_diagram校验。
创建工具默认不会覆盖已有文件;需要覆盖时必须显式传入 overwrite=true。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables programmatic creation and management of draw.io diagrams through MCP tools. Supports building architecture diagrams, flowcharts, and visualizations with stateless operations that generate VSCode-compatible .drawio.svg files.74Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to create and edit draw.io diagrams programmatically, supporting a wide range of diagram types and styles.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables creating and editing draw.io diagrams from structured descriptions, rendering them as interactive inline SVGs, and providing access to the full draw.io editor for further modification and export.970MIT
- FlicenseAqualityBmaintenanceEnables local Draw.io diagram creation, editing, and export via MCP tools, using the desktop app.52
Related MCP Connectors
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
Create diagrams in chat, rendered as live interactive draw.io diagrams. 10,000+ searchable shapes.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/k26k26/drawio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server