@xenolithengine/graph-mcp-server 0.7.0-beta.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/dist/tools.js ADDED
@@ -0,0 +1,193 @@
1
+ import { z } from 'zod';
2
+ export const TOOLS = {
3
+ list_node_types: {
4
+ name: 'list_node_types',
5
+ description: 'List every node type registered in the editor with its pins (direction/label/type). ALWAYS call this before add_node and connect_pins so you can use the real type names and pin labels — otherwise pins will not match.',
6
+ schema: z.object({}).strict(),
7
+ },
8
+ get_graph: {
9
+ name: 'get_graph',
10
+ description: 'Return the current graph as xenolith.v1 JSON (nodes, edges, comments). Read-only snapshot.',
11
+ schema: z.object({}).strict(),
12
+ },
13
+ add_node: {
14
+ name: 'add_node',
15
+ description: 'Insert a node of the given type. Coordinates are OPTIONAL: if omitted the editor drops it just to the right of the existing graph (or at the origin if empty). Prefer adding all nodes without coordinates, then calling auto_layout once to tidy the whole picture — the LLM has no idea about node sizes/spacing, so manual coords almost always overlap.',
16
+ schema: z.object({
17
+ type: z.string().describe('Node type as listed by list_node_types (e.g. "Source", "Filter", "Output").'),
18
+ x: z.number().optional().describe('Optional world-space X. Omit unless the user explicitly asked for a position.'),
19
+ y: z.number().optional().describe('Optional world-space Y. Omit unless the user explicitly asked for a position.'),
20
+ state: z.record(z.unknown()).optional().describe('Optional initial state map (widget values etc).'),
21
+ }).strict(),
22
+ },
23
+ connect_pins: {
24
+ name: 'connect_pins',
25
+ description: 'Connect an output pin (from) to a compatible input pin (to). Pin types must match (float→float, object→object). The `pin` field accepts the pin LABEL ("Output", "In") as returned by list_node_types, OR a numeric index ("0", "1"), OR the literal "in"/"out" for simple single-pin nodes — pick whatever is easiest. Never invent uuids. On error the response lists the available pins so you can retry.',
26
+ schema: z.object({
27
+ from: z.object({ node: z.string(), pin: z.union([z.string(), z.number()]).describe('Pin label, index, or "out".') }),
28
+ to: z.object({ node: z.string(), pin: z.union([z.string(), z.number()]).describe('Pin label, index, or "in".') }),
29
+ }).strict(),
30
+ },
31
+ fit_view: {
32
+ name: 'fit_view',
33
+ description: 'Frame the whole graph (or a specific node subset) in the viewport with padding. No return value.',
34
+ schema: z.object({
35
+ nodeIds: z.array(z.string()).optional().describe('Optional subset to frame; default = entire graph.'),
36
+ padding: z.number().optional(),
37
+ }).strict(),
38
+ },
39
+ set_widget_value: {
40
+ name: 'set_widget_value',
41
+ description: 'Set the value of a widget on a node (slider/number/toggle/combo/text/color/custom). Value type must match the widget type (number for slider/number, boolean for toggle, string for combo/text/color, arbitrary JSON for custom). Undoable.',
42
+ schema: z.object({
43
+ nodeId: z.string(),
44
+ widget: z.string().describe('Widget id or key as listed in list_node_types pin/widget arrays.'),
45
+ value: z.unknown(),
46
+ }).strict(),
47
+ },
48
+ remove_node: {
49
+ name: 'remove_node',
50
+ description: 'Delete a node by id. Incident edges are removed automatically. Undoable.',
51
+ schema: z.object({ nodeId: z.string() }).strict(),
52
+ },
53
+ disconnect_edge: {
54
+ name: 'disconnect_edge',
55
+ description: 'Remove an edge by id (as returned by connect_pins or get_graph).',
56
+ schema: z.object({ edgeId: z.string() }).strict(),
57
+ },
58
+ create_macro: {
59
+ name: 'create_macro',
60
+ description: 'Wrap a set of nodes into a collapsed Macro (group). External edges touching the selection become proxy pins on the macro, so the macro behaves like a single node from the outside. Returns the macro id.',
61
+ schema: z.object({
62
+ nodeIds: z.array(z.string()).min(1),
63
+ title: z.string().optional().describe('Display title; defaults to "Macro".'),
64
+ }).strict(),
65
+ },
66
+ expand_macro: {
67
+ name: 'expand_macro',
68
+ description: 'Open a collapsed macro inline — members become visible again. Camera animates to fit the group automatically.',
69
+ schema: z.object({ macroId: z.string() }).strict(),
70
+ },
71
+ collapse_macro: {
72
+ name: 'collapse_macro',
73
+ description: 'Re-collapse an expanded macro back into a single node with proxy pins.',
74
+ schema: z.object({ macroId: z.string() }).strict(),
75
+ },
76
+ auto_layout: {
77
+ name: 'auto_layout',
78
+ description: 'Tidy the entire graph: re-position every node using a layered left-to-right layout based on edge topology (sources on the left, sinks on the right). Call this AFTER adding nodes/edges so the result looks like a hand-arranged graph instead of overlapping boxes. Safe to call multiple times.',
79
+ schema: z.object({
80
+ direction: z.enum(['LR', 'TB']).optional().describe('LR = left-to-right (default, good for pipelines), TB = top-to-bottom (good for tall trees).'),
81
+ spacing: z.number().optional().describe('Pixels of padding between nodes (default 80).'),
82
+ }).strict(),
83
+ },
84
+ set_category_palette: {
85
+ name: 'set_category_palette',
86
+ description: 'Recolour every node by category. Pass a map of category id → CSS colour. Categories come from node schemas — the values returned by list_node_types under `category` (e.g. "logic", "data", "macro", "utility", or whatever the host registered). Each entry can be (a) a plain "#RRGGBB" / rgba(...) / CSS-named colour for a solid pill, or (b) an object `{start, end}` for a two-stop gradient header. Pass an empty object to reset to the theme defaults.',
87
+ schema: z.object({
88
+ palette: z.record(z.unknown()).describe('Map of category → colour. Examples: {"logic":"#5b8def","data":"#fcb400"} for solid, or {"logic":{"start":"#5b8def","end":"#1e40af"}} for a gradient.'),
89
+ }).strict(),
90
+ },
91
+ set_theme: {
92
+ name: 'set_theme',
93
+ description: 'Override a subset of theme tokens (colours, gradients, geometry) at runtime. Pass a partial token object — anything you do not specify keeps its current value. The shape mirrors the editor\'s theme tokens; the most common subset is `color.accent`, `color.surface.*`, `color.text.*`, `geometry.node.radius`. Use this to make AI-driven recolours visible without uploading a whole new theme.',
94
+ schema: z.object({
95
+ tokens: z.record(z.unknown()).describe('Partial theme tokens to merge. Example: {"color":{"accent":"#fcb400","surface":{"canvas":"#0e0e0e"}}}.'),
96
+ }).strict(),
97
+ },
98
+ register_node_schema: {
99
+ name: 'register_node_schema',
100
+ description: 'Define a brand-new node type the user can then instantiate via add_node. The schema must include `type` (unique identifier), `title`, optional `category`, and a `pins` array (each pin has `kind`, `direction`, `type`, optional `label`). Optional `widgets` array describes inline controls — for `combo` widgets you MUST pass a `values` array; `slider`/`number` accept `min`/`max`/`step`. If list_node_types already shows a type with the name you want, prefer add_node on the existing type rather than registering a variant with a different name.',
101
+ schema: z.object({
102
+ type: z.string().describe('Stable unique id (e.g. "CSVRead", "InvoiceParser"). Must not clash with existing types.'),
103
+ title: z.string().optional().describe('Display name shown in the node header (defaults to `type`).'),
104
+ category: z.string().optional().describe('Category id — used PURELY as a colour tag for the pill (matches set_category_palette keys: "logic" / "data" / "macro" / "utility" / whatever is registered). Note: category "macro" is just a colour, NOT the special expandable Macro node type — these are unrelated.'),
105
+ pins: z.array(z.object({
106
+ kind: z.enum(['data', 'exec']).default('data'),
107
+ direction: z.enum(['in', 'out']),
108
+ type: z.string().describe('Pin data type — typically "any" / "number" / "string" / "image" / a custom domain type.'),
109
+ label: z.string().optional(),
110
+ })).min(1),
111
+ widgets: z.array(z.object({
112
+ id: z.string(),
113
+ key: z.string().optional(),
114
+ type: z.enum(['number', 'slider', 'toggle', 'combo', 'text', 'color', 'button']),
115
+ label: z.string().optional(),
116
+ // Per-widget extras — only the field relevant to the type is used. Required for combo
117
+ // (`values`), recommended for slider/number (`min`/`max`/`step`).
118
+ values: z.array(z.union([z.string(), z.object({ label: z.string(), value: z.string() })])).optional().describe('REQUIRED for combo: list of options. Strings ["gpt-4o", "gpt-4o-mini"] or labelled {label, value} entries.'),
119
+ min: z.number().optional(),
120
+ max: z.number().optional(),
121
+ step: z.number().optional(),
122
+ })).optional(),
123
+ }).strict(),
124
+ },
125
+ select_nodes: {
126
+ name: 'select_nodes',
127
+ description: 'Set the editor selection to exactly the listed node ids. Use to draw the user\'s attention to nodes the AI just changed, or to scope a follow-up operation visually.',
128
+ schema: z.object({ nodeIds: z.array(z.string()).min(1) }).strict(),
129
+ },
130
+ clear_selection: {
131
+ name: 'clear_selection',
132
+ description: 'Deselect every node.',
133
+ schema: z.object({}).strict(),
134
+ },
135
+ dive_into_template: {
136
+ name: 'dive_into_template',
137
+ description: 'Open a template-instance node to edit its inner subgraph. Pass the instance node id (as listed by get_graph). The breadcrumb in the editor updates so the user can see where they are.',
138
+ schema: z.object({ instanceId: z.string() }).strict(),
139
+ },
140
+ dive_out: {
141
+ name: 'dive_out',
142
+ description: 'Pop out of the current subgraph back to its parent. Optional `toDepth` jumps multiple levels at once (0 = back to Root).',
143
+ schema: z.object({ toDepth: z.number().int().min(0).optional() }).strict(),
144
+ },
145
+ find_nodes: {
146
+ name: 'find_nodes',
147
+ description: 'Search the current graph for nodes matching a predicate. Returns ids + types + labels. Combine fields with AND. Use this instead of pulling the whole graph when you only need a subset.',
148
+ schema: z.object({
149
+ type: z.string().optional().describe('Match by node type (exact).'),
150
+ category: z.string().optional().describe('Match by category.'),
151
+ titleContains: z.string().optional().describe('Substring match against the node title (case-insensitive).'),
152
+ }).strict(),
153
+ },
154
+ describe_node: {
155
+ name: 'describe_node',
156
+ description: 'Return a detailed snapshot of one node: type, title, category, position, all pins (with live connections), and all widgets (with current values). Use before reasoning about a node — get_graph returns a thinner shape.',
157
+ schema: z.object({ nodeId: z.string() }).strict(),
158
+ },
159
+ screenshot: {
160
+ name: 'screenshot',
161
+ description: 'Render the entire graph (NOT just the viewport — every node, padded) to a base64-encoded PNG/JPEG. Use to verify what the user is seeing after a series of edits. The response is large — only call when you need to "see" the result.',
162
+ schema: z.object({
163
+ format: z.enum(['png', 'jpeg']).optional().describe('Default png.'),
164
+ scale: z.number().optional().describe('1 = native, 2 = retina (default).'),
165
+ padding: z.number().optional().describe('World-space padding around the bounds (default 48).'),
166
+ }).strict(),
167
+ },
168
+ node_screenshot: {
169
+ name: 'node_screenshot',
170
+ description: 'Render a single node\'s current view (with its widget values, status ring, the lot) to a base64-encoded image. Much smaller than full `screenshot`. Use when you want to inspect or show ONE node — e.g. "did my set_widget_value land?".',
171
+ schema: z.object({
172
+ nodeId: z.string(),
173
+ format: z.enum(['png', 'jpeg']).optional(),
174
+ scale: z.number().optional().describe('Default 2 (retina).'),
175
+ }).strict(),
176
+ },
177
+ list_recipes: {
178
+ name: 'list_recipes',
179
+ description: 'Return the named subgraph templates the editor knows about. Each entry has `id`, `title`, `description`, `category`, and `requires` (the schema types the recipe assumes exist). Use this BEFORE instantiate_recipe so you know which recipes are available and what types you may need to register_node_schema first.',
180
+ schema: z.object({}).strict(),
181
+ },
182
+ instantiate_recipe: {
183
+ name: 'instantiate_recipe',
184
+ description: 'Drop a named recipe into the current graph in one call. Creates every node + every edge, returns the map of recipe-local id → real node id (so you can describe_node / connect_pins to additional nodes after). If the recipe needs schemas that aren\'t registered, the call fails with a list of missing types — register them with register_node_schema and retry. Nodes are stacked at the origin; call auto_layout afterwards to tidy.',
185
+ schema: z.object({
186
+ id: z.string().describe('Recipe id from list_recipes (e.g. "linear-float", "branching-pipeline").'),
187
+ x: z.number().optional().describe('Optional origin X (world space). Defaults to 0.'),
188
+ y: z.number().optional().describe('Optional origin Y. Defaults to 0.'),
189
+ }).strict(),
190
+ },
191
+ };
192
+ export const TOOL_NAMES = Object.keys(TOOLS);
193
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAmB,MAAM,KAAK,CAAA;AAcxC,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,eAAe,EAAE;QACf,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,0NAA0N;QACvO,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;KAC9B;IACD,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,4FAA4F;QACzG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;KAC9B;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,6VAA6V;QAC1W,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;YACxG,CAAC,EAA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QACxP,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;SAC7D,CAAC,CAAC,MAAM,EAAE;KACZ;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,wTAAwT;QACrU,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;KAC9B;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,6aAA6a;QAC1b,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0EAA0E,CAAC;YACnG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;YACpF,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;SACvE,CAAC,CAAC,MAAM,EAAE;KACZ;CACqD,CAAA;AAGxD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAe,CAAA"}
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@xenolithengine/graph-mcp-server",
3
+ "version": "0.7.0-beta.0",
4
+ "description": "MCP (Model Context Protocol) server for XenolithGraph — lets Claude/Cursor/any MCP client drive a running editor over a localhost WebSocket bridge.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "xenolith-mcp": "./dist/cli.js"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md"
22
+ ],
23
+ "sideEffects": false,
24
+ "dependencies": {
25
+ "@modelcontextprotocol/sdk": "^1.29.0",
26
+ "ws": "^8.21.0",
27
+ "zod": "^3.23.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/ws": "^8.5.10",
31
+ "@types/node": "^22.10.0",
32
+ "typescript": "^5.7.0",
33
+ "vitest": "^3.2.4"
34
+ },
35
+ "keywords": [
36
+ "mcp",
37
+ "model-context-protocol",
38
+ "ai-agents",
39
+ "claude",
40
+ "cursor",
41
+ "langchain",
42
+ "node-editor"
43
+ ],
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/XenolithEngine/xenolith-graph.git",
50
+ "directory": "packages/mcp-server"
51
+ },
52
+ "homepage": "https://xenolithengine.github.io/xenolith-graph/",
53
+ "bugs": {
54
+ "url": "https://github.com/XenolithEngine/xenolith-graph/issues"
55
+ },
56
+ "author": "XenolithEngine",
57
+ "scripts": {
58
+ "build": "tsc -b",
59
+ "dev": "tsc -b --watch",
60
+ "test": "vitest run --passWithNoTests",
61
+ "start": "node dist/cli.js",
62
+ "lint": "eslint src",
63
+ "typecheck": "tsc --noEmit"
64
+ }
65
+ }