@atomixstudio/mcp 1.0.27 → 1.0.28
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 +1 -1
- package/dist/index.js +107 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) server and CLI for Atomix Design System. Query and sync design tokens from AI coding tools (Cursor, Claude Desktop, Windsurf, etc.) or from the command line.
|
|
4
4
|
|
|
5
|
-
**Version:** 1.0.
|
|
5
|
+
**Version:** 1.0.28 — Sync to Figma: removes variables/styles not in payload (same collections only); color scopes (Bg = frame fill only, Action/Feedback = all fill); update-or-create for paint/text/effect styles to avoid duplicates; change summary in sync response; instructions AI-tool agnostic.
|
|
6
6
|
|
|
7
7
|
## Getting Your Credentials
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -1300,8 +1300,8 @@ var FIGMA_BRIDGE_TIMEOUT_MS = 15e3;
|
|
|
1300
1300
|
var FIGMA_BRIDGE_TOKEN = process.env.FIGMA_BRIDGE_TOKEN || null;
|
|
1301
1301
|
var FIGMA_CONNECTION_INSTRUCTIONS = {
|
|
1302
1302
|
installAndRun: "In Figma: Open Plugins and run the Atomix plugin (Atomix Token Extractor). If it's not installed yet, install it from the Figma Community or your team's plugin library, then run it.",
|
|
1303
|
-
connect: 'In the plugin UI, tap **Connect
|
|
1304
|
-
startBridge: "The Figma bridge runs with this MCP server. Ensure
|
|
1303
|
+
connect: 'In the plugin UI, tap **Connect** and wait until the status shows "Connected".',
|
|
1304
|
+
startBridge: "The Figma bridge runs with this MCP server. Ensure your AI environment has this MCP server running (e.g. in MCP settings), then in Figma run the Atomix plugin and tap Connect."
|
|
1305
1305
|
};
|
|
1306
1306
|
var bridgeWss = null;
|
|
1307
1307
|
var pluginWs = null;
|
|
@@ -1445,7 +1445,7 @@ function sendBridgeRequest(method, params, timeoutMs = FIGMA_BRIDGE_TIMEOUT_MS)
|
|
|
1445
1445
|
const ws = pluginWs;
|
|
1446
1446
|
if (!ws || ws.readyState !== WebSocket.OPEN) {
|
|
1447
1447
|
return Promise.reject(
|
|
1448
|
-
new Error("Figma plugin not connected. Open Figma, run Atomix plugin, and
|
|
1448
|
+
new Error("Figma plugin not connected. Open Figma, run Atomix plugin, and tap Connect.")
|
|
1449
1449
|
);
|
|
1450
1450
|
}
|
|
1451
1451
|
const id = `mcp-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
@@ -1865,7 +1865,7 @@ var authFailedNoTools = false;
|
|
|
1865
1865
|
function hasValidAuthConfig() {
|
|
1866
1866
|
return !!(dsId && accessToken);
|
|
1867
1867
|
}
|
|
1868
|
-
var AUTH_REQUIRED_MESSAGE = "Atomix MCP requires authentication. Add both --ds-id and --atomix-token to your MCP config (Settings \u2192 MCP), then restart
|
|
1868
|
+
var AUTH_REQUIRED_MESSAGE = "Atomix MCP requires authentication. Add both --ds-id and --atomix-token to your MCP config (Settings \u2192 MCP), then restart your AI tool. Get your token from Atomix Studio: Export modal or Settings \u2192 Regenerate Atomix access token.";
|
|
1869
1869
|
var lastChangeSummary = null;
|
|
1870
1870
|
var FIGMA_SYNC_TOOL_NAME = "syncToFigma";
|
|
1871
1871
|
var FIGMA_DESIGN_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -1998,7 +1998,7 @@ function buildTypesetsList(typography, cssPrefix = "atmx") {
|
|
|
1998
1998
|
var server = new Server(
|
|
1999
1999
|
{
|
|
2000
2000
|
name: "atomix-mcp-user",
|
|
2001
|
-
version: "1.0.
|
|
2001
|
+
version: "1.0.27"
|
|
2002
2002
|
},
|
|
2003
2003
|
{
|
|
2004
2004
|
capabilities: {
|
|
@@ -2029,7 +2029,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
2029
2029
|
authFailedNoTools = true;
|
|
2030
2030
|
console.error(
|
|
2031
2031
|
"[Atomix MCP] Design system not loaded: ds-id or token invalid or API error. No tools will be shown.",
|
|
2032
|
-
msg.includes("401") ? " Token invalid or expired. Regenerate in Atomix Studio (Settings \u2192 Regenerate Atomix access token), update your MCP config, then restart
|
|
2032
|
+
msg.includes("401") ? " Token invalid or expired. Regenerate in Atomix Studio (Settings \u2192 Regenerate Atomix access token), update your MCP config, then restart your AI tool." : msg.includes("403") ? " You do not have access to this design system (owner or invited guest)." : msg.includes("404") ? " Design system not found (invalid ds-id)." : msg
|
|
2033
2033
|
);
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
@@ -2377,7 +2377,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2377
2377
|
return {
|
|
2378
2378
|
content: [{
|
|
2379
2379
|
type: "text",
|
|
2380
|
-
text: "MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart
|
|
2380
|
+
text: "MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart your AI tool. No tools are available until then."
|
|
2381
2381
|
}],
|
|
2382
2382
|
isError: true
|
|
2383
2383
|
};
|
|
@@ -2814,11 +2814,11 @@ Version: ${designSystemData.meta.version}`,
|
|
|
2814
2814
|
case "getSetupInstructions": {
|
|
2815
2815
|
const tool = args?.tool;
|
|
2816
2816
|
const instructions = {
|
|
2817
|
-
cursor: `#
|
|
2817
|
+
cursor: `# MCP Setup
|
|
2818
2818
|
|
|
2819
|
-
1. Create \`.cursor/mcp.json\`
|
|
2819
|
+
1. Create your MCP config file in the project (e.g. \`.cursor/mcp.json\` for Cursor)
|
|
2820
2820
|
2. Add the MCP configuration (use exportMCPConfig to get it)
|
|
2821
|
-
3. Restart
|
|
2821
|
+
3. Restart your IDE
|
|
2822
2822
|
4. Verify by asking: "What design tokens are available?"
|
|
2823
2823
|
|
|
2824
2824
|
## File Structure
|
|
@@ -3118,7 +3118,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3118
3118
|
case "syncToFigma": {
|
|
3119
3119
|
const payloads = buildFigmaPayloadsFromDS(data);
|
|
3120
3120
|
const out = {};
|
|
3121
|
-
const agentStartBridge = `The Figma bridge runs with this MCP server. Ensure
|
|
3121
|
+
const agentStartBridge = `The Figma bridge runs with this MCP server. Ensure your AI environment has this MCP server configured and running, then in Figma run the Atomix plugin and tap Connect. Then call **syncToFigma** again.`;
|
|
3122
3122
|
const userSteps = [
|
|
3123
3123
|
FIGMA_CONNECTION_INSTRUCTIONS.startBridge,
|
|
3124
3124
|
FIGMA_CONNECTION_INSTRUCTIONS.installAndRun,
|
|
@@ -3148,11 +3148,15 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3148
3148
|
out.colorVariables = await sendBridgeRequest("create_color_variables", {
|
|
3149
3149
|
collectionName: payloads.colorVariables.collectionName,
|
|
3150
3150
|
modes: payloads.colorVariables.modes,
|
|
3151
|
-
variables: payloads.colorVariables.variables
|
|
3151
|
+
variables: payloads.colorVariables.variables,
|
|
3152
|
+
removeVariablesNotInPayload: true
|
|
3152
3153
|
});
|
|
3153
3154
|
}
|
|
3154
3155
|
if (payloads.paintStyles.length > 0) {
|
|
3155
|
-
out.paintStyles = await sendBridgeRequest("create_paint_styles", {
|
|
3156
|
+
out.paintStyles = await sendBridgeRequest("create_paint_styles", {
|
|
3157
|
+
styles: payloads.paintStyles,
|
|
3158
|
+
removePaintStylesNotInPayload: true
|
|
3159
|
+
});
|
|
3156
3160
|
}
|
|
3157
3161
|
if (payloads.numberVariableCollections.length > 0) {
|
|
3158
3162
|
const numberResults = [];
|
|
@@ -3161,7 +3165,8 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3161
3165
|
const result = await sendBridgeRequest("create_number_variables", {
|
|
3162
3166
|
collectionName: coll.collectionName,
|
|
3163
3167
|
variables: coll.variables.map((v) => ({ name: v.name, value: v.value })),
|
|
3164
|
-
scopes: coll.scopes
|
|
3168
|
+
scopes: coll.scopes,
|
|
3169
|
+
removeVariablesNotInPayload: true
|
|
3165
3170
|
});
|
|
3166
3171
|
numberResults.push({ categoryKey: coll.categoryKey, result });
|
|
3167
3172
|
}
|
|
@@ -3175,10 +3180,16 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3175
3180
|
}
|
|
3176
3181
|
}
|
|
3177
3182
|
if (payloads.textStyles.length > 0) {
|
|
3178
|
-
out.textStyles = await sendBridgeRequest("create_text_styles", {
|
|
3183
|
+
out.textStyles = await sendBridgeRequest("create_text_styles", {
|
|
3184
|
+
styles: payloads.textStyles,
|
|
3185
|
+
removeTextStylesNotInPayload: true
|
|
3186
|
+
});
|
|
3179
3187
|
}
|
|
3180
3188
|
if (payloads.effectStyles.length > 0) {
|
|
3181
|
-
out.effectStyles = await sendBridgeRequest("create_effect_styles", {
|
|
3189
|
+
out.effectStyles = await sendBridgeRequest("create_effect_styles", {
|
|
3190
|
+
styles: payloads.effectStyles,
|
|
3191
|
+
removeShadowStylesNotInPayload: true
|
|
3192
|
+
});
|
|
3182
3193
|
}
|
|
3183
3194
|
out.figmaPayload = {
|
|
3184
3195
|
collectionName: payloads.colorVariables.collectionName,
|
|
@@ -3218,11 +3229,76 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3218
3229
|
if (out.numberVariablesHint) {
|
|
3219
3230
|
out.summary = [out.summary, out.numberVariablesHint].filter(Boolean).join(" ");
|
|
3220
3231
|
}
|
|
3232
|
+
const summaryParts = [];
|
|
3233
|
+
const colorResult = out.colorVariables;
|
|
3234
|
+
if (colorResult && (colorResult.variableNames?.length || (colorResult.removed ?? 0) > 0)) {
|
|
3235
|
+
const parts = [];
|
|
3236
|
+
if (colorResult.variableNames?.length) parts.push(`${colorResult.variableNames.length} synced`);
|
|
3237
|
+
if ((colorResult.removed ?? 0) > 0) parts.push(`${colorResult.removed} removed`);
|
|
3238
|
+
summaryParts.push(`Colors: ${parts.join(", ")}.`);
|
|
3239
|
+
}
|
|
3240
|
+
const paintResult = out.paintStyles;
|
|
3241
|
+
if (paintResult) {
|
|
3242
|
+
const c = paintResult.created ?? 0;
|
|
3243
|
+
const u = paintResult.updated ?? 0;
|
|
3244
|
+
const r = paintResult.removed ?? 0;
|
|
3245
|
+
if (c + u + r > 0) {
|
|
3246
|
+
const parts = [];
|
|
3247
|
+
if (c > 0) parts.push(`${c} created`);
|
|
3248
|
+
if (u > 0) parts.push(`${u} updated`);
|
|
3249
|
+
if (r > 0) parts.push(`${r} removed`);
|
|
3250
|
+
summaryParts.push(`Paint styles: ${parts.join(", ")}.`);
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
const effectResult = out.effectStyles;
|
|
3254
|
+
if (effectResult) {
|
|
3255
|
+
const c = effectResult.created ?? 0;
|
|
3256
|
+
const u = effectResult.updated ?? 0;
|
|
3257
|
+
const r = effectResult.removed ?? 0;
|
|
3258
|
+
if (c + u + r > 0) {
|
|
3259
|
+
const parts = [];
|
|
3260
|
+
if (c > 0) parts.push(`${c} created`);
|
|
3261
|
+
if (u > 0) parts.push(`${u} updated`);
|
|
3262
|
+
if (r > 0) parts.push(`${r} removed`);
|
|
3263
|
+
summaryParts.push(`Effect styles (shadows): ${parts.join(", ")}.`);
|
|
3264
|
+
if (effectResult.removedNames?.length) {
|
|
3265
|
+
summaryParts.push(`Removed: ${effectResult.removedNames.join(", ")}.`);
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
const numResult = out.numberVariables;
|
|
3270
|
+
if (Array.isArray(numResult)) {
|
|
3271
|
+
const total = numResult.reduce((acc, r) => acc + (r.result?.variableNames?.length ?? 0), 0);
|
|
3272
|
+
const totalRemoved = numResult.reduce((acc, r) => acc + (r.result?.removed ?? 0), 0);
|
|
3273
|
+
if (total > 0 || totalRemoved > 0) {
|
|
3274
|
+
const parts = [];
|
|
3275
|
+
if (total > 0) parts.push(`${total} synced`);
|
|
3276
|
+
if (totalRemoved > 0) parts.push(`${totalRemoved} removed`);
|
|
3277
|
+
summaryParts.push(`Number variables: ${parts.join(", ")}.`);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
const textStylesWithRemoved = out.textStyles;
|
|
3281
|
+
if (textStylesWithRemoved && (textStylesWithRemoved.created ?? 0) + (textStylesWithRemoved.updated ?? 0) + (textStylesWithRemoved.removed ?? 0) > 0) {
|
|
3282
|
+
const c = textStylesWithRemoved.created ?? 0;
|
|
3283
|
+
const u = textStylesWithRemoved.updated ?? 0;
|
|
3284
|
+
const r = textStylesWithRemoved.removed ?? 0;
|
|
3285
|
+
const parts = [];
|
|
3286
|
+
if (c > 0) parts.push(`${c} created`);
|
|
3287
|
+
if (u > 0) parts.push(`${u} updated`);
|
|
3288
|
+
if (r > 0) parts.push(`${r} removed`);
|
|
3289
|
+
summaryParts.push(`Text styles: ${parts.join(", ")}.`);
|
|
3290
|
+
}
|
|
3291
|
+
if (summaryParts.length > 0 && !out.error) {
|
|
3292
|
+
out.summary = [out.summary, summaryParts.join(" ")].filter(Boolean).join(" ");
|
|
3293
|
+
}
|
|
3221
3294
|
out.motionEasingNote = "Motion easing tokens are not synced as Figma styles; Figma has no reusable easing style. Easing is only used in prototype transitions (e.g. smart animate). Duration/easing remain available as number variables (duration) or in export JSON.";
|
|
3295
|
+
const responseText = out.summary ? `${out.summary}
|
|
3296
|
+
|
|
3297
|
+
${JSON.stringify(out, null, 2)}` : JSON.stringify(out, null, 2);
|
|
3222
3298
|
return {
|
|
3223
3299
|
content: [{
|
|
3224
3300
|
type: "text",
|
|
3225
|
-
text:
|
|
3301
|
+
text: responseText
|
|
3226
3302
|
}],
|
|
3227
3303
|
...out.error ? { isError: true } : {}
|
|
3228
3304
|
};
|
|
@@ -3237,7 +3313,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3237
3313
|
text: JSON.stringify({
|
|
3238
3314
|
error: "Figma bridge not reachable.",
|
|
3239
3315
|
bridgeNotRunning: true,
|
|
3240
|
-
agentInstruction: "The Figma bridge runs with this MCP server. Ensure
|
|
3316
|
+
agentInstruction: "The Figma bridge runs with this MCP server. Ensure your AI environment has this MCP server running, then in Figma run the Atomix plugin and tap Connect. Then call getFigmaVariablesAndStyles again."
|
|
3241
3317
|
}, null, 2)
|
|
3242
3318
|
}],
|
|
3243
3319
|
isError: true
|
|
@@ -3267,7 +3343,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3267
3343
|
type: "text",
|
|
3268
3344
|
text: JSON.stringify({
|
|
3269
3345
|
error: "Figma bridge not reachable.",
|
|
3270
|
-
hint: "The bridge runs with this MCP server. Ensure
|
|
3346
|
+
hint: "The bridge runs with this MCP server. Ensure your AI environment has this MCP server running, then run the Atomix plugin and tap Connect."
|
|
3271
3347
|
}, null, 2)
|
|
3272
3348
|
}],
|
|
3273
3349
|
isError: true
|
|
@@ -3385,7 +3461,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3385
3461
|
type: "text",
|
|
3386
3462
|
text: JSON.stringify({
|
|
3387
3463
|
error: "Figma bridge not reachable.",
|
|
3388
|
-
hint: "Run the Atomix plugin in Figma and
|
|
3464
|
+
hint: "Run the Atomix plugin in Figma and tap Connect, then retry."
|
|
3389
3465
|
}, null, 2)
|
|
3390
3466
|
}],
|
|
3391
3467
|
isError: true
|
|
@@ -3426,7 +3502,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3426
3502
|
type: "text",
|
|
3427
3503
|
text: JSON.stringify({
|
|
3428
3504
|
error: "Figma bridge not reachable.",
|
|
3429
|
-
hint: "Run the Atomix plugin in Figma and
|
|
3505
|
+
hint: "Run the Atomix plugin in Figma and tap Connect, then retry."
|
|
3430
3506
|
}, null, 2)
|
|
3431
3507
|
}],
|
|
3432
3508
|
isError: true
|
|
@@ -3459,7 +3535,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
|
|
|
3459
3535
|
type: "text",
|
|
3460
3536
|
text: JSON.stringify({
|
|
3461
3537
|
error: "Figma bridge not reachable.",
|
|
3462
|
-
hint: "Run the Atomix plugin in Figma and
|
|
3538
|
+
hint: "Run the Atomix plugin in Figma and tap Connect, then retry."
|
|
3463
3539
|
}, null, 2)
|
|
3464
3540
|
}],
|
|
3465
3541
|
isError: true
|
|
@@ -3731,7 +3807,7 @@ Get your DS ID and token from the Export modal or Settings \u2192 Regenerate Ato
|
|
|
3731
3807
|
};
|
|
3732
3808
|
}
|
|
3733
3809
|
if (!hasValidAuthConfig() || authFailedNoTools) {
|
|
3734
|
-
throw new Error("MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart
|
|
3810
|
+
throw new Error("MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart your AI tool. See atomix://setup for instructions.");
|
|
3735
3811
|
}
|
|
3736
3812
|
const data = await fetchDesignSystemForMCP();
|
|
3737
3813
|
const stats = getTokenStats(data);
|
|
@@ -3806,7 +3882,7 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
3806
3882
|
role: "user",
|
|
3807
3883
|
content: {
|
|
3808
3884
|
type: "text",
|
|
3809
|
-
text: "MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart
|
|
3885
|
+
text: "MCP access requires valid --ds-id and --atomix-token. Add both to your MCP config and restart your AI tool. No tools or prompts are available until then."
|
|
3810
3886
|
}
|
|
3811
3887
|
}]
|
|
3812
3888
|
};
|
|
@@ -3832,7 +3908,7 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
3832
3908
|
- \`--ds-id\`: Your design system ID (get it from https://atomixstudio.eu/ds/[your-ds-id])
|
|
3833
3909
|
- \`--atomix-token\`: Your access token (get it from the Export modal or Settings \u2192 Regenerate Atomix access token)
|
|
3834
3910
|
|
|
3835
|
-
Both are required. Configure the MCP server in your
|
|
3911
|
+
Both are required. Configure the MCP server in your AI tool's MCP settings, then restart your AI tool.`
|
|
3836
3912
|
}
|
|
3837
3913
|
}
|
|
3838
3914
|
]
|
|
@@ -4150,7 +4226,7 @@ Format the response as a markdown table with columns: Token Name | Value | CSS V
|
|
|
4150
4226
|
role: "user",
|
|
4151
4227
|
content: {
|
|
4152
4228
|
type: "text",
|
|
4153
|
-
text: `Call the MCP tool **syncToFigma** now (no arguments). It pushes the design system into the open Figma file via the built-in bridge and Atomix plugin. Do not use the Figma REST API or external scripts. If the response includes \`bridgeNotRunning\` and \`agentInstruction\`, ensure
|
|
4229
|
+
text: `Call the MCP tool **syncToFigma** now (no arguments). It pushes the design system into the open Figma file via the built-in bridge and Atomix plugin. Do not use the Figma REST API or external scripts. If the response includes \`bridgeNotRunning\` and \`agentInstruction\`, ensure your AI environment has this MCP server running, then in Figma run the Atomix plugin and tap Connect, then call syncToFigma again. Only if that fails, tell the user: (1) Ensure this MCP server is configured and running in your AI tool. (2) In Figma, open and run the Atomix plugin, then tap **Connect**. (3) Run Sync to Figma again. After a successful sync, report the **summary** from the response (what was created, updated, or removed)\u2014do not say "we added the whole design system" when only some items changed.`
|
|
4154
4230
|
}
|
|
4155
4231
|
}
|
|
4156
4232
|
]
|
|
@@ -4166,7 +4242,7 @@ Format the response as a markdown table with columns: Token Name | Value | CSS V
|
|
|
4166
4242
|
type: "text",
|
|
4167
4243
|
text: `You must **design in Figma** by calling a **sequence of MCP tools**\u2014do not generate or run any JavaScript code. Follow the design-in-Figma skill if present; otherwise follow this **three-pass flow**.
|
|
4168
4244
|
|
|
4169
|
-
Prerequisites: Figma bridge runs inside this MCP server. In Figma, run the Atomix plugin and
|
|
4245
|
+
Prerequisites: Figma bridge runs inside this MCP server. In Figma, run the Atomix plugin and tap Connect; leave the plugin open.
|
|
4170
4246
|
|
|
4171
4247
|
**Setup (once):** syncToFigma \u2192 createDesignPlaceholder (save \`frameId\`) \u2192 getAIToolRules + listTokens \u2192 resolveFigmaIdsForTokens. Use the returned \`resolved\` map and \`frameId\` for all passes.
|
|
4172
4248
|
|
|
@@ -4179,7 +4255,7 @@ Apply the owner's design system: set all fills and text styles using only ids fr
|
|
|
4179
4255
|
**Pass 3 \u2014 Confirm no hardcoded values**
|
|
4180
4256
|
Audit: ensure no raw px, hex, or font values remain; every fill and text style must use an id from \`resolved\`. Call **getDesignScreenshot** once more. If everything is correct: call **finalizeDesignFrame** with \`frameId\`, \`name\` = a short description of the design + " \u2705", and \`fillVariableId\` (or \`fillPaintStyleId\`) from resolved for the surface/background so the placeholder gray is removed. Then **summarise** what was built and any fixes made across the three passes.
|
|
4181
4257
|
|
|
4182
|
-
If the bridge is not reachable: tell the user to run the Atomix plugin in Figma and
|
|
4258
|
+
If the bridge is not reachable: tell the user to run the Atomix plugin in Figma and tap Connect, then retry.`
|
|
4183
4259
|
}
|
|
4184
4260
|
}
|
|
4185
4261
|
]
|
|
@@ -4408,8 +4484,9 @@ ${tokenSummary}
|
|
|
4408
4484
|
|---------|----------------|
|
|
4409
4485
|
| **/--hello** | Get started - overview, tokens, and tools. Run this first! |
|
|
4410
4486
|
| **/--get-started** | Get started with design system in project. Three phases; creates files only after you approve. |
|
|
4411
|
-
| **/--rules** | Governance rules for your AI tool (Cursor, Copilot, Windsurf
|
|
4487
|
+
| **/--rules** | Governance rules for your AI tool (e.g. Cursor, Copilot, Windsurf). |
|
|
4412
4488
|
| **/--sync** | Sync tokens, rules, skills, and dependencies manifest (icons, fonts). Safe: adds new, updates existing, marks deprecated. |
|
|
4489
|
+
| **/--sync-to-figma** | Push design system to Figma (variables, paint/text/effect styles). Uses built-in bridge + Atomix plugin; connect plugin in Figma then run. Available on all tiers. |
|
|
4413
4490
|
| **/--refactor** | Migrate deprecated tokens in codebase. Run after /--sync. |
|
|
4414
4491
|
|
|
4415
4492
|
**Suggested next step:** Run **/--get-started** to set up global styles, icons, fonts, and token files; the AI will list options and ask before adding anything.
|
|
@@ -4440,7 +4517,7 @@ async function startServer() {
|
|
|
4440
4517
|
console.error(`Atomix MCP Server started for design system: ${dsId}`);
|
|
4441
4518
|
console.error(`Atomix MCP API base: ${apiBase}`);
|
|
4442
4519
|
console.error(
|
|
4443
|
-
"If you switched MCP config (e.g. free vs pro DS), restart
|
|
4520
|
+
"If you switched MCP config (e.g. free vs pro DS), restart your AI tool so this process uses the new --ds-id and --atomix-token."
|
|
4444
4521
|
);
|
|
4445
4522
|
}
|
|
4446
4523
|
function onShutdown() {
|