drawio-mcp-server 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2025 Ladislav Gazo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,518 +1,185 @@
1
-
2
1
  # Draw.io MCP server
3
2
 
4
3
  Let's do some Vibe Diagramming with the most wide-spread diagramming tool called Draw.io (Diagrams.net).
5
4
 
6
- [![Discord channel](https://shields.io/static/v1?logo=discord&message=draw.io%20mcp&label=chat&color=5865F2&logoColor=white)](https://discord.gg/dM4PWdf42q) [![Build project](https://github.com/lgazo/drawio-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/lgazo/drawio-mcp-server/actions/workflows/ci.yml) [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/5fc2b7fe-8ceb-4683-97bd-6d31e07b5888)
5
+ [![Discord channel](https://shields.io/static/v1?logo=discord&message=draw.io%20mcp&label=chat&color=5865F2&logoColor=white)](https://discord.gg/dM4PWdf42q)
6
+ [![Build project](https://github.com/lgazo/drawio-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/lgazo/drawio-mcp-server/actions/workflows/ci.yml)
7
+ [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/5fc2b7fe-8ceb-4683-97bd-6d31e07b5888)
8
+ [![Version](https://img.shields.io/npm/v/drawio-mcp-server)](https://npmjs.com/package/drawio-mcp-server)
7
9
 
8
- ## Introduction
10
+ ## Key Highlights
9
11
 
10
- The Draw.io MCP server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) implementation that brings powerful diagramming capabilities to AI agentic systems. This integration enables:
12
+ - Built-in Draw.io editor - no browser extension required ![v1.8.0](https://img.shields.io/badge/v1.8.0-blue)
13
+ - MCP server that lets AI agents control Draw.io diagrams
14
+ - Programmatic diagram creation, inspection, and modification via MCP tools
15
+ - Layer management for complex diagrams ![v1.7.0](https://img.shields.io/badge/v1.7.0-blue)
16
+ - Works with any MCP client (Claude Desktop, Claude Code, Zed, Codex, etc.)
11
17
 
12
- - **Seamless Draw.io Integration**: Connect your MCP-powered applications with Draw.io's rich diagramming functionality
13
- - **Programmatic Diagram Control**: Create, modify, and manage diagram content through MCP commands
14
- - **Intelligent Diagram Analysis**: Retrieve detailed information about diagrams and their components for processing by AI agents
15
- - **Agentic System Development**: Build sophisticated AI workflows that incorporate visual modeling and diagram automation
18
+ ## Introduction
16
19
 
17
- As an MCP-compliant tool, it follows the standard protocol for tool integration, making it compatible with any MCP client. This implementation is particularly valuable for creating AI systems that need to:
18
- - Generate architectural diagrams
19
- - Visualize complex relationships
20
- - Annotate technical documentation
21
- - Create flowcharts and process maps programmatically
20
+ The Draw.io MCP server brings Draw.io diagramming capabilities to AI agents. It provides MCP tools that can create, read, update, and delete diagram elements - letting AI assistants build architectural diagrams, flowcharts, and visual documentation automatically.
22
21
 
23
- The tool supports bidirectional communication, allowing both control of Draw.io instances and extraction of diagram information for further processing by AI agents in your MCP ecosystem.
22
+ Two ways to use:
23
+ 1. **Built-in editor** - Server hosts Draw.io directly, accessible in your browser
24
+ 2. **Browser extension** - Connect to Draw.io running in your browser via extension
24
25
 
25
26
  ## Requirements
26
27
 
27
- To use the Draw.io MCP server, you'll need:
28
-
29
- ### Core Components
30
28
  - **Node.js** (v20 or higher) - Runtime environment for the MCP server
31
- - **Draw.io MCP Browser Extension** - Enables communication between Draw.io and the MCP server
29
+ - **MCP client** - Claude Desktop, Claude Code, Zed, Codex, OpenCode, or any MCP-compatible host
32
30
 
33
- ### MCP Ecosystem
34
- - **MCP Client** (e.g., [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector)) - For testing and debugging the integration
35
- - **LLM with Tools Support** - Any language model capable of handling MCP tool calls (e.g., GPT-4, Claude 3, etc.)
31
+ ### For Built-in Editor
32
+ No additional requirements - runs out of the box with `--editor` flag.
36
33
 
37
- ### Optional for Development
38
- - **pnpm** - Preferred package manager
39
- - **Chrome DevTools** - For debugging when using `--inspect` flag
34
+ ### For Browser Extension
35
+ - **Browser extension** - [drawio-mcp-extension](https://github.com/lgazo/drawio-mcp-extension)
36
+ - Draw.io open in your browser
40
37
 
41
- Note: The Draw.io desktop app or web version must be accessible to the system where the MCP server runs.
38
+ ### Optional
39
+ - **pnpm** - Preferred package manager (npm works fine too)
42
40
 
43
- ## Configuration
41
+ ## Quick Start
44
42
 
45
- ### WebSocket Port
43
+ ### 1. Configure your MCP host
46
44
 
47
- The server listens on port 3333 by default for WebSocket connections from the browser extension. You can customize this port using the `--extension-port` or `-p` flag.
45
+ Add the server to your MCP client configuration:
48
46
 
49
- **Default behavior** (port 3333):
50
- ```json
51
- {
52
- "mcpServers": {
53
- "drawio": {
54
- "command": "npx",
55
- "args": ["-y", "drawio-mcp-server"]
56
- }
57
- }
58
- }
59
- ```
60
-
61
- **Custom port** (e.g., port 8080):
62
- ```json
63
- {
64
- "mcpServers": {
65
- "drawio": {
66
- "command": "npx",
67
- "args": ["-y", "drawio-mcp-server", "--extension-port", "8080"]
68
- }
69
- }
70
- }
71
- ```
72
-
73
- **Note**: When using a custom port, ensure the browser extension is configured to connect to the same port.
74
-
75
- ### HTTP Transport Port
47
+ <details>
48
+ <summary>Claude Desktop</summary>
76
49
 
77
- The server can expose a streamable HTTP MCP transport on port 3000. Change this using the `--http-port` flag:
50
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
78
51
 
79
52
  ```json
80
53
  {
81
54
  "mcpServers": {
82
55
  "drawio": {
83
56
  "command": "npx",
84
- "args": ["-y", "drawio-mcp-server", "--transport", "http", "--http-port", "4000"]
57
+ "args": ["-y", "drawio-mcp-server", "--editor"]
85
58
  }
86
59
  }
87
60
  }
88
61
  ```
89
-
90
- ### Transport Selection
91
-
92
- By default only the stdio transport starts. Limit or combine transports with the `--transport` flag:
93
-
94
- - `--transport stdio` – start only stdio (CLI-friendly)
95
- - `--transport http` – start only the HTTP transport (for remote clients)
96
- - `--transport stdio,http` – start both transports
97
-
98
- ### Running the streamable HTTP transport
99
-
100
- Use the streamable HTTP transport when you need to reach the MCP server over the network (for example from a remote agent runtime). The Draw.io browser extension is still required, and you must opt in to the HTTP transport.
101
-
102
- 1. Start the server with HTTP enabled (optionally alongside stdio):
103
-
104
- ```sh
105
- npx -y drawio-mcp-server --transport http --http-port 3000
106
- # or both: npx -y drawio-mcp-server --transport stdio,http --http-port 4000
107
- ```
108
-
109
- 2. Verify the health endpoint:
110
-
111
- ```sh
112
- curl http://localhost:3000/health
113
- # { "status": "ok" }
114
- ```
115
-
116
- 3. Point your MCP client to the `/mcp` endpoint (`http://localhost:3000/mcp` by default). CORS is enabled for all origins so you can call it from a browser-based client as well.
117
-
118
- ## Installation
119
-
120
- ### Connecting with Claude Desktop
121
-
122
- 1. Install [Claude Desktop](https://claude.ai/download)
123
- 2. Open or create the configuration file:
124
- - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
125
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
126
-
127
- 3. Update it to include this server:
62
+ </details>
128
63
 
129
64
  <details>
130
- <summary>Using <code>npm</code></summary>
65
+ <summary>Claude Code</summary>
131
66
 
132
- ```json
133
- {
134
- "mcpServers":{
135
- "drawio":{
136
- "command":"npx",
137
- "args":[
138
- "-y",
139
- "drawio-mcp-server"
140
- ]
141
- }
142
- }
143
- }
67
+ ```sh
68
+ claude mcp add-json drawio '{"type":"stdio","command":"npx","args":["-y","drawio-mcp-server","--editor"]}'
144
69
  ```
145
70
  </details>
146
71
 
147
72
  <details>
148
- <summary>Using <code>pnpm</code></summary>
149
-
150
- ```json
151
- {
152
- "mcpServers":{
153
- "drawio":{
154
- "command":"pnpm",
155
- "args":[
156
- "dlx",
157
- "drawio-mcp-server"
158
- ]
159
- }
160
- }
161
- }
162
- ```
163
- </details>
73
+ <summary>Zed</summary>
164
74
 
165
- To use a custom extension port (e.g., 8080), add `"--extension-port", "8080"` to the args array:
75
+ Add to `~/.config/zed/settings.json`:
166
76
 
167
77
  ```json
168
78
  {
169
- "mcpServers": {
79
+ "context_servers": {
170
80
  "drawio": {
171
81
  "command": "npx",
172
- "args": ["-y", "drawio-mcp-server", "--extension-port", "8080"]
82
+ "args": ["-y", "drawio-mcp-server", "--editor"],
83
+ "env": {}
173
84
  }
174
85
  }
175
86
  }
176
87
  ```
177
-
178
- 4. Restart Claude Desktop
179
-
180
- ### Connecting with oterm
181
-
182
- This is an alternative MCP client in case you like terminal and you plan to connect to your own Ollama instance.
183
-
184
- The configuration is usually in: ~/.local/share/oterm/config.json
88
+ </details>
185
89
 
186
90
  <details>
187
- <summary>Using <code>npm</code></summary>
91
+ <summary>Codex</summary>
188
92
 
189
- ```json
190
- {
191
- "mcpServers": {
192
- "drawio": {
193
- "command": "npx",
194
- "args": [
195
- "-y",
196
- "drawio-mcp-server"
197
- ]
198
- }
199
- }
200
- }
93
+ Edit `~/.codex/config.toml`:
94
+
95
+ ```toml
96
+ [mcp_servers.drawio]
97
+ command = "npx"
98
+ args = ["-y", "drawio-mcp-server", "--editor"]
201
99
  ```
202
100
  </details>
203
101
 
204
102
  <details>
205
- <summary>Using <code>pnpm</code></summary>
206
-
207
- ```json
208
- {
209
- "mcpServers": {
210
- "drawio": {
211
- "command": "pnpm",
212
- "args": [
213
- "dlx",
214
- "drawio-mcp-server"
215
- ]
216
- }
217
- }
218
- }
219
- ```
220
- </details>
103
+ <summary>OpenCode</summary>
221
104
 
222
- To use a custom extension port (e.g., 8080), add `"--extension-port", "8080"` to the args array:
105
+ Add to `opencode.json` in your project root or `~/.config/opencode/opencode.json`:
223
106
 
224
- ```json
107
+ ```jsonc
225
108
  {
226
- "mcpServers": {
109
+ "$schema": "https://opencode.ai/config.json",
110
+ "mcp": {
227
111
  "drawio": {
228
- "command": "npx",
229
- "args": ["-y", "drawio-mcp-server", "--extension-port", "8080"]
112
+ "type": "local",
113
+ "command": ["npx", "-y", "drawio-mcp-server", "--editor"],
114
+ "enabled": true
230
115
  }
231
116
  }
232
117
  }
233
118
  ```
234
-
235
- ### Connect with Zed
236
-
237
- 1. Open the Zed Preview application.
238
- 1. Click the Assistant (✨) icon in the bottom right corner.
239
- 1. Click Settings in the top right panel of the Assistant.
240
- 1. In the Context Servers section, click + Add Context Server.
241
- 1. Configure with the following:
242
-
243
- <details>
244
- <summary>Using <code>npm</code></summary>
245
-
246
- ```json
247
- {
248
- /// The name of your MCP server
249
- "drawio": {
250
- /// The path to the executable
251
- "command": "npx",
252
- /// The arguments to pass to the executable
253
- "args": [
254
- "-y",
255
- "drawio-mcp-server"
256
- ],
257
- /// The environment variables to set for the executable
258
- "env": {}
259
- }
260
- }
261
- ```
262
119
  </details>
263
120
 
264
- <details>
265
- <summary>Using <code>pnpm</code></summary>
121
+ For other MCP clients and detailed configuration (including pnpm options), see [Configuration](./CONFIG.md).
266
122
 
267
- ```json
268
- {
269
- /// The name of your MCP server
270
- "drawio": {
271
- /// The path to the executable
272
- "command": "pnpm",
273
- /// The arguments to pass to the executable
274
- "args": [
275
- "dlx",
276
- "drawio-mcp-server"
277
- ],
278
- /// The environment variables to set for the executable
279
- "env": {}
280
- }
281
- }
282
- ```
283
- </details>
123
+ ### 2. Open the editor
284
124
 
285
- To use a custom extension port (e.g., 8080), add `"--extension-port", "8080"` to the args array:
125
+ After restarting your MCP host, open: **http://localhost:3000/**
286
126
 
287
- ```json
288
- {
289
- "drawio": {
290
- "command": "npx",
291
- "args": [
292
- "-y",
293
- "drawio-mcp-server",
294
- "--extension-port",
295
- "8080"
296
- ],
297
- "env": {}
298
- }
299
- }
300
- ```
127
+ ### 3. Start diagramming
301
128
 
302
- ### Connecting with Codex
129
+ Example prompts you can try:
303
130
 
304
- Edit the configuration usually located in: ~/.codex/config.toml
131
+ > "Create an event-driven architecture diagram showing a message queue with producers, consumers, and three backend services"
305
132
 
306
- <details>
307
- <summary>Using <code>npm</code></summary>
133
+ > "Draw a CRUD API diagram with a database, API gateway, and four microservices with their endpoints"
308
134
 
309
- ```toml
310
- [mcp_servers.drawio]
311
- command = "npx"
312
- args = [
313
- "-y",
314
- "drawio-mcp-server"
315
- ]
316
- ```
317
- </details>
135
+ > "Add a new layer called 'Background' and move all decorative elements to it, then create a new layer for annotations"
318
136
 
319
- <details>
320
- <summary>Using <code>pnpm</code></summary>
137
+ Your AI assistant can now control the diagram using MCP tools.
321
138
 
322
- ```toml
323
- [mcp_servers.drawio]
324
- command = "pnpm"
325
- args = [
326
- "dlx",
327
- "drawio-mcp-server"
328
- ]
329
- ```
330
- </details>
331
-
332
- To use a custom extension port (e.g., 8080), add `"--extension-port", "8080"` to the args array:
139
+ ## Features
333
140
 
334
- <details>
335
- <summary>Using <code>npm</code></summary>
141
+ The server provides MCP tools for:
336
142
 
337
- ```toml
338
- [mcp_servers.drawio]
339
- command = "npx"
340
- args = [
341
- "-y",
342
- "drawio-mcp-server",
343
- "--extension-port",
344
- "8080"
345
- ]
346
- ```
347
- </details>
143
+ - **Diagram inspection** - read shapes, layers, and cell properties
144
+ - **Diagram modification** - add/edit/delete shapes, edges, and labels
145
+ - **Layer management** - create, switch, and organize layers
348
146
 
349
- To connect to a locally running MCP with Streamable HTTP transport:
147
+ See [Tools Reference](./TOOLS.md) for the complete list of available tools.
350
148
 
351
- ```toml
352
- [mcp_servers.drawio]
353
- url = "http://localhost:3000/mcp"
354
- ```
149
+ ## Installation
355
150
 
151
+ The server runs as part of your MCP host. Detailed configuration for all supported clients (Claude Desktop, Claude Code, Zed, Codex, oterm) including npm and pnpm options is available in [Configuration](./CONFIG.md).
356
152
 
357
- ### Browser Extension Setup
153
+ ## Alternative: Browser Extension
358
154
 
359
- In order to control the Draw.io diagram, you need to install dedicated Browser Extension.
155
+ Instead of the built-in editor, you can use the [browser extension](https://github.com/lgazo/drawio-mcp-extension) to connect to Draw.io running in your browser. This works with or without the `--editor` flag.
360
156
 
361
157
  1. Open [Draw.io in your browser](https://app.diagrams.net/)
362
- 2. Install the Draw.io MCP Browser Extension from a web store or [use other means](https://github.com/lgazo/drawio-mcp-extension)
363
- <p>
364
- <a href="https://chrome.google.com/webstore/detail/drawio-mcp-extension/okdbbjbbccdhhfaefmcmekalmmdjjide">
365
- <picture>
366
- <source srcset="https://i.imgur.com/XBIE9pk.png" media="(prefers-color-scheme: dark)" />
367
- <img height="58" src="https://i.imgur.com/oGxig2F.png" alt="Chrome Web Store" /></picture
368
- ></a>
369
- <a href="https://addons.mozilla.org/en-US/firefox/addon/drawio-mcp-extension/">
370
- <picture>
371
- <source srcset="https://i.imgur.com/ZluoP7T.png" media="(prefers-color-scheme: dark)" />
372
- <img height="58" src="https://i.imgur.com/4PobQqE.png" alt="Firefox add-ons" /></picture
373
- ></a>
374
- </p>
375
- 3. Ensure it is connected, the Extension icon should indicate green signal overlay <img alt="Extension connected" src="https://raw.githubusercontent.com/lgazo/drawio-mcp-extension/refs/heads/main/public/icon/logo_connected_32.png" />
376
-
377
- **Important**: If you configured the MCP server to use a custom port (not 3333), you must configure the browser extension to use the same port. See the extension documentation for port configuration instructions.
378
-
379
-
380
- ## Sponsoring
381
-
382
- If you enjoy the project or find it useful, consider supporting its continued development.
158
+ 2. Install the Draw.io MCP Browser Extension:
159
+ - [Chrome Web Store](https://chrome.google.com/webstore/detail/drawio-mcp-extension/okdbbjbbccdhhfaefmcmekalmmdjjide)
160
+ - [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/drawio-mcp-extension/)
161
+ 3. Ensure the extension is connected (green signal overlay on icon)
383
162
 
163
+ Configuration without `--editor`:
384
164
 
385
- lightning invoice:
386
-
387
- ![lightning invoice](./lightning_qr.png)
388
-
389
- ```
390
- lnbc1p5f8wvnpp5kk0qt60waplesw3sjxu7tcqwmdp6ysq570dc4ln52krd3u5nzq6sdp82pshjgr5dusyymrfde4jq4mpd3kx2apq24ek2uscqzpuxqr8pqsp5gvr72xcs883qt4hea6v3u7803stcwfnk5c9w0ykqr9a40qqwnpys9qxpqysgqfzlhm0cz5vqy7wqt7rwpmkacukrk59k89ltd5n642wzru2jn88tyd78gr4y3j6u64k2u4sd4qgavlsnccl986velrg3x0pe95sx7p4sqtatttp
391
- ```
392
-
393
- lightning address:
394
- ```
395
- ladislav@blink.sv
165
+ ```json
166
+ {
167
+ "mcpServers": {
168
+ "drawio": {
169
+ "command": "npx",
170
+ "args": ["-y", "drawio-mcp-server"]
171
+ }
172
+ }
173
+ }
396
174
  ```
397
175
 
398
- <div align="center">
399
- <a href="https://liberapay.com/ladislav/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
400
- </div>
176
+ See the [extension documentation](https://github.com/lgazo/drawio-mcp-extension) for more details.
401
177
 
402
- ## Features
178
+ ## Related Resources
403
179
 
404
- The Draw.io MCP server provides the following tools for programmatic diagram interaction:
405
-
406
- ### Diagram Inspection Tools
407
- - **`get-selected-cell`**
408
- Retrieves the currently selected cell in Draw.io with all its attributes
409
- *Returns*: JSON object containing cell properties (ID, geometry, style, value, etc.)
410
-
411
- - **`get-shape-categories`**
412
- Retrieves available shape categories from the diagram's library
413
- *Returns*: Array of category objects with their IDs and names
414
-
415
- - **`get-shapes-in-category`**
416
- Retrieves all shapes in a specified category from the diagram's library
417
- *Parameters*:
418
- - `category_id`: Identifier of the category to retrieve shapes from
419
- *Returns*: Array of shape objects with their properties and styles
420
-
421
- - **`get-shape-by-name`**
422
- Retrieves a specific shape by its name from all available shapes
423
- *Parameters*:
424
- - `shape_name`: Name of the shape to retrieve
425
- *Returns*: Shape object including its category and style information
426
-
427
- - **`list-paged-model`**
428
- Retrieves a paginated view of all cells (vertices and edges) in the current Draw.io diagram. This tool provides access to the complete model data with essential fields only, sanitized to remove circular dependencies and excessive data. It allows to filter based on multiple criteria and attribute boolean logic. Useful for programmatic inspection of diagram structure without overwhelming response sizes.
429
-
430
- ### Diagram Modification Tools
431
- - **`add-rectangle`**
432
- Creates a new rectangle shape on the active Draw.io page with customizable properties:
433
- - Position (`x`, `y` coordinates)
434
- - Dimensions (`width`, `height`)
435
- - Text content
436
- - Visual style (fill color, stroke, etc. using Draw.io style syntax)
437
-
438
- - **`add-edge`**
439
- Creates a connection between two cells (vertexes)
440
- *Parameters*:
441
- - `source_id`: ID of the source cell
442
- - `target_id`: ID of the target cell
443
- - `text`: Optional text label for the edge
444
- - `style`: Optional style properties for the edge
445
-
446
- - **`delete-cell-by-id`**
447
- Removes a specified cell from the diagram
448
- *Parameters*:
449
- - `cell_id`: ID of the cell to delete
450
-
451
- - **`add-cell-of-shape`**
452
- Adds a new cell of a specific shape type from the diagram's library
453
- *Parameters*:
454
- - `shape_name`: Name of the shape to create
455
- - `x`, `y`: Position coordinates (optional)
456
- - `width`, `height`: Dimensions (optional)
457
- - `text`: Optional text content
458
- - `style`: Optional additional style properties
459
-
460
- - **`set-cell-shape`**
461
- Applies a library shape's style to an existing cell
462
- *Parameters*:
463
- - `cell_id`: ID of the cell whose appearance should change
464
- - `shape_name`: Name of the library shape whose style should be applied
465
-
466
- - **`set-cell-data`**
467
- Stores or updates a custom attribute on a cell
468
- *Parameters*:
469
- - `cell_id`: ID of the cell to update
470
- - `key`: Attribute name to set
471
- - `value`: Attribute value (stored as a string internally)
472
-
473
- - **`edit-cell`**
474
- Updates an existing vertex/shape cell in place by ID
475
- *Parameters*:
476
- - `cell_id`: ID of the cell whose properties should change (required)
477
- - `text`, `x`, `y`, `width`, `height`, `style`: Optional fields to update on the cell; omitted properties stay as-is
478
-
479
- - **`edit-edge`**
480
- Updates an existing edge connection between cells by ID
481
- *Parameters*:
482
- - `cell_id`: ID of the edge cell to update (required)
483
- - `text`: Optional edge label text
484
- - `source_id`, `target_id`: Optional IDs of new source/target cells
485
- - `style`: Optional replacement style string
486
-
487
- ### Layer Management Tools
488
- - **`list-layers`**
489
- Lists all available layers in the diagram with their IDs and names
490
- *Returns*: Array of layer objects with properties (ID, name, visibility, locked status)
491
-
492
- - **`set-active-layer`**
493
- Sets the active layer for creating new elements. All subsequent element creation will happen in this layer
494
- *Parameters*:
495
- - `layer_id`: ID of the layer to set as active
496
- *Returns*: Information about the newly active layer
497
-
498
- - **`move-cell-to-layer`**
499
- Moves a cell from its current layer to a target layer
500
- *Parameters*:
501
- - `cell_id`: ID of the cell to move
502
- - `target_layer_id`: ID of the target layer where the cell will be moved
503
- *Returns*: Confirmation of the move operation
504
-
505
- - **`get-active-layer`**
506
- Gets the currently active layer information
507
- *Returns*: Information about the current active layer (ID and name)
508
-
509
- - **`create-layer`**
510
- Creates a new layer in the diagram
511
- *Parameters*:
512
- - `name`: Name for the new layer
513
- *Returns*: Information about the newly created layer
180
+ [Configuration](./CONFIG.md) - CLI flags and advanced options
514
181
 
515
- ## Related Resources
182
+ [Tools Reference](./TOOLS.md) - Complete MCP tools documentation
516
183
 
517
184
  [Troubleshooting](./TROUBLESHOOTING.md)
518
185