@atomixstudio/mcp 1.0.14 → 1.0.15

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
@@ -146,7 +146,7 @@ Once connected, AI tools can use these:
146
146
  | `getAIToolRules(tool)` | Generate AI coding rules for your design system |
147
147
  | `exportMCPConfig(tool)` | Get MCP configuration for different tools |
148
148
  | `getSetupInstructions(tool)` | Get detailed setup guide |
149
- | `getDependencies(platform?, stack?)` | Get suggested dependencies (icons, fonts, SKILL.md, MCP config, tokens). Optional: `platform` (web, ios, android), `stack` (e.g. react, vue, next). Use with **atomix/install**. |
149
+ | `getDependencies(platform?, stack?)` | Get suggested dependencies (icons, fonts, SKILL.md, MCP config, tokens). Optional: `platform` (web, ios, android), `stack` (e.g. react, vue, next). Use with **--setup** prompt. |
150
150
 
151
151
  ### getDependencies
152
152
 
@@ -169,9 +169,21 @@ Returns DS-derived suggestions so the client's AI can build a "Suggested" vs "Al
169
169
 
170
170
  If the design system or MCP is not available (e.g. no `--ds-id`), the tool may fail; the client should tell the user to configure MCP with `--ds-id` and try again.
171
171
 
172
- ## atomix/install
172
+ ## MCP Prompts
173
173
 
174
- The **install** prompt suggests dependencies for your design system so you can get up and running quickly. It does **not** install anything by default; the client's AI presents a list and asks before making changes.
174
+ Once connected, your AI tool can run these prompts (e.g. **/--hello**, **/--setup**):
175
+
176
+ | Prompt | Description |
177
+ |--------|-------------|
178
+ | **/--hello** | Get started — overview, tokens, and tools. Run this first. |
179
+ | **/--setup** | Setup design system in project. Three phases; creates files only after you approve. |
180
+ | **/--rules** | Governance rules for your AI tool (Cursor, Copilot, Windsurf, etc.). |
181
+ | **/--sync** | Sync tokens to a local file. Use **/--refactor** to migrate deprecated tokens. |
182
+ | **/--refactor** | Migrate deprecated tokens in codebase. Run after **/--sync**. |
183
+
184
+ ## --setup (design system setup)
185
+
186
+ The **--setup** prompt suggests dependencies for your design system so you can get up and running quickly. It does **not** install anything by default; the client's AI presents a list and asks before making changes.
175
187
 
176
188
  **Flow (phased instructions):**
177
189
 
@@ -182,7 +194,7 @@ The **install** prompt suggests dependencies for your design system so you can g
182
194
  5. **Optional: suggest global styles** — If the project has no global styles that use the design system tokens, ask verbatim: "Your project doesn't appear to have global styles that use the design system tokens (e.g. semantic typography scale or semantic color classes). Would you like me to suggest or generate a minimal set (e.g. typography scale + semantic utilities) so you can develop consistently with the DS?"
183
195
  6. **Report what was created** — After any install/copy steps, list what was created or updated (e.g. "Installed: lucide-react. Added: .cursor/skills/atomix-ds/SKILL.md. Updated: .cursor/mcp.json. Copied: tokens.css.").
184
196
 
185
- **Single SKILL.md:** The install flow suggests adding a generic, coding-platform agnostic SKILL at `.cursor/skills/atomix-ds/SKILL.md`. It instructs the AI to call `getAIToolRules({ tool: "<tool>" })` where `<tool>` matches the current environment (cursor, windsurf, copilot, cline, continue, zed, generic).
197
+ **Single SKILL.md:** The setup flow suggests adding a generic, coding-platform agnostic SKILL at `.cursor/skills/atomix-ds/SKILL.md`. It instructs the AI to call `getAIToolRules({ tool: "<tool>" })` where `<tool>` matches the current environment (cursor, windsurf, copilot, cline, continue, zed, generic).
186
198
 
187
199
  ## Token Categories
188
200
 
@@ -237,6 +249,10 @@ npx heyatomix sync
237
249
  | `@atomixstudio/mcp` | Full MCP server + CLI |
238
250
  | `atomix-sync` | Legacy alias (deprecated) |
239
251
 
252
+ ## Troubleshooting
253
+
254
+ **MCP shows old prompts or tools after updating:** Your IDE or npx may be using a cached version. Quit the IDE, clear the npx cache (`rm -rf ~/.npm/_npx` on macOS/Linux, or delete the `_npx` folder inside your [npm cache directory](https://docs.npmjs.com/cli/v10/commands/npm-cache)), then reopen the IDE and reconnect the MCP server.
255
+
240
256
  ## Links
241
257
 
242
258
  - [Atomix Studio](https://atomixstudio.eu)
package/dist/index.js CHANGED
@@ -1345,7 +1345,7 @@ var TOKEN_CATEGORIES = ["colors", "typography", "spacing", "sizing", "shadows",
1345
1345
  var server = new Server(
1346
1346
  {
1347
1347
  name: "atomix-mcp-user",
1348
- version: "1.0.11"
1348
+ version: "1.0.15"
1349
1349
  },
1350
1350
  {
1351
1351
  capabilities: {
@@ -1490,7 +1490,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
1490
1490
  },
1491
1491
  {
1492
1492
  name: "getDependencies",
1493
- description: "Get suggested dependencies for this design system (icon package, fonts, SKILL.md, token files). Use with atomix/setup. Optional platform and stack for tailored suggestions.",
1493
+ description: "Get suggested dependencies for this design system (icon package, fonts, SKILL.md, token files). Use with atomix-setup prompt. Optional platform and stack for tailored suggestions.",
1494
1494
  inputSchema: {
1495
1495
  type: "object",
1496
1496
  properties: {
@@ -2159,23 +2159,8 @@ description: Use this design system when editing UI, design system files, or whe
2159
2159
  var AI_TOOLS = ["cursor", "copilot", "windsurf", "cline", "continue", "zed", "generic"];
2160
2160
  server.setRequestHandler(ListResourcesRequestSchema, async () => {
2161
2161
  try {
2162
- const data = await fetchDesignSystemForMCP();
2163
- const stats = getTokenStats(data);
2164
- const resources = [
2165
- {
2166
- uri: "atomix://hello",
2167
- name: `Welcome to ${data.meta.name}`,
2168
- description: `Design system overview with ${stats.total} tokens and ${stats.governanceRules} governance rules`,
2169
- mimeType: "text/markdown"
2170
- },
2171
- ...AI_TOOLS.map((tool) => ({
2172
- uri: `atomix://rules/${tool}`,
2173
- name: `${tool.charAt(0).toUpperCase() + tool.slice(1)} Rules`,
2174
- description: `Design system rules file for ${tool}`,
2175
- mimeType: "text/markdown"
2176
- }))
2177
- ];
2178
- return { resources };
2162
+ await fetchDesignSystemForMCP();
2163
+ return { resources: [] };
2179
2164
  } catch {
2180
2165
  return {
2181
2166
  resources: [
@@ -2254,75 +2239,31 @@ Get your DS ID from: https://atomixstudio.eu/ds/[your-ds-id]`
2254
2239
  });
2255
2240
  server.setRequestHandler(ListPromptsRequestSchema, async () => {
2256
2241
  const prompts = [
2242
+ { name: "--hello", description: "Get started with this design system - overview, tokens, and tools. Run this first!" },
2257
2243
  {
2258
- name: "hello",
2259
- description: "Get started with this design system - shows overview, available tokens, and tools. Run this first!"
2260
- },
2261
- {
2262
- name: "design-system-rules",
2263
- description: "Get the design system governance rules for your AI coding tool",
2244
+ name: "--setup",
2245
+ description: "Setup design system in project. Three phases: scan, report and ask, then create only after you approve.",
2264
2246
  arguments: [
2265
- {
2266
- name: "tool",
2267
- description: "AI tool to generate rules for (cursor, copilot, windsurf, cline, continue, zed, generic)",
2268
- required: false
2269
- }
2247
+ { name: "platform", description: "Target platform (web, ios, android). Optional.", required: false },
2248
+ { name: "stack", description: "Stack or framework (e.g. react, vue, next, swift, kotlin). Optional.", required: false }
2270
2249
  ]
2271
2250
  },
2272
2251
  {
2273
- name: "spacing",
2274
- description: "List all spacing tokens with their values in a table format"
2275
- },
2276
- {
2277
- name: "radius",
2278
- description: "List all border radius tokens with their values in a table format"
2279
- },
2280
- {
2281
- name: "color",
2282
- description: "List all color tokens with light/dark mode values in a table format"
2283
- },
2284
- {
2285
- name: "typography",
2286
- description: "List all typography tokens with their values in a table format"
2287
- },
2288
- {
2289
- name: "shadow",
2290
- description: "List all shadow/elevation tokens with their values in a table format"
2291
- },
2292
- {
2293
- name: "border",
2294
- description: "List all border width tokens with their values in a table format"
2295
- },
2296
- {
2297
- name: "sizing",
2298
- description: "List all sizing tokens (height, icon) with their values in a table format"
2299
- },
2300
- {
2301
- name: "motion",
2302
- description: "List all motion tokens (duration, easing) with their values in a table format"
2303
- },
2304
- {
2305
- name: "sync",
2306
- description: "Sync design tokens (./tokens.css). Safe: Adds new tokens, updates existing values, marks deprecated tokens. Supports formats: css, scss, less, json, ts, js, swift, kotlin, dart. Use /refactor to migrate deprecated tokens."
2307
- },
2308
- {
2309
- name: "refactor",
2310
- description: "Migrate deprecated tokens in codebase. Scans for deprecated tokens marked by /sync and suggests replacements. Run after /sync to update code."
2311
- },
2312
- {
2313
- name: "setup",
2314
- description: "Suggest dependencies for this design system (icons, fonts, SKILL.md, tokens). Three phases: scan, report and ask, then create only after approval.",
2252
+ name: "--rules",
2253
+ description: "Get the design system governance rules for your AI coding tool",
2315
2254
  arguments: [
2316
- { name: "platform", description: "Target platform (web, ios, android). Optional; ask user if unknown.", required: false },
2317
- { name: "stack", description: "Stack or framework (e.g. react, vue, next, swift, kotlin). Optional.", required: false }
2255
+ { name: "tool", description: "AI tool (cursor, copilot, windsurf, cline, continue, zed, generic). Optional.", required: false }
2318
2256
  ]
2319
- }
2257
+ },
2258
+ { name: "--sync", description: "Sync tokens to a local file. Safe: adds new, updates existing, marks deprecated. Use /--refactor to migrate." },
2259
+ { name: "--refactor", description: "Migrate deprecated tokens in codebase. Run after /--sync." }
2320
2260
  ];
2321
2261
  return { prompts };
2322
2262
  });
2323
2263
  server.setRequestHandler(GetPromptRequestSchema, async (request) => {
2324
2264
  const { name, arguments: args } = request.params;
2325
- const shouldForceRefresh = name === "sync";
2265
+ const canonicalName = name === "--hello" ? "hello" : name === "--setup" ? "atomix-setup" : name === "--rules" ? "design-system-rules" : name === "--sync" ? "sync" : name === "--refactor" ? "refactor" : name;
2266
+ const shouldForceRefresh = canonicalName === "sync";
2326
2267
  let data = null;
2327
2268
  let stats = null;
2328
2269
  try {
@@ -2427,9 +2368,18 @@ Configure the MCP server in your Cursor settings, then restart Cursor.`
2427
2368
  lines.push(instructions);
2428
2369
  return lines.join("\n");
2429
2370
  };
2430
- switch (name) {
2371
+ switch (canonicalName) {
2431
2372
  case "hello": {
2432
2373
  const welcome = generateWelcomeMessage(data, stats);
2374
+ const helloInstruction = `You are showing the Atomix design system welcome. You MUST do the following in order:
2375
+
2376
+ 1. **First** \u2014 Copy and draw the ASCII art block exactly as it appears below (the code block with the arrow pattern). Output it verbatim before any other text. Do not summarize, skip, or replace it with a description.
2377
+ 2. **Then** \u2014 Output the rest of the welcome message (markdown) exactly as given.
2378
+
2379
+ Do not add any introduction or commentary before the ASCII art. The ASCII art must be the very first thing you output.
2380
+
2381
+ ---
2382
+ ${welcome}`;
2433
2383
  return {
2434
2384
  description: `Hello \u2014 ${data.meta.name} Design System`,
2435
2385
  messages: [
@@ -2437,7 +2387,7 @@ Configure the MCP server in your Cursor settings, then restart Cursor.`
2437
2387
  role: "user",
2438
2388
  content: {
2439
2389
  type: "text",
2440
- text: welcome
2390
+ text: helloInstruction
2441
2391
  }
2442
2392
  }
2443
2393
  ]
@@ -2743,8 +2693,16 @@ Use \`/color\`, \`/spacing\`, \`/radius\`, \`/typography\`, \`/shadow\`, \`/bord
2743
2693
  ]
2744
2694
  };
2745
2695
  }
2746
- case "setup": {
2747
- const setupInstructions = `You are running **atomix/setup**. Three phases only. Do not create, write, or modify any file until Phase 3 and only after the user has approved.
2696
+ case "atomix-setup": {
2697
+ const setupInstructions = `You are running **atomix-setup** (design system setup). Three phases only.
2698
+
2699
+ **Rule:** Do not create, write, or modify any file until Phase 3 and only after the user has explicitly approved (e.g. replied "Yes", "Yes for all", "Go ahead"). Creating or modifying files before the user approves is a rule violation.
2700
+
2701
+ ## Todo list (required)
2702
+
2703
+ - **Create a todo list** at the start with items for Phase 1, Phase 2, and Phase 3 (e.g. "Phase 1: Scan", "Phase 2: Report and ask", "Phase 3: Create after approval").
2704
+ - Work **step by step**: complete Phase 1, then Phase 2; do not run Phase 3 until the user has replied with approval.
2705
+ - Mark todo items completed as you finish each phase. Use this pattern so the user and you can track progress.
2748
2706
 
2749
2707
  ## Phase 1 \u2013 Scan
2750
2708
 
@@ -2776,9 +2734,9 @@ Use \`/color\`, \`/spacing\`, \`/radius\`, \`/typography\`, \`/shadow\`, \`/bord
2776
2734
 
2777
2735
  ---
2778
2736
 
2779
- Execute Phase 1 now (resolve platform/stack, call getDependencies, scan, build lists). Then Phase 2 (report lists and ask). Do not perform Phase 3 until the user replies.`;
2737
+ Create your todo list first, then execute Phase 1 (resolve platform/stack, call getDependencies, scan, build lists). Then Phase 2 (report lists and ask). Do not perform Phase 3 until the user replies.`;
2780
2738
  return {
2781
- description: "Setup design system in project (atomix/setup). Phase 1 scan, Phase 2 report and ask, Phase 3 create only after user approval.",
2739
+ description: "Setup design system in project (atomix-setup). Create todo list; Phase 1 scan, Phase 2 report and ask, Phase 3 create only after user approval.",
2782
2740
  messages: [
2783
2741
  {
2784
2742
  role: "user",
@@ -2848,25 +2806,13 @@ ${tokenSummary}
2848
2806
 
2849
2807
  | Command | What to expect |
2850
2808
  |---------|----------------|
2851
- | **setup** | Scans your repo to set up global styles (if none), icons and fonts. Safe: Won't add anything until you confirm. |
2852
- | **sync** | Syncs tokens to a local file. Adds new, updates existing, marks deprecated. Safe: No changes until you confirm. |
2853
- | **refactor** | Scans codebase for deprecated tokens (after sync), suggests replacements. Run after sync to migrate code. |
2854
-
2855
- ## Helper commands
2809
+ | **/--hello** | Get started - overview, tokens, and tools. Run this first! |
2810
+ | **/--setup** | Setup design system in project. Three phases; creates files only after you approve. |
2811
+ | **/--rules** | Governance rules for your AI tool (Cursor, Copilot, Windsurf, etc.). |
2812
+ | **/--sync** | Sync tokens to a local file. Safe: adds new, updates existing, marks deprecated. |
2813
+ | **/--refactor** | Migrate deprecated tokens in codebase. Run after /--sync. |
2856
2814
 
2857
- | Command | What to expect |
2858
- |---------|----------------|
2859
- | **design-system-rules** | Returns governance rules for your AI tools. |
2860
- | **spacing** | Table of all spacing tokens and values. |
2861
- | **color** | Table of color tokens with light/dark values. |
2862
- | **typography** | Table of typography tokens and values. |
2863
- | **radius** | Table of border radius tokens. |
2864
- | **shadow** | Table of shadow/elevation tokens. |
2865
- | **border** | Table of border width tokens. |
2866
- | **sizing** | Table of height and icon size tokens. |
2867
- | **motion** | Table of duration and easing tokens. |
2868
-
2869
- **Suggested next step:** Run **setup** to set up global styles, icons, fonts, and token files; the AI will list options and ask before adding anything.
2815
+ **Suggested next step:** Run **/--setup** to set up global styles, icons, fonts, and token files; the AI will list options and ask before adding anything.
2870
2816
 
2871
2817
  ---
2872
2818