@reallygoodwork/design-ui-mcp 0.0.0-stage → 0.1.1
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 +21 -0
- package/README.md +10 -2
- package/dist/cli.js +349 -0
- package/package.json +36 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Really Good Work Inc
|
|
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,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @reallygoodwork/design-ui-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server that lets agents work on a design: in an open editor, or on a design file with no browser.
|
|
4
|
+
|
|
5
|
+
Run it with no install:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @reallygoodwork/design-ui-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The command it installs is `design-ui-mcp`. Needs Node 20 or later. See the [design-ui repository](https://github.com/reallygoodwork/design-ui) for docs.
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// src/server.ts
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { resolve as resolvePath } from "node:path";
|
|
6
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
|
+
import {
|
|
9
|
+
AGENT_PORT,
|
|
10
|
+
createHeadlessEditor,
|
|
11
|
+
handleAgentRequest,
|
|
12
|
+
loadDocument
|
|
13
|
+
} from "@reallygoodwork/design-ui-core";
|
|
14
|
+
import { WebSocket, WebSocketServer } from "ws";
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
var port = Number(process.env.DESIGN_UI_AGENT_PORT ?? AGENT_PORT);
|
|
17
|
+
var REQUEST_TIMEOUT = Number(process.env.DESIGN_UI_AGENT_TIMEOUT_MS ?? 15000);
|
|
18
|
+
var say = (...parts) => console.error("[design-ui-mcp]", ...parts);
|
|
19
|
+
var FLAGS_WITH_VALUES = new Set(["--role", "--allow-origin"]);
|
|
20
|
+
var args = process.argv.slice(2);
|
|
21
|
+
var filePath = args.find((arg, i) => !arg.startsWith("--") && !FLAGS_WITH_VALUES.has(args[i - 1]));
|
|
22
|
+
var file = filePath ? resolvePath(filePath) : null;
|
|
23
|
+
var allowedOrigins = new Set([
|
|
24
|
+
...args.flatMap((arg, i) => args[i - 1] === "--allow-origin" ? [arg] : []),
|
|
25
|
+
...(process.env.DESIGN_UI_ALLOWED_ORIGINS ?? "").split(",")
|
|
26
|
+
].map((origin) => origin.trim().replace(/\/+$/, "")).filter(Boolean));
|
|
27
|
+
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "[::1]"]);
|
|
28
|
+
var isAllowedOrigin = (origin) => {
|
|
29
|
+
if (origin === undefined)
|
|
30
|
+
return true;
|
|
31
|
+
if (allowedOrigins.has(origin))
|
|
32
|
+
return true;
|
|
33
|
+
let url;
|
|
34
|
+
try {
|
|
35
|
+
url = new URL(origin);
|
|
36
|
+
} catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
40
|
+
return false;
|
|
41
|
+
return LOCAL_HOSTS.has(url.hostname) || url.hostname.endsWith(".localhost");
|
|
42
|
+
};
|
|
43
|
+
var readDesign = (path) => {
|
|
44
|
+
let text;
|
|
45
|
+
try {
|
|
46
|
+
text = readFileSync(path, "utf8");
|
|
47
|
+
} catch {
|
|
48
|
+
say(`Can't read ${path}. Pass an existing design file (exported from the editor).`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
const loaded = loadDocument(text);
|
|
52
|
+
if (!loaded.ok) {
|
|
53
|
+
for (const p of loaded.problems)
|
|
54
|
+
say(`${path}: ${p.path || "(root)"}: ${p.message}`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
return loaded.document;
|
|
58
|
+
};
|
|
59
|
+
var saveDesign = (document) => {
|
|
60
|
+
if (!file)
|
|
61
|
+
return;
|
|
62
|
+
const tmp = `${file}.tmp`;
|
|
63
|
+
writeFileSync(tmp, `${JSON.stringify(document, null, 2)}
|
|
64
|
+
`);
|
|
65
|
+
renameSync(tmp, file);
|
|
66
|
+
};
|
|
67
|
+
var headless = null;
|
|
68
|
+
var setDesign = (document) => {
|
|
69
|
+
headless = createHeadlessEditor(document);
|
|
70
|
+
headless.onChange(() => headless && saveDesign(headless.document()));
|
|
71
|
+
};
|
|
72
|
+
if (file) {
|
|
73
|
+
setDesign(readDesign(file));
|
|
74
|
+
say(`working on ${file}`);
|
|
75
|
+
}
|
|
76
|
+
var editors = [];
|
|
77
|
+
var active = null;
|
|
78
|
+
var current = () => active?.readyState === WebSocket.OPEN ? active : [...editors].reverse().find((ws) => ws.readyState === WebSocket.OPEN);
|
|
79
|
+
var pending = new Map;
|
|
80
|
+
var waiting = [];
|
|
81
|
+
var onEditorEvent = (ws, message) => {
|
|
82
|
+
if (message.event === "document") {
|
|
83
|
+
if (!file)
|
|
84
|
+
return;
|
|
85
|
+
const loaded = loadDocument(message.document);
|
|
86
|
+
if (!loaded.ok) {
|
|
87
|
+
say("ignored a design from the editor that isn't valid");
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
setDesign(loaded.document);
|
|
91
|
+
saveDesign(loaded.document);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (message.event === "active" || message.event === "task_assigned")
|
|
95
|
+
active = ws;
|
|
96
|
+
if (message.event === "task_assigned") {
|
|
97
|
+
const next = waiting.shift();
|
|
98
|
+
if (next)
|
|
99
|
+
next(message.task);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var wss = new WebSocketServer({
|
|
103
|
+
port,
|
|
104
|
+
host: "127.0.0.1",
|
|
105
|
+
verifyClient: ({ origin }) => {
|
|
106
|
+
if (isAllowedOrigin(origin))
|
|
107
|
+
return true;
|
|
108
|
+
say(`refused a connection from ${origin}. To allow it, start with --allow-origin ${origin}`);
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
wss.on("listening", () => say(`waiting for the editor on ws://localhost:${port}`));
|
|
113
|
+
wss.on("error", (error) => say("WebSocket server error:", error.message));
|
|
114
|
+
wss.on("connection", (ws) => {
|
|
115
|
+
editors.push(ws);
|
|
116
|
+
alive.set(ws, true);
|
|
117
|
+
ws.on("pong", () => alive.set(ws, true));
|
|
118
|
+
say(`editor connected (${editors.length} open)`);
|
|
119
|
+
if (headless)
|
|
120
|
+
ws.send(JSON.stringify({
|
|
121
|
+
event: "load_document",
|
|
122
|
+
document: headless.document()
|
|
123
|
+
}));
|
|
124
|
+
ws.on("message", (data) => {
|
|
125
|
+
let message;
|
|
126
|
+
try {
|
|
127
|
+
message = JSON.parse(String(data));
|
|
128
|
+
} catch {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if ("event" in message) {
|
|
132
|
+
onEditorEvent(ws, message);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const call = pending.get(message.id);
|
|
136
|
+
if (!call)
|
|
137
|
+
return;
|
|
138
|
+
pending.delete(message.id);
|
|
139
|
+
clearTimeout(call.timer);
|
|
140
|
+
if (message.ok)
|
|
141
|
+
call.resolve(message.result);
|
|
142
|
+
else
|
|
143
|
+
call.reject(new Error(message.error));
|
|
144
|
+
});
|
|
145
|
+
ws.on("close", () => {
|
|
146
|
+
for (const [id, call] of pending) {
|
|
147
|
+
if (call.ws !== ws)
|
|
148
|
+
continue;
|
|
149
|
+
pending.delete(id);
|
|
150
|
+
clearTimeout(call.timer);
|
|
151
|
+
call.reject(new Error("The editor disconnected before answering. Is the tab still open?"));
|
|
152
|
+
}
|
|
153
|
+
if (active === ws)
|
|
154
|
+
active = null;
|
|
155
|
+
const index = editors.indexOf(ws);
|
|
156
|
+
if (index !== -1)
|
|
157
|
+
editors.splice(index, 1);
|
|
158
|
+
say("editor disconnected");
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
var alive = new WeakMap;
|
|
162
|
+
setInterval(() => {
|
|
163
|
+
for (const ws of [...editors]) {
|
|
164
|
+
if (!alive.get(ws)) {
|
|
165
|
+
ws.terminate();
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
alive.set(ws, false);
|
|
169
|
+
ws.ping();
|
|
170
|
+
}
|
|
171
|
+
}, 1e4).unref();
|
|
172
|
+
var NO_EDITOR = `No editor is connected. Open an editor with agentUrl set and check the Activity tab says "Agent connected". Its agentUrl must be ws://localhost:${port}.`;
|
|
173
|
+
var ask = (method, params) => new Promise((resolve, reject) => {
|
|
174
|
+
const editor = current();
|
|
175
|
+
if (!editor && headless) {
|
|
176
|
+
try {
|
|
177
|
+
resolve(handleAgentRequest({ id: randomUUID(), method, params }, headless));
|
|
178
|
+
} catch (error) {
|
|
179
|
+
reject(error);
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (!editor)
|
|
184
|
+
return reject(new Error(NO_EDITOR));
|
|
185
|
+
const id = randomUUID();
|
|
186
|
+
const timer = setTimeout(() => {
|
|
187
|
+
pending.delete(id);
|
|
188
|
+
reject(new Error(`The editor didn't answer ${method} in ${REQUEST_TIMEOUT / 1000}s`));
|
|
189
|
+
}, REQUEST_TIMEOUT);
|
|
190
|
+
pending.set(id, { resolve, reject, timer, ws: editor });
|
|
191
|
+
editor.send(JSON.stringify({ id, method, params }));
|
|
192
|
+
});
|
|
193
|
+
var text = (value) => ({
|
|
194
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
195
|
+
});
|
|
196
|
+
var failed = (error) => ({
|
|
197
|
+
isError: true,
|
|
198
|
+
content: [
|
|
199
|
+
{
|
|
200
|
+
type: "text",
|
|
201
|
+
text: error instanceof Error ? error.message : String(error)
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
});
|
|
205
|
+
var run = (method, params) => ask(method, params).then(text, failed);
|
|
206
|
+
var server = new McpServer({ name: "design-ui", version: "0.1.1" }, {
|
|
207
|
+
instructions: [
|
|
208
|
+
"Design UI is a design editor. A designer leaves tasks on layers and tokens and can assign them to you.",
|
|
209
|
+
"Work a task like this: list_tasks (or wait_for_task), claim_task, get_design, then apply_changes with a reason the designer will read, then resolve_task with a one-line summary.",
|
|
210
|
+
"Prefer design tokens over raw values: a property set to var(--color-text-muted) follows themes and breakpoints.",
|
|
211
|
+
"If the task is unclear, reply with a question instead of guessing, and leave it open."
|
|
212
|
+
].join(`
|
|
213
|
+
`)
|
|
214
|
+
});
|
|
215
|
+
server.registerTool("get_design", {
|
|
216
|
+
title: "Read the design",
|
|
217
|
+
description: "The whole design: layers with their --css-properties (base and per-breakpoint overrides), breakpoints, frame styles, tokens with their modes, and the rules for editing. Read it before changing anything.",
|
|
218
|
+
annotations: { readOnlyHint: true }
|
|
219
|
+
}, () => run("get_design"));
|
|
220
|
+
server.registerTool("list_tasks", {
|
|
221
|
+
title: "List tasks",
|
|
222
|
+
description: "Open tasks the designer left, each with what it's about (a layer, a property, a token), the values there now, replies, and changes already made for it. `assigned` is true when it's handed to you.",
|
|
223
|
+
inputSchema: {
|
|
224
|
+
include_resolved: z.boolean().optional().describe("Also list resolved tasks")
|
|
225
|
+
},
|
|
226
|
+
annotations: { readOnlyHint: true }
|
|
227
|
+
}, ({ include_resolved }) => run("list_tasks", { includeResolved: include_resolved }));
|
|
228
|
+
server.registerTool("wait_for_task", {
|
|
229
|
+
title: "Wait for a task",
|
|
230
|
+
description: "Waits until the designer assigns a task to you, then returns it. Returns at once if one is already waiting. Use it to keep working through tasks as they come in.",
|
|
231
|
+
inputSchema: {
|
|
232
|
+
timeout_seconds: z.number().int().min(1).max(300).optional().describe("How long to wait; 120 by default")
|
|
233
|
+
},
|
|
234
|
+
annotations: { readOnlyHint: true }
|
|
235
|
+
}, async ({ timeout_seconds = 120 }) => {
|
|
236
|
+
try {
|
|
237
|
+
const open = await ask("list_tasks");
|
|
238
|
+
const ready = open.find((t) => t.assigned && !t.claimedBy);
|
|
239
|
+
if (ready)
|
|
240
|
+
return text(ready);
|
|
241
|
+
} catch (error) {
|
|
242
|
+
return failed(error);
|
|
243
|
+
}
|
|
244
|
+
return new Promise((resolve) => {
|
|
245
|
+
const timer = setTimeout(() => {
|
|
246
|
+
const index = waiting.indexOf(take);
|
|
247
|
+
if (index !== -1)
|
|
248
|
+
waiting.splice(index, 1);
|
|
249
|
+
resolve(text({
|
|
250
|
+
task: null,
|
|
251
|
+
message: `No task was assigned in ${timeout_seconds}s.`
|
|
252
|
+
}));
|
|
253
|
+
}, timeout_seconds * 1000);
|
|
254
|
+
const take = (task) => {
|
|
255
|
+
clearTimeout(timer);
|
|
256
|
+
resolve(text(task));
|
|
257
|
+
};
|
|
258
|
+
waiting.push(take);
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
server.registerTool("claim_task", {
|
|
262
|
+
title: "Claim a task",
|
|
263
|
+
description: "Tells the designer you're working on a task; it shows as in progress in their Activity tab.",
|
|
264
|
+
inputSchema: { task_id: z.string() }
|
|
265
|
+
}, ({ task_id }) => run("claim_task", { taskId: task_id }));
|
|
266
|
+
var ACTION = z.object({
|
|
267
|
+
type: z.enum([
|
|
268
|
+
"UPDATE_LAYER_CSS",
|
|
269
|
+
"UPDATE_LAYER_VALUE",
|
|
270
|
+
"UPDATE_LAYER_NAME",
|
|
271
|
+
"UPDATE_LAYER_ELEMENT_TYPE",
|
|
272
|
+
"ADD_LAYER",
|
|
273
|
+
"DELETE_LAYERS",
|
|
274
|
+
"MOVE_LAYER",
|
|
275
|
+
"UPDATE_FRAME_STYLES"
|
|
276
|
+
]).describe("What to do"),
|
|
277
|
+
payload: z.record(z.string(), z.unknown()).describe("UPDATE_LAYER_CSS { id, css: { '--prop': 'value' }, breakpointId? } (empty string removes a value; breakpointId targets an override, omit for base). UPDATE_LAYER_VALUE { id, value }. UPDATE_LAYER_NAME { layerId, name }. ADD_LAYER { layer: { id, type: 'text'|'frame'|'image', name, value, cssVars }, targetLayerId, position: 'before'|'inside'|'after' }. DELETE_LAYERS { layerIds }. MOVE_LAYER { layerIds, targetId, position: 'before'|'on'|'after' }. UPDATE_FRAME_STYLES { css }.")
|
|
278
|
+
}).describe("One edit");
|
|
279
|
+
server.registerTool("apply_changes", {
|
|
280
|
+
title: "Change the design",
|
|
281
|
+
description: "Applies edits, all or none: if any is invalid, nothing changes and the error says which. Each change shows in the designer's history with your reason, and is linked to the task when task_id is given. The designer can undo or revert any of them.",
|
|
282
|
+
inputSchema: {
|
|
283
|
+
reason: z.string().min(1).describe("Why, in a sentence the designer will read next to the change"),
|
|
284
|
+
actions: z.array(ACTION).min(1),
|
|
285
|
+
task_id: z.string().optional().describe("The task these changes are for")
|
|
286
|
+
}
|
|
287
|
+
}, ({ reason, actions, task_id }) => run("apply_changes", { reason, actions, taskId: task_id }));
|
|
288
|
+
server.registerTool("set_token", {
|
|
289
|
+
title: "Add or update a token",
|
|
290
|
+
description: "Adds a design token, or replaces the one with the same path. Values can alias another token ({color.neutral.900}) or compose them (color-mix(in oklch, {color.brand} 40%, white)). modes give values per theme, brand or breakpoint: [{ when: { theme: 'dark' }, value: '…' }].",
|
|
291
|
+
inputSchema: {
|
|
292
|
+
reason: z.string().min(1),
|
|
293
|
+
task_id: z.string().optional(),
|
|
294
|
+
token: z.object({
|
|
295
|
+
path: z.string().describe("Dotted, like color.bg.page"),
|
|
296
|
+
type: z.enum([
|
|
297
|
+
"color",
|
|
298
|
+
"dimension",
|
|
299
|
+
"fontFamily",
|
|
300
|
+
"fontWeight",
|
|
301
|
+
"number",
|
|
302
|
+
"shadow"
|
|
303
|
+
]),
|
|
304
|
+
tier: z.enum(["primitive", "semantic", "component"]),
|
|
305
|
+
value: z.string(),
|
|
306
|
+
modes: z.array(z.object({
|
|
307
|
+
when: z.record(z.string(), z.string()),
|
|
308
|
+
value: z.string()
|
|
309
|
+
})).optional(),
|
|
310
|
+
description: z.string().optional()
|
|
311
|
+
})
|
|
312
|
+
}
|
|
313
|
+
}, ({ reason, task_id, token }) => run("set_token", { reason, token, taskId: task_id }));
|
|
314
|
+
server.registerTool("reply", {
|
|
315
|
+
title: "Reply on a task or comment",
|
|
316
|
+
description: "Posts in a thread without resolving it: a question when something's unclear, or a progress update.",
|
|
317
|
+
inputSchema: { annotation_id: z.string(), body: z.string().min(1) }
|
|
318
|
+
}, ({ annotation_id, body }) => run("reply", { annotationId: annotation_id, body }));
|
|
319
|
+
server.registerTool("resolve_task", {
|
|
320
|
+
title: "Resolve a task",
|
|
321
|
+
description: "Marks a task done, with a one-line summary of what you changed. The designer can reopen it.",
|
|
322
|
+
inputSchema: { task_id: z.string(), summary: z.string().min(1) }
|
|
323
|
+
}, ({ task_id, summary }) => run("resolve_task", { taskId: task_id, summary }));
|
|
324
|
+
server.registerTool("get_rules", {
|
|
325
|
+
title: "Get the editing rules",
|
|
326
|
+
description: "The design's editing rules. You edit as the editor role, so every change is checked against them: what can change, which values are allowed, and which layers are locked.",
|
|
327
|
+
inputSchema: {},
|
|
328
|
+
annotations: { readOnlyHint: true }
|
|
329
|
+
}, () => run("get_rules"));
|
|
330
|
+
server.registerTool("allowed_changes", {
|
|
331
|
+
title: "What can change on a layer",
|
|
332
|
+
description: "What the rules let you change on one layer: editable properties (null means any), value limits per property (tokens only, ranges, lists), whether its content and structure can change, which children it can take, and whether larger breakpoints can override it. Check before changing a layer.",
|
|
333
|
+
inputSchema: { layer_id: z.string() },
|
|
334
|
+
annotations: { readOnlyHint: true }
|
|
335
|
+
}, ({ layer_id }) => run("allowed_changes", { layerId: layer_id }));
|
|
336
|
+
server.registerTool("check_document", {
|
|
337
|
+
title: "Check the design against its rules",
|
|
338
|
+
description: "Lists every place the design breaks its own rules, with the rule and the layer. Empty when it follows them.",
|
|
339
|
+
inputSchema: {},
|
|
340
|
+
annotations: { readOnlyHint: true }
|
|
341
|
+
}, () => run("check_document"));
|
|
342
|
+
server.registerTool("export_html", {
|
|
343
|
+
title: "Export the design as HTML and CSS",
|
|
344
|
+
description: "The design as { html, css }: responsive, with a min-width media query per breakpoint and tokens as CSS custom properties.",
|
|
345
|
+
inputSchema: {},
|
|
346
|
+
annotations: { readOnlyHint: true }
|
|
347
|
+
}, () => run("export_html"));
|
|
348
|
+
await server.connect(new StdioServerTransport);
|
|
349
|
+
say("MCP server ready");
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@reallygoodwork/design-ui-mcp",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "An MCP server that lets agents work on a design: in an open editor, or on a design file with no browser.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/reallygoodwork/design-ui.git",
|
|
9
|
+
"directory": "packages/mcp"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/reallygoodwork/design-ui#readme",
|
|
12
|
+
"bugs": "https://github.com/reallygoodwork/design-ui/issues",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"bin": {
|
|
18
|
+
"design-ui-mcp": "./dist/cli.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/cli.js",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "bun build src/server.ts --target=node --packages=external --banner='#!/usr/bin/env node' --outfile=dist/cli.js",
|
|
29
|
+
"prepublishOnly": "echo \"Packages publish from GitHub Actions when a version bump is merged. See Publishing in the README.\" && exit 1"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@reallygoodwork/design-ui-core": "0.1.1",
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
34
|
+
"ws": "^8.22.2",
|
|
35
|
+
"zod": "^4"
|
|
36
|
+
}
|
|
37
|
+
}
|