drawio-mcp-server 1.1.1 → 1.1.3

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/README.md CHANGED
@@ -26,7 +26,7 @@ The tool supports bidirectional communication, allowing both control of Draw.io
26
26
  To use the Draw.io MCP server, you'll need:
27
27
 
28
28
  ### Core Components
29
- - **Node.js** (v18 or higher) - Runtime environment for the MCP server
29
+ - **Node.js** (v20 or higher) - Runtime environment for the MCP server
30
30
  - **Draw.io MCP Browser Extension** - Enables communication between Draw.io and the MCP server
31
31
 
32
32
  ### MCP Ecosystem
package/build/index.js CHANGED
@@ -198,6 +198,14 @@ server.tool(TOOL_add_cell_of_shape, "This tool allows you to add new vertex cell
198
198
  .optional()
199
199
  .describe("Semi-colon separated list of Draw.io visual styles, in the form of `key=value`. Example: `whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;`"),
200
200
  }, default_tool(TOOL_add_cell_of_shape, context));
201
+ const Attributes = z.lazy(() => z
202
+ .array(z.union([
203
+ z.string(),
204
+ Attributes, // recursion: nested arrays
205
+ ]))
206
+ .refine((arr) => arr.length === 0 || typeof arr[0] === "string", {
207
+ message: "If not empty, the first element must be a string operator",
208
+ }));
201
209
  const TOOL_list_paged_model = "list-paged-model";
202
210
  server.tool(TOOL_list_paged_model, "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.", {
203
211
  page: z
@@ -216,10 +224,9 @@ server.tool(TOOL_list_paged_model, "Retrieves a paginated view of all cells (ver
216
224
  .enum(["edge", "vertex", "object", "layer", "group"])
217
225
  .optional()
218
226
  .describe("Filter by cell type: 'edge' for connection lines, 'vertex' for vertices/shapes, 'object' for any cell type, 'layer' for layer cells, 'group' for grouped cells"),
219
- attributes: z
220
- .array(z.any())
221
- .optional()
222
- .describe('Boolean logic array expressions for filtering cell attributes. Format: ["and" | "or", ...expressions] or ["equal", key, value]. Matches against cell attributes and parsed style properties.'),
227
+ attributes: Attributes.optional()
228
+ .describe('Boolean logic array expressions for filtering cell attributes. Format: ["and" | "or", ...expressions] or ["equal", key, value]. Matches against cell attributes and parsed style properties.')
229
+ .default([]),
223
230
  })
224
231
  .optional()
225
232
  .describe("Optional filter criteria to apply to cells before pagination")
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "drawio-mcp-server",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Provides Draw.io services to MCP Clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {
8
8
  "drawio-mcp-server": "./build/index.js"
9
9
  },
10
+ "engines": {
11
+ "node": ">=20.0.0"
12
+ },
10
13
  "files": [
11
14
  "build"
12
15
  ],
@@ -28,7 +31,7 @@
28
31
  "nanoid": "5.1.5",
29
32
  "pino": "9.6.0",
30
33
  "pino-pretty": "13.0.0",
31
- "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.51.0",
34
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.52.0",
32
35
  "zod": "3.24.3"
33
36
  },
34
37
  "devDependencies": {