@mentagen/mcp 0.8.3 → 0.8.4

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.
@@ -6,8 +6,8 @@ import { validateTypeChange } from './update.js';
6
6
  const todoItemSchema = z.object({
7
7
  id: z.string().describe('Unique identifier (UUID v4)'),
8
8
  text: z.string().describe('Todo text content'),
9
- completed: z.boolean().describe('Completion status'),
10
- order: z.number().describe('Sort order (0-based)'),
9
+ completed: z.coerce.boolean().describe('Completion status'),
10
+ order: z.coerce.number().describe('Sort order (0-based)'),
11
11
  });
12
12
  const nodeUpdateSchema = z.object({
13
13
  nodeId: z.string().describe('The node ID to update'),
@@ -20,10 +20,10 @@ const nodeUpdateSchema = z.object({
20
20
  code: z.string().optional().describe('Code content for code-type nodes'),
21
21
  url: z.string().optional().describe('URL for url-type nodes'),
22
22
  color: z.string().optional().describe('Node color'),
23
- x: z.number().optional().describe('X position in grid units'),
24
- y: z.number().optional().describe('Y position in grid units'),
25
- width: z.number().optional().describe('Node width in grid units'),
26
- height: z.number().optional().describe('Node height in grid units'),
23
+ x: z.coerce.number().optional().describe('X position in grid units'),
24
+ y: z.coerce.number().optional().describe('Y position in grid units'),
25
+ width: z.coerce.number().optional().describe('Node width in grid units'),
26
+ height: z.coerce.number().optional().describe('Node height in grid units'),
27
27
  todos: z
28
28
  .array(todoItemSchema)
29
29
  .optional()
@@ -4,10 +4,10 @@ import { formatError } from '../utils/errors.js';
4
4
  import { pixelsToUnits, unitsToPixels } from '../utils/units.js';
5
5
  export const checkCollisionSchema = z.object({
6
6
  boardId: z.string().describe('The board ID to check against'),
7
- x: z.number().describe('Left position of the rectangle in grid units'),
8
- y: z.number().describe('Top position of the rectangle in grid units'),
9
- width: z.number().describe('Width of the rectangle in grid units'),
10
- height: z.number().describe('Height of the rectangle in grid units'),
7
+ x: z.coerce.number().describe('Left position of the rectangle in grid units'),
8
+ y: z.coerce.number().describe('Top position of the rectangle in grid units'),
9
+ width: z.coerce.number().describe('Width of the rectangle in grid units'),
10
+ height: z.coerce.number().describe('Height of the rectangle in grid units'),
11
11
  excludeNodeId: z
12
12
  .string()
13
13
  .optional()
@@ -6,7 +6,7 @@ import { snapToGrid } from './grid-calc.js';
6
6
  import { calculateNodeSize } from './size-calc.js';
7
7
  const todoInputSchema = z.object({
8
8
  text: z.string().describe('Todo text content'),
9
- completed: z
9
+ completed: z.coerce
10
10
  .boolean()
11
11
  .optional()
12
12
  .default(false)
@@ -26,10 +26,10 @@ const nodeInputSchema = z.object({
26
26
  .default('markdown')
27
27
  .describe('Node type'),
28
28
  color: z.string().optional().describe('Node color'),
29
- x: z.number().optional().describe('X position in grid units'),
30
- y: z.number().optional().describe('Y position in grid units'),
31
- width: z.number().optional().describe('Width in grid units'),
32
- height: z.number().optional().describe('Height in grid units'),
29
+ x: z.coerce.number().optional().describe('X position in grid units'),
30
+ y: z.coerce.number().optional().describe('Y position in grid units'),
31
+ width: z.coerce.number().optional().describe('Width in grid units'),
32
+ height: z.coerce.number().optional().describe('Height in grid units'),
33
33
  todos: z
34
34
  .array(todoInputSchema)
35
35
  .optional()
@@ -66,20 +66,26 @@ export const createSchema = z.object({
66
66
  .string()
67
67
  .optional()
68
68
  .describe('Optional color override. If not specified, uses default for type (markdown=cyan, code=indigo, url=blue)'),
69
- x: z.number().optional().describe('X position in grid units (default: 6)'),
70
- y: z.number().optional().describe('Y position in grid units (default: 6)'),
71
- width: z
69
+ x: z.coerce
70
+ .number()
71
+ .optional()
72
+ .describe('X position in grid units (default: 6)'),
73
+ y: z.coerce
74
+ .number()
75
+ .optional()
76
+ .describe('Y position in grid units (default: 6)'),
77
+ width: z.coerce
72
78
  .number()
73
79
  .optional()
74
80
  .describe('Width in grid units (default: auto-calculated)'),
75
- height: z
81
+ height: z.coerce
76
82
  .number()
77
83
  .optional()
78
84
  .describe('Height in grid units (default: auto-calculated)'),
79
85
  todos: z
80
86
  .array(z.object({
81
87
  text: z.string().describe('Todo text content'),
82
- completed: z
88
+ completed: z.coerce
83
89
  .boolean()
84
90
  .optional()
85
91
  .default(false)
@@ -4,7 +4,7 @@ import { formatError } from '../utils/errors.js';
4
4
  import { getNodeUrl } from '../utils/urls.js';
5
5
  export const extractBoardContentSchema = z.object({
6
6
  boardId: z.string().describe('The board ID to extract content from'),
7
- includeEmpty: z
7
+ includeEmpty: z.coerce
8
8
  .boolean()
9
9
  .default(false)
10
10
  .describe('Include nodes with no content (default: false)'),
@@ -4,8 +4,10 @@ import { formatError } from '../utils/errors.js';
4
4
  import { pixelsToUnits, unitsToPixels } from '../utils/units.js';
5
5
  export const findPositionSchema = z.object({
6
6
  boardId: z.string().describe('The board ID to search'),
7
- width: z.number().describe('Width of the node to place in grid units'),
8
- height: z.number().describe('Height of the node to place in grid units'),
7
+ width: z.coerce.number().describe('Width of the node to place in grid units'),
8
+ height: z.coerce
9
+ .number()
10
+ .describe('Height of the node to place in grid units'),
9
11
  anchorNodeId: z
10
12
  .string()
11
13
  .optional()
@@ -14,15 +16,15 @@ export const findPositionSchema = z.object({
14
16
  .enum(['right', 'below', 'left', 'above'])
15
17
  .optional()
16
18
  .describe('Search direction from anchor or start (default: right)'),
17
- gap: z
19
+ gap: z.coerce
18
20
  .number()
19
21
  .optional()
20
22
  .describe('Gap between nodes in grid units. Use 6+ for connected nodes, 1 for unrelated (default: 1)'),
21
- startX: z
23
+ startX: z.coerce
22
24
  .number()
23
25
  .optional()
24
26
  .describe('Explicit start X in grid units (ignored if anchorNodeId provided)'),
25
- startY: z
27
+ startY: z.coerce
26
28
  .number()
27
29
  .optional()
28
30
  .describe('Explicit start Y in grid units (ignored if anchorNodeId provided)'),
@@ -7,23 +7,23 @@ export const gridCalcSchema = z
7
7
  operation: z
8
8
  .enum(['snap', 'next_x', 'next_y', 'grid_units'])
9
9
  .describe('The calculation operation to perform'),
10
- value: z
10
+ value: z.coerce
11
11
  .number()
12
12
  .optional()
13
13
  .describe('Value to snap to the grid in units (for snap operation)'),
14
- position: z
14
+ position: z.coerce
15
15
  .number()
16
16
  .optional()
17
17
  .describe('Current x or y position in units (for next_x/next_y operations)'),
18
- size: z
18
+ size: z.coerce
19
19
  .number()
20
20
  .optional()
21
21
  .describe('Width or height of the current node in units (for next_x/next_y)'),
22
- gap: z
22
+ gap: z.coerce
23
23
  .number()
24
24
  .optional()
25
25
  .describe('Gap between nodes in grid units. Use 6+ for connected nodes, 1 for unrelated (default: 1)'),
26
- units: z
26
+ units: z.coerce
27
27
  .number()
28
28
  .optional()
29
29
  .describe('Number of grid units (for grid_units operation - deprecated, returns same value)'),
@@ -32,19 +32,19 @@ export const gridCalcSchema = z
32
32
  .string()
33
33
  .optional()
34
34
  .describe('Board ID - if provided, checks for collisions'),
35
- nodeWidth: z
35
+ nodeWidth: z.coerce
36
36
  .number()
37
37
  .optional()
38
38
  .describe('Width of node being placed in grid units (required with boardId)'),
39
- nodeHeight: z
39
+ nodeHeight: z.coerce
40
40
  .number()
41
41
  .optional()
42
42
  .describe('Height of node being placed in grid units (required with boardId)'),
43
- nodeY: z
43
+ nodeY: z.coerce
44
44
  .number()
45
45
  .optional()
46
46
  .describe('Y position of node in grid units (required for next_x collision check)'),
47
- nodeX: z
47
+ nodeX: z.coerce
48
48
  .number()
49
49
  .optional()
50
50
  .describe('X position of node in grid units (required for next_y collision check)'),
@@ -3,7 +3,7 @@ import { EdgeDirection } from '../client/types.js';
3
3
  import { formatError } from '../utils/errors.js';
4
4
  export const listEdgesSchema = z.object({
5
5
  boardId: z.string().describe('The board ID to list edges from'),
6
- limit: z
6
+ limit: z.coerce
7
7
  .number()
8
8
  .max(1000)
9
9
  .optional()
@@ -6,7 +6,7 @@ import { pixelsToUnits } from '../utils/units.js';
6
6
  import { getNodeUrl } from '../utils/urls.js';
7
7
  export const listNodesSchema = z.object({
8
8
  boardId: z.string().describe('The board ID to list nodes from'),
9
- limit: z
9
+ limit: z.coerce
10
10
  .number()
11
11
  .max(1000)
12
12
  .default(1000)
@@ -4,7 +4,7 @@ import { formatError } from '../utils/errors.js';
4
4
  import { pixelsToUnits } from '../utils/units.js';
5
5
  export const listPositionsSchema = z.object({
6
6
  boardId: z.string().describe('The board ID to list node positions from'),
7
- limit: z
7
+ limit: z.coerce
8
8
  .number()
9
9
  .max(1000)
10
10
  .default(1000)
@@ -5,7 +5,7 @@ const replaceOp = z.object({
5
5
  type: z.literal('replace'),
6
6
  oldString: z.string().min(1),
7
7
  newString: z.string(),
8
- replaceAll: z.boolean().optional(),
8
+ replaceAll: z.coerce.boolean().optional(),
9
9
  });
10
10
  const prependOp = z.object({
11
11
  type: z.literal('prepend'),
@@ -15,11 +15,11 @@ export const searchSchema = z.object({
15
15
  .string()
16
16
  .optional()
17
17
  .describe('Optional organization ID to limit search to boards in that organization'),
18
- limit: z
18
+ limit: z.coerce
19
19
  .number()
20
20
  .default(10)
21
21
  .describe('Maximum number of results (default: 10)'),
22
- semanticRatio: z
22
+ semanticRatio: z.coerce
23
23
  .number()
24
24
  .default(0.5)
25
25
  .describe('Balance between semantic (1.0) and keyword (0.0) search'),
@@ -20,7 +20,6 @@ const AVG_CHAR_WIDTH = 8.5;
20
20
  const NODE_TYPES_WITH_ICONS = new Set([
21
21
  'ai-chat',
22
22
  'board',
23
- 'contact',
24
23
  'pdf',
25
24
  'file',
26
25
  'mermaid',
@@ -13,7 +13,7 @@ export const toggleTodoSchema = z.object({
13
13
  boardId: z.string().describe('The board ID containing the node'),
14
14
  nodeId: z.string().describe('The node ID containing the todo'),
15
15
  todoId: z.string().describe('The todo ID to toggle'),
16
- completed: z
16
+ completed: z.coerce
17
17
  .boolean()
18
18
  .optional()
19
19
  .describe('Set explicit completion state. Omit to toggle current state.'),
@@ -44,11 +44,11 @@ export const updateSchema = z.object({
44
44
  .string()
45
45
  .optional()
46
46
  .describe('Node color name (use mentagen_colors to see available colors)'),
47
- x: z.number().optional().describe('X position in grid units'),
48
- y: z.number().optional().describe('Y position in grid units'),
49
- width: z.number().optional().describe('Node width in grid units'),
50
- height: z.number().optional().describe('Node height in grid units'),
51
- autoSize: z
47
+ x: z.coerce.number().optional().describe('X position in grid units'),
48
+ y: z.coerce.number().optional().describe('Y position in grid units'),
49
+ width: z.coerce.number().optional().describe('Node width in grid units'),
50
+ height: z.coerce.number().optional().describe('Node height in grid units'),
51
+ autoSize: z.coerce
52
52
  .boolean()
53
53
  .optional()
54
54
  .default(true)
@@ -57,8 +57,8 @@ export const updateSchema = z.object({
57
57
  .array(z.object({
58
58
  id: z.string().describe('Unique identifier (UUID v4)'),
59
59
  text: z.string().describe('Todo text content'),
60
- completed: z.boolean().describe('Completion status'),
61
- order: z.number().describe('Sort order (0-based)'),
60
+ completed: z.coerce.boolean().describe('Completion status'),
61
+ order: z.coerce.number().describe('Sort order (0-based)'),
62
62
  }))
63
63
  .optional()
64
64
  .describe('Replace all todos on this markdown node. Only markdown/text nodes support todos; code nodes do not. Each todo needs id, text, completed, and order fields.'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentagen/mcp",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "MCP server for Mentagen knowledge base integration with Cursor",
5
5
  "type": "module",
6
6
  "bin": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "license": "UNLICENSED",
30
30
  "dependencies": {
31
- "@modelcontextprotocol/sdk": "^1.0.0",
31
+ "@modelcontextprotocol/sdk": "1.26.0",
32
32
  "@resvg/resvg-js": "^2.6.2",
33
33
  "ejson2": "^1.1.0",
34
34
  "papaparse": "^5.5.3",
@@ -45,6 +45,8 @@
45
45
  "node": ">=18"
46
46
  },
47
47
  "resolutions": {
48
+ "@isaacs/brace-expansion": "^5.0.1",
49
+ "minimatch": "^10.1.2",
48
50
  "tar": "^7.5.7"
49
51
  }
50
52
  }