Draw.io 官方 MCP Server 配置与使用指南
Draw.io 发布了官方 MCP Server,支持在 Cursor、Claude Desktop 等支持 MCP 的编辑器中调用画图功能。画完后会弹出网页编辑器,支持基于已绘制的图进行再次编辑。
安装与配置
在 Cursor 中配置 MCP server
- 打开 Cursor,进入 Settings → Cursor Settings → MCP(或 Cmd + Shift + J)
- 点击 Add new global MCP server,这会打开配置文件 ~/.cursor/mcp.json
- 填入配置:
{"mcpServers":{"drawio-mcp":{"command":"npx","args":["-y","@drawio/mcp"]}}}
- 保存后回到 MCP 设置页面,应该能看到 drawio-mcp 已列出,状态显示为绿色即表示连接成功。
提示:如果状态显示红色/失败,可以点旁边的刷新按钮重试。同样注意 npx 路径问题,必要时用完整路径替代。
在 Claude 中添加 drawio-mcp
1. 在 Claude Mac 客户端中添加 MCP server 的步骤
- 打开 Claude 桌面客户端,点击菜单栏 Claude → Settings → Developer → Edit Config
- 这会打开配置文件 claude_desktop_config.json,路径通常是:~/Library/Application Support/Claude/claude_desktop_config.json
- 在文件中添加:
{"mcpServers": {"drawio-mcp": {"command": "npx",




