standby-design-mcp 0.1.2 → 0.1.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Karsten Kreh
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Karsten Kreh
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,8 +1,15 @@
1
- # @standby/mcp-server
1
+ # standby-design-mcp
2
+
3
+ [![npm](https://img.shields.io/npm/v/standby-design-mcp)](https://www.npmjs.com/package/standby-design-mcp)
4
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.KarstenKreh%2Fstandby--design--mcp-blue)](https://registry.modelcontextprotocol.io/?search=standby)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
2
6
 
3
7
  MCP server for [standby.design](https://standby.design) — generate and export
4
- production-ready design systems directly from Claude (or any MCP client),
5
- without touching the web UI.
8
+ production-ready **design systems** directly from Claude (or any MCP client):
9
+ **OKLCH color palettes**, **fluid type scales**, **spacing & layout**,
10
+ **shape tokens** (radii, shadows, glass, neobrutalism) and **icon tokens**,
11
+ exportable as **CSS custom properties**, **Tailwind v4 themes**, or
12
+ **W3C design tokens (DTCG)** — shadcn/ui compatible.
6
13
 
7
14
  All computation is shared with the standby.design web apps (`packages/core` +
8
15
  `system-react/src/lib`), so results are identical to what the UI produces.
package/dist/http.js CHANGED
@@ -1583,7 +1583,7 @@ function registerGenerateTools(server) {
1583
1583
  "generate_color_palette",
1584
1584
  {
1585
1585
  title: "Generate color palette",
1586
- description: "Generate a perceptually uniform OKLCH color palette from a brand color: 18-step scales for brand/surface/error/accents, semantic tokens (shadcn/ui compatible), light+dark modes. Returns a shareable standby.design/system URL and a compact summary. Use export_design_system for full CSS/Tailwind output.",
1586
+ description: "Generate a perceptually uniform OKLCH color palette from a brand color: 18-step scales for brand/surface/error/accents, semantic tokens (shadcn/ui compatible), light+dark modes. Returns a shareable standby.design/system URL and a compact summary. Always give that URL to the user \u2014 the link is the deliverable; it opens the live system in the browser. Use export_design_system for full CSS/Tailwind output.",
1587
1587
  inputSchema: {
1588
1588
  url: URL_PARAM,
1589
1589
  brandHex: z.string().optional().describe('Brand color as 6-digit hex, e.g. "#335A7F". The palette midpoint is derived from this.'),
@@ -1673,7 +1673,7 @@ ${colorSummary(state, palette)}`);
1673
1673
  "generate_type_scale",
1674
1674
  {
1675
1675
  title: "Generate type scale",
1676
- description: "Generate a fluid typographic scale (CSS clamp() between 375px and 1920px viewports) with 11 levels (Display, H1\u2013H6, Body L/M/S, Caption), Fontshare fonts, line heights and letter spacing. Returns a shareable standby.design/system URL and a summary table. Use list_fonts to discover font slugs.",
1676
+ description: "Generate a fluid typographic scale (CSS clamp() between 375px and 1920px viewports) with 11 levels (Display, H1\u2013H6, Body L/M/S, Caption), Fontshare fonts, line heights and letter spacing. Returns a shareable standby.design/system URL and a summary table. Always give that URL to the user \u2014 the link is the deliverable. Use list_fonts to discover font slugs.",
1677
1677
  inputSchema: {
1678
1678
  url: URL_PARAM,
1679
1679
  scaleMode: z.enum(["custom", "traditional"]).optional().describe('"custom": compound ratio scale (default). "traditional": classical Renaissance point sizes per level.'),
@@ -1745,7 +1745,7 @@ ${typeSummary(state, scale)}`);
1745
1745
  "generate_shape_tokens",
1746
1746
  {
1747
1747
  title: "Generate shape tokens",
1748
- description: 'Generate shape tokens \u2014 radii, shadows, borders, focus rings \u2014 in one of four visual styles: "paper" (classic surfaces with layered shadows), "glass" (liquid glass), "neomorph" (soft neumorphism), "neobrutalism" (hard offset shadows). Returns a shareable standby.design/system URL and a summary.',
1748
+ description: 'Generate shape tokens \u2014 radii, shadows, borders, focus rings \u2014 in one of four visual styles: "paper" (classic surfaces with layered shadows), "glass" (liquid glass), "neomorph" (soft neumorphism), "neobrutalism" (hard offset shadows). Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.',
1749
1749
  inputSchema: {
1750
1750
  url: URL_PARAM,
1751
1751
  style: z.enum(["paper", "glass", "neomorph", "neobrutalism"]).optional().describe('Top-level visual style (default "paper").'),
@@ -1820,7 +1820,7 @@ ${shapeSummary(state)}`);
1820
1820
  "generate_icon_tokens",
1821
1821
  {
1822
1822
  title: "Generate icon tokens",
1823
- description: `Pick an icon set and generate icon sizing tokens (xs\u20132xl + stroke width). Either select a specific set or state style preferences and get a recommendation. Available sets: ${SET_IDS.join(", ")}. Returns a shareable standby.design/system URL and a summary.`,
1823
+ description: `Pick an icon set and generate icon sizing tokens (xs\u20132xl + stroke width). Either select a specific set or state style preferences and get a recommendation. Available sets: ${SET_IDS.join(", ")}. Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.`,
1824
1824
  inputSchema: {
1825
1825
  url: URL_PARAM,
1826
1826
  set: z.string().optional().describe(`Icon set variant id to select explicitly, e.g. "lucide-outlined". One of: ${SET_IDS.join(", ")}. Pass "auto" to clear the selection and use the recommendation instead.`),
@@ -1861,7 +1861,7 @@ ${symbolSummary(state)}`);
1861
1861
  "generate_space_tokens",
1862
1862
  {
1863
1863
  title: "Generate spacing & layout tokens",
1864
- description: "Generate spacing tokens (3xs\u20133xl), breakpoints, container widths, prose measure, and aspect ratios. Returns a shareable standby.design/system URL and a summary.",
1864
+ description: "Generate spacing tokens (3xs\u20133xl), breakpoints, container widths, prose measure, and aspect ratios. Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.",
1865
1865
  inputSchema: {
1866
1866
  url: URL_PARAM,
1867
1867
  mode: z.enum(["harmonic", "geometric"]).optional().describe('"harmonic": multiples of the base (default). "geometric": compound ratio steps.'),
@@ -2135,7 +2135,7 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2135
2135
  primaryDark,
2136
2136
  primaryFgDark,
2137
2137
  ...brandContrastWarnDark,
2138
- ["primary-subtle", "brand", 800],
2138
+ ["primary-subtle", "brand", 850],
2139
2139
  ["primary-subtle-foreground", "brand", 50],
2140
2140
  [null, null, "Secondary \u2014 softened brand"],
2141
2141
  ["secondary", "brand", 800],
@@ -2144,26 +2144,26 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2144
2144
  ["muted", "surface", 850],
2145
2145
  ["muted-foreground", "surface", 300],
2146
2146
  [null, null, "Accent"],
2147
- ["accent", "brand", 800],
2148
- ["accent-foreground", "brand", fgStep(brandMap[800]?.hex, brandMap, 50, 950, fgMode)],
2147
+ ["accent", "brand", 850],
2148
+ ["accent-foreground", "brand", fgStep(brandMap[850]?.hex, brandMap, 50, 950, fgMode)],
2149
2149
  [null, null, "Destructive"],
2150
2150
  destDark,
2151
2151
  destFgDark,
2152
- ["destructive-subtle", "error", 800],
2152
+ ["destructive-subtle", "error", 850],
2153
2153
  ["destructive-subtle-foreground", "error", 50],
2154
2154
  ["destructive-border", "error-surface", 700],
2155
2155
  [null, null, "Border / Input / Ring"],
2156
2156
  ["border", "surface", 600],
2157
2157
  ["border-muted", "surface", 700],
2158
- ["input", "surface", 700],
2158
+ ["input", "surface", 600],
2159
2159
  ["ring", "surface", 500],
2160
2160
  [null, null, "Sidebar"],
2161
- ["sidebar", "surface", 875],
2161
+ ["sidebar", "surface", 825],
2162
2162
  ["sidebar-foreground", "surface", 25],
2163
2163
  sbPrimDark,
2164
2164
  sbPrimFgDark,
2165
- ["sidebar-accent", "brand", 800],
2166
- ["sidebar-accent-foreground", "brand", fgStep(brandMap[800]?.hex, brandMap, 50, 950, fgMode)],
2165
+ ["sidebar-accent", "brand", 850],
2166
+ ["sidebar-accent-foreground", "brand", fgStep(brandMap[850]?.hex, brandMap, 50, 950, fgMode)],
2167
2167
  ["sidebar-border", "surface", 600],
2168
2168
  ["sidebar-ring", "surface", 500]
2169
2169
  ]);
@@ -2196,12 +2196,12 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2196
2196
  [`${n}-popover-foreground`, `${n}-surface`, 975],
2197
2197
  [null, null, "Secondary"],
2198
2198
  [`${n}-secondary`, n, 200],
2199
- [`${n}-secondary-foreground`, n, 900],
2199
+ [`${n}-secondary-foreground`, n, fgStep(aMap[200]?.hex, aMap, 100, 900, fgMode)],
2200
2200
  [null, null, "Muted / Subtle / Accent"],
2201
2201
  [`${n}-muted`, `${n}-surface`, 75],
2202
2202
  [`${n}-muted-foreground`, `${n}-surface`, 700],
2203
2203
  [`${n}-accent`, n, 100],
2204
- [`${n}-accent-foreground`, n, 950],
2204
+ [`${n}-accent-foreground`, n, fgStep(aMap[100]?.hex, aMap, 50, 950, fgMode)],
2205
2205
  [`${n}-subtle`, n, 100],
2206
2206
  [`${n}-subtle-foreground`, n, 950],
2207
2207
  [null, null, "Border / Input / Ring"],
@@ -2223,18 +2223,18 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2223
2223
  [`${n}-popover-foreground`, `${n}-surface`, 25],
2224
2224
  [null, null, "Secondary"],
2225
2225
  [`${n}-secondary`, n, 800],
2226
- [`${n}-secondary-foreground`, n, 100],
2226
+ [`${n}-secondary-foreground`, n, fgStep(aMap[800]?.hex, aMap, 100, 900, fgMode)],
2227
2227
  [null, null, "Muted / Subtle / Accent"],
2228
2228
  [`${n}-muted`, `${n}-surface`, 850],
2229
2229
  [`${n}-muted-foreground`, `${n}-surface`, 300],
2230
- [`${n}-accent`, n, 800],
2231
- [`${n}-accent-foreground`, n, 50],
2232
- [`${n}-subtle`, n, 800],
2230
+ [`${n}-accent`, n, 850],
2231
+ [`${n}-accent-foreground`, n, fgStep(aMap[850]?.hex, aMap, 50, 950, fgMode)],
2232
+ [`${n}-subtle`, n, 850],
2233
2233
  [`${n}-subtle-foreground`, n, 50],
2234
2234
  [null, null, "Border / Input / Ring"],
2235
- [`${n}-border`, `${n}-surface`, 700],
2235
+ [`${n}-border`, `${n}-surface`, 600],
2236
2236
  [`${n}-border-muted`, `${n}-surface`, 700],
2237
- [`${n}-input`, `${n}-surface`, 700],
2237
+ [`${n}-input`, `${n}-surface`, 600],
2238
2238
  [`${n}-ring`, `${n}-surface`, 500]
2239
2239
  ]);
2240
2240
  accentBlocks += `
@@ -2260,7 +2260,7 @@ function generateLlmBriefing(brandHex, effectiveBgHex, effectiveErrorHex, accent
2260
2260
  )
2261
2261
  ].join("\n");
2262
2262
  const pinnedNote = brandPin || errorPin || accentPalettes.some((a) => a.pin) ? `
2263
- > **Pinned** means the exact input hex is used for primary/destructive button colors instead of the generated palette step (brand-600/400 or error-600/400).
2263
+ > **Pinned** means the exact input hex is used instead of the generated palette step \u2014 for the primary (\`brand-600/400\`), destructive (\`error-600/400\`), or accent (\`{accent}-600/400\`) role of that color.
2264
2264
  ` : "";
2265
2265
  let pinnedContrastWarning = "";
2266
2266
  if (brandPin) {
@@ -2287,26 +2287,27 @@ ${pinnedNote}${pinnedContrastWarning}
2287
2287
  | \`--card\` | surface-25 | surface-825 | Card backgrounds |
2288
2288
  | \`--popover\` | surface-25 | surface-800 | Popover/dropdown |
2289
2289
  | \`--primary\` | brand-600 | brand-400 | Primary buttons, links |
2290
- | \`--primary-subtle\` | brand-100 | brand-800 | Tinted brand fills: callouts, selected items |
2290
+ | \`--primary-subtle\` | brand-100 | brand-850 | Tinted brand fills: callouts, selected items |
2291
2291
  | \`--secondary\` | brand-200 | brand-800 | Secondary buttons |
2292
2292
  | \`--muted\` | surface-75 | surface-850 | Muted backgrounds |
2293
- | \`--accent\` | brand-100 | brand-800 | Interaction highlights (hover, selected) |
2293
+ | \`--accent\` | brand-100 | brand-850 | Interaction highlights (hover, selected) |
2294
2294
  | \`--destructive\` | error-600 | error-400 | Error/delete actions |
2295
- | \`--destructive-subtle\` | error-100 | error-800 | Inline errors, alert backgrounds |
2295
+ | \`--destructive-subtle\` | error-100 | error-850 | Inline errors, alert backgrounds |
2296
2296
  | \`--destructive-border\` | error-surface-300 | error-surface-700 | Error borders |
2297
2297
  | \`--border\` | surface-300 | surface-600 | Default borders |
2298
2298
  | \`--border-muted\` | surface-200 | surface-700 | Subtle separators |
2299
- | \`--input\` | surface-300 | surface-700 | Form-control borders (input, select, textarea) |
2299
+ | \`--input\` | surface-300 | surface-600 | Form-control borders (input, select, textarea) |
2300
2300
  | \`--ring\` | surface-400 | surface-500 | Focus rings |
2301
2301
 
2302
2302
  ### Sidebar
2303
2303
 
2304
2304
  | Token | Light | Dark |
2305
2305
  |-------|-------|------|
2306
- | \`--sidebar\` | surface-25 | surface-875 |
2306
+ | \`--sidebar\` | surface-25 | surface-825 |
2307
2307
  | \`--sidebar-primary\` | brand-600 | brand-400 |
2308
- | \`--sidebar-accent\` | brand-100 | brand-800 |
2308
+ | \`--sidebar-accent\` | brand-100 | brand-850 |
2309
2309
  | \`--sidebar-border\` | surface-300 | surface-600 |
2310
+ | \`--sidebar-ring\` | surface-400 | surface-500 |
2310
2311
 
2311
2312
  Every background token has a matching \`*-foreground\` counterpart. Always pair them.
2312
2313
  ${accentPalettes.length > 0 ? `
@@ -2318,11 +2319,10 @@ ${accentPalettes.map((a) => `- **${a.name}** (\`--${a.cssName}\`): \`-foreground
2318
2319
  ## How to Use
2319
2320
 
2320
2321
  1. **Use semantic tokens** (\`--primary\`, \`--background\`, etc.) in component code \u2014 never reference primitive step numbers directly.
2321
- 2. **Tailwind**: All tokens are available as Tailwind utilities (\`bg-primary\`, \`text-foreground\`, \`border-border\`, etc.).
2322
+ 2. **Tailwind v4**: The export ships plain CSS custom properties. To get utilities like \`bg-primary\` or \`text-foreground\`, map the variables once via \`@theme inline { --color-primary: var(--primary); \u2026 }\` \u2014 see tailwindcss.com/docs/theme.
2322
2323
  3. **Dark mode**: Add \`.dark\` to \`<html>\` or a container. All semantic tokens remap automatically.
2323
2324
  4. **Borders**: Default to \`--border-muted\` for subtle separation (dividers, table rows). Use \`--border\` for visible borders (cards, panels). Form controls (\`input\`, \`select\`, \`textarea\`) always use \`--input\` \u2014 never \`--border\`.
2324
2325
  5. **Shadows and radii**: see standby.design/shape for hue-matched shadow tokens and border-radius scales.
2325
- 6. **Border-radius**: Base \`--radius: 0.625rem\`. Derived sizes: \`--radius-sm\` (0.6\xD7) through \`--radius-4xl\` (2.6\xD7).
2326
2326
 
2327
2327
  ## Primitive Scale Reference
2328
2328
 
@@ -2332,10 +2332,13 @@ Each color uses an 18-step scale: **25, 50, 75, 100, 200\u2013800, 825, 850, 875
2332
2332
  - **200\u2013800** \u2014 core palette (buttons, text, accents)
2333
2333
  - **825\u2013875** \u2014 dark-mode surfaces
2334
2334
  - **900\u2013975** \u2014 high-contrast surfaces
2335
+ - **0 / 1000** \u2014 neutral only: pure white and pure black endpoints (\`--color-neutral-0\`, \`--color-neutral-1000\`)
2335
2336
 
2336
- Two variants per color:
2337
+ Chroma variants:
2337
2338
  - \`--color-{name}-{step}\` \u2014 full chroma (interactive elements)
2338
- - \`--color-{name}-surface-{step}\` \u2014 ${pct}% chroma (backgrounds, containers)
2339
+ - \`--color-surface-{step}\` \u2014 the brand's ${pct}%-chroma counterpart (backgrounds, containers)
2340
+ - \`--color-error-surface-{step}\` and \`--color-{accent}-surface-{step}\` \u2014 reduced-chroma twins for error and extra accents
2341
+ - \`--color-neutral-{step}\` \u2014 0% chroma, no surface twin
2339
2342
 
2340
2343
  ## Settings
2341
2344
 
@@ -3182,6 +3185,17 @@ Prose reading column: ${proseMaxCh}ch.
3182
3185
  return md;
3183
3186
  }
3184
3187
 
3188
+ // ../core/src/share-link.ts
3189
+ function llmShareHeader(url) {
3190
+ return [
3191
+ `> **Live design system:** ${url}`,
3192
+ `> The complete configuration is encoded in this URL \u2014 open it to view the`,
3193
+ `> system in the browser, fine-tune any value, or re-export. When you build`,
3194
+ `> on, document, or hand off this design system, always pass this link along:`,
3195
+ `> the link is the canonical reference, not a regenerated approximation.`
3196
+ ].join("\n") + "\n\n";
3197
+ }
3198
+
3185
3199
  // src/tools-system.ts
3186
3200
  var ALL_SECTIONS = ["color", "type", "space", "shape", "symbol"];
3187
3201
  function getScaleLabel(typeState) {
@@ -3242,7 +3256,7 @@ function registerSystemTools(server) {
3242
3256
  "get_design_system",
3243
3257
  {
3244
3258
  title: "Inspect design system",
3245
- description: "Decode a standby.design URL (or raw hash) and return an overview of the full design system: color palette, type scale, spacing & layout, shape tokens, and icons \u2014 plus per-tool edit links.",
3259
+ description: "Decode a standby.design URL (or raw hash) and return an overview of the full design system: color palette, type scale, spacing & layout, shape tokens, and icons \u2014 plus per-tool edit links. Always give the standby.design/system URL to the user \u2014 the link is the deliverable.",
3246
3260
  inputSchema: {
3247
3261
  url: z2.string().describe("A standby.design URL or raw unified hash (e.g. from a previous generate_* call or copied from the browser).")
3248
3262
  },
@@ -3285,7 +3299,7 @@ function registerSystemTools(server) {
3285
3299
  "export_design_system",
3286
3300
  {
3287
3301
  title: "Export design system code",
3288
- description: 'Generate the full token code for a design system URL in one format: "css" (CSS custom properties incl. semantic shadcn/ui-compatible tokens), "tailwind" (Tailwind v4 @theme), "design-tokens" (W3C DTCG JSON \u2014 typography & spacing), "llm-briefing" (Markdown brief for AI code generation), or "font-embed" (Fontshare <link> snippet). Optionally restrict to specific sections.',
3302
+ description: 'Generate the full token code for a design system URL in one format: "css" (CSS custom properties incl. semantic shadcn/ui-compatible tokens), "tailwind" (Tailwind v4 @theme), "design-tokens" (W3C DTCG JSON \u2014 typography & spacing), "llm-briefing" (Markdown brief for AI code generation), or "font-embed" (Fontshare <link> snippet). Optionally restrict to specific sections. Always give the returned standby.design/system URL to the user alongside the code \u2014 the link is the deliverable.',
3289
3303
  inputSchema: {
3290
3304
  url: z2.string().describe("A standby.design URL or raw unified hash."),
3291
3305
  format: z2.enum(["css", "tailwind", "design-tokens", "llm-briefing", "font-embed"]).describe("Output format."),
@@ -3407,7 +3421,7 @@ function registerSystemTools(server) {
3407
3421
  if (has("space")) parts.push(generateSpaceLlmBriefing(spaceOpts));
3408
3422
  if (has("shape")) parts.push(generateLlmBriefing3(optsFromState(shapeState, palette.effectiveBgHex)));
3409
3423
  if (has("symbol") && symbolState) parts.push(generateSymbolLlmBriefing(symbolState));
3410
- output = parts.join("\n---\n\n") || "<!-- No sections selected -->";
3424
+ output = parts.length ? llmShareHeader(systemUrl(segs)) + parts.join("\n---\n\n") : "<!-- No sections selected -->";
3411
3425
  break;
3412
3426
  }
3413
3427
  case "font-embed":
@@ -3443,7 +3457,7 @@ ${output}`);
3443
3457
  }
3444
3458
 
3445
3459
  // src/server.ts
3446
- var SERVER_VERSION = "0.1.1";
3460
+ var SERVER_VERSION = "0.1.4";
3447
3461
  function createServer() {
3448
3462
  const server = new McpServer(
3449
3463
  { name: "standby-design", version: SERVER_VERSION },
package/dist/index.js CHANGED
@@ -1582,7 +1582,7 @@ function registerGenerateTools(server2) {
1582
1582
  "generate_color_palette",
1583
1583
  {
1584
1584
  title: "Generate color palette",
1585
- description: "Generate a perceptually uniform OKLCH color palette from a brand color: 18-step scales for brand/surface/error/accents, semantic tokens (shadcn/ui compatible), light+dark modes. Returns a shareable standby.design/system URL and a compact summary. Use export_design_system for full CSS/Tailwind output.",
1585
+ description: "Generate a perceptually uniform OKLCH color palette from a brand color: 18-step scales for brand/surface/error/accents, semantic tokens (shadcn/ui compatible), light+dark modes. Returns a shareable standby.design/system URL and a compact summary. Always give that URL to the user \u2014 the link is the deliverable; it opens the live system in the browser. Use export_design_system for full CSS/Tailwind output.",
1586
1586
  inputSchema: {
1587
1587
  url: URL_PARAM,
1588
1588
  brandHex: z.string().optional().describe('Brand color as 6-digit hex, e.g. "#335A7F". The palette midpoint is derived from this.'),
@@ -1672,7 +1672,7 @@ ${colorSummary(state, palette)}`);
1672
1672
  "generate_type_scale",
1673
1673
  {
1674
1674
  title: "Generate type scale",
1675
- description: "Generate a fluid typographic scale (CSS clamp() between 375px and 1920px viewports) with 11 levels (Display, H1\u2013H6, Body L/M/S, Caption), Fontshare fonts, line heights and letter spacing. Returns a shareable standby.design/system URL and a summary table. Use list_fonts to discover font slugs.",
1675
+ description: "Generate a fluid typographic scale (CSS clamp() between 375px and 1920px viewports) with 11 levels (Display, H1\u2013H6, Body L/M/S, Caption), Fontshare fonts, line heights and letter spacing. Returns a shareable standby.design/system URL and a summary table. Always give that URL to the user \u2014 the link is the deliverable. Use list_fonts to discover font slugs.",
1676
1676
  inputSchema: {
1677
1677
  url: URL_PARAM,
1678
1678
  scaleMode: z.enum(["custom", "traditional"]).optional().describe('"custom": compound ratio scale (default). "traditional": classical Renaissance point sizes per level.'),
@@ -1744,7 +1744,7 @@ ${typeSummary(state, scale)}`);
1744
1744
  "generate_shape_tokens",
1745
1745
  {
1746
1746
  title: "Generate shape tokens",
1747
- description: 'Generate shape tokens \u2014 radii, shadows, borders, focus rings \u2014 in one of four visual styles: "paper" (classic surfaces with layered shadows), "glass" (liquid glass), "neomorph" (soft neumorphism), "neobrutalism" (hard offset shadows). Returns a shareable standby.design/system URL and a summary.',
1747
+ description: 'Generate shape tokens \u2014 radii, shadows, borders, focus rings \u2014 in one of four visual styles: "paper" (classic surfaces with layered shadows), "glass" (liquid glass), "neomorph" (soft neumorphism), "neobrutalism" (hard offset shadows). Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.',
1748
1748
  inputSchema: {
1749
1749
  url: URL_PARAM,
1750
1750
  style: z.enum(["paper", "glass", "neomorph", "neobrutalism"]).optional().describe('Top-level visual style (default "paper").'),
@@ -1819,7 +1819,7 @@ ${shapeSummary(state)}`);
1819
1819
  "generate_icon_tokens",
1820
1820
  {
1821
1821
  title: "Generate icon tokens",
1822
- description: `Pick an icon set and generate icon sizing tokens (xs\u20132xl + stroke width). Either select a specific set or state style preferences and get a recommendation. Available sets: ${SET_IDS.join(", ")}. Returns a shareable standby.design/system URL and a summary.`,
1822
+ description: `Pick an icon set and generate icon sizing tokens (xs\u20132xl + stroke width). Either select a specific set or state style preferences and get a recommendation. Available sets: ${SET_IDS.join(", ")}. Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.`,
1823
1823
  inputSchema: {
1824
1824
  url: URL_PARAM,
1825
1825
  set: z.string().optional().describe(`Icon set variant id to select explicitly, e.g. "lucide-outlined". One of: ${SET_IDS.join(", ")}. Pass "auto" to clear the selection and use the recommendation instead.`),
@@ -1860,7 +1860,7 @@ ${symbolSummary(state)}`);
1860
1860
  "generate_space_tokens",
1861
1861
  {
1862
1862
  title: "Generate spacing & layout tokens",
1863
- description: "Generate spacing tokens (3xs\u20133xl), breakpoints, container widths, prose measure, and aspect ratios. Returns a shareable standby.design/system URL and a summary.",
1863
+ description: "Generate spacing tokens (3xs\u20133xl), breakpoints, container widths, prose measure, and aspect ratios. Returns a shareable standby.design/system URL and a summary. Always give that URL to the user \u2014 the link is the deliverable.",
1864
1864
  inputSchema: {
1865
1865
  url: URL_PARAM,
1866
1866
  mode: z.enum(["harmonic", "geometric"]).optional().describe('"harmonic": multiples of the base (default). "geometric": compound ratio steps.'),
@@ -2134,7 +2134,7 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2134
2134
  primaryDark,
2135
2135
  primaryFgDark,
2136
2136
  ...brandContrastWarnDark,
2137
- ["primary-subtle", "brand", 800],
2137
+ ["primary-subtle", "brand", 850],
2138
2138
  ["primary-subtle-foreground", "brand", 50],
2139
2139
  [null, null, "Secondary \u2014 softened brand"],
2140
2140
  ["secondary", "brand", 800],
@@ -2143,26 +2143,26 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2143
2143
  ["muted", "surface", 850],
2144
2144
  ["muted-foreground", "surface", 300],
2145
2145
  [null, null, "Accent"],
2146
- ["accent", "brand", 800],
2147
- ["accent-foreground", "brand", fgStep(brandMap[800]?.hex, brandMap, 50, 950, fgMode)],
2146
+ ["accent", "brand", 850],
2147
+ ["accent-foreground", "brand", fgStep(brandMap[850]?.hex, brandMap, 50, 950, fgMode)],
2148
2148
  [null, null, "Destructive"],
2149
2149
  destDark,
2150
2150
  destFgDark,
2151
- ["destructive-subtle", "error", 800],
2151
+ ["destructive-subtle", "error", 850],
2152
2152
  ["destructive-subtle-foreground", "error", 50],
2153
2153
  ["destructive-border", "error-surface", 700],
2154
2154
  [null, null, "Border / Input / Ring"],
2155
2155
  ["border", "surface", 600],
2156
2156
  ["border-muted", "surface", 700],
2157
- ["input", "surface", 700],
2157
+ ["input", "surface", 600],
2158
2158
  ["ring", "surface", 500],
2159
2159
  [null, null, "Sidebar"],
2160
- ["sidebar", "surface", 875],
2160
+ ["sidebar", "surface", 825],
2161
2161
  ["sidebar-foreground", "surface", 25],
2162
2162
  sbPrimDark,
2163
2163
  sbPrimFgDark,
2164
- ["sidebar-accent", "brand", 800],
2165
- ["sidebar-accent-foreground", "brand", fgStep(brandMap[800]?.hex, brandMap, 50, 950, fgMode)],
2164
+ ["sidebar-accent", "brand", 850],
2165
+ ["sidebar-accent-foreground", "brand", fgStep(brandMap[850]?.hex, brandMap, 50, 950, fgMode)],
2166
2166
  ["sidebar-border", "surface", 600],
2167
2167
  ["sidebar-ring", "surface", 500]
2168
2168
  ]);
@@ -2195,12 +2195,12 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2195
2195
  [`${n}-popover-foreground`, `${n}-surface`, 975],
2196
2196
  [null, null, "Secondary"],
2197
2197
  [`${n}-secondary`, n, 200],
2198
- [`${n}-secondary-foreground`, n, 900],
2198
+ [`${n}-secondary-foreground`, n, fgStep(aMap[200]?.hex, aMap, 100, 900, fgMode)],
2199
2199
  [null, null, "Muted / Subtle / Accent"],
2200
2200
  [`${n}-muted`, `${n}-surface`, 75],
2201
2201
  [`${n}-muted-foreground`, `${n}-surface`, 700],
2202
2202
  [`${n}-accent`, n, 100],
2203
- [`${n}-accent-foreground`, n, 950],
2203
+ [`${n}-accent-foreground`, n, fgStep(aMap[100]?.hex, aMap, 50, 950, fgMode)],
2204
2204
  [`${n}-subtle`, n, 100],
2205
2205
  [`${n}-subtle-foreground`, n, 950],
2206
2206
  [null, null, "Border / Input / Ring"],
@@ -2222,18 +2222,18 @@ function generateSemantic(accentPalettes, brandPal, errPal, errSurfPal, surfaceP
2222
2222
  [`${n}-popover-foreground`, `${n}-surface`, 25],
2223
2223
  [null, null, "Secondary"],
2224
2224
  [`${n}-secondary`, n, 800],
2225
- [`${n}-secondary-foreground`, n, 100],
2225
+ [`${n}-secondary-foreground`, n, fgStep(aMap[800]?.hex, aMap, 100, 900, fgMode)],
2226
2226
  [null, null, "Muted / Subtle / Accent"],
2227
2227
  [`${n}-muted`, `${n}-surface`, 850],
2228
2228
  [`${n}-muted-foreground`, `${n}-surface`, 300],
2229
- [`${n}-accent`, n, 800],
2230
- [`${n}-accent-foreground`, n, 50],
2231
- [`${n}-subtle`, n, 800],
2229
+ [`${n}-accent`, n, 850],
2230
+ [`${n}-accent-foreground`, n, fgStep(aMap[850]?.hex, aMap, 50, 950, fgMode)],
2231
+ [`${n}-subtle`, n, 850],
2232
2232
  [`${n}-subtle-foreground`, n, 50],
2233
2233
  [null, null, "Border / Input / Ring"],
2234
- [`${n}-border`, `${n}-surface`, 700],
2234
+ [`${n}-border`, `${n}-surface`, 600],
2235
2235
  [`${n}-border-muted`, `${n}-surface`, 700],
2236
- [`${n}-input`, `${n}-surface`, 700],
2236
+ [`${n}-input`, `${n}-surface`, 600],
2237
2237
  [`${n}-ring`, `${n}-surface`, 500]
2238
2238
  ]);
2239
2239
  accentBlocks += `
@@ -2259,7 +2259,7 @@ function generateLlmBriefing(brandHex, effectiveBgHex, effectiveErrorHex, accent
2259
2259
  )
2260
2260
  ].join("\n");
2261
2261
  const pinnedNote = brandPin || errorPin || accentPalettes.some((a) => a.pin) ? `
2262
- > **Pinned** means the exact input hex is used for primary/destructive button colors instead of the generated palette step (brand-600/400 or error-600/400).
2262
+ > **Pinned** means the exact input hex is used instead of the generated palette step \u2014 for the primary (\`brand-600/400\`), destructive (\`error-600/400\`), or accent (\`{accent}-600/400\`) role of that color.
2263
2263
  ` : "";
2264
2264
  let pinnedContrastWarning = "";
2265
2265
  if (brandPin) {
@@ -2286,26 +2286,27 @@ ${pinnedNote}${pinnedContrastWarning}
2286
2286
  | \`--card\` | surface-25 | surface-825 | Card backgrounds |
2287
2287
  | \`--popover\` | surface-25 | surface-800 | Popover/dropdown |
2288
2288
  | \`--primary\` | brand-600 | brand-400 | Primary buttons, links |
2289
- | \`--primary-subtle\` | brand-100 | brand-800 | Tinted brand fills: callouts, selected items |
2289
+ | \`--primary-subtle\` | brand-100 | brand-850 | Tinted brand fills: callouts, selected items |
2290
2290
  | \`--secondary\` | brand-200 | brand-800 | Secondary buttons |
2291
2291
  | \`--muted\` | surface-75 | surface-850 | Muted backgrounds |
2292
- | \`--accent\` | brand-100 | brand-800 | Interaction highlights (hover, selected) |
2292
+ | \`--accent\` | brand-100 | brand-850 | Interaction highlights (hover, selected) |
2293
2293
  | \`--destructive\` | error-600 | error-400 | Error/delete actions |
2294
- | \`--destructive-subtle\` | error-100 | error-800 | Inline errors, alert backgrounds |
2294
+ | \`--destructive-subtle\` | error-100 | error-850 | Inline errors, alert backgrounds |
2295
2295
  | \`--destructive-border\` | error-surface-300 | error-surface-700 | Error borders |
2296
2296
  | \`--border\` | surface-300 | surface-600 | Default borders |
2297
2297
  | \`--border-muted\` | surface-200 | surface-700 | Subtle separators |
2298
- | \`--input\` | surface-300 | surface-700 | Form-control borders (input, select, textarea) |
2298
+ | \`--input\` | surface-300 | surface-600 | Form-control borders (input, select, textarea) |
2299
2299
  | \`--ring\` | surface-400 | surface-500 | Focus rings |
2300
2300
 
2301
2301
  ### Sidebar
2302
2302
 
2303
2303
  | Token | Light | Dark |
2304
2304
  |-------|-------|------|
2305
- | \`--sidebar\` | surface-25 | surface-875 |
2305
+ | \`--sidebar\` | surface-25 | surface-825 |
2306
2306
  | \`--sidebar-primary\` | brand-600 | brand-400 |
2307
- | \`--sidebar-accent\` | brand-100 | brand-800 |
2307
+ | \`--sidebar-accent\` | brand-100 | brand-850 |
2308
2308
  | \`--sidebar-border\` | surface-300 | surface-600 |
2309
+ | \`--sidebar-ring\` | surface-400 | surface-500 |
2309
2310
 
2310
2311
  Every background token has a matching \`*-foreground\` counterpart. Always pair them.
2311
2312
  ${accentPalettes.length > 0 ? `
@@ -2317,11 +2318,10 @@ ${accentPalettes.map((a) => `- **${a.name}** (\`--${a.cssName}\`): \`-foreground
2317
2318
  ## How to Use
2318
2319
 
2319
2320
  1. **Use semantic tokens** (\`--primary\`, \`--background\`, etc.) in component code \u2014 never reference primitive step numbers directly.
2320
- 2. **Tailwind**: All tokens are available as Tailwind utilities (\`bg-primary\`, \`text-foreground\`, \`border-border\`, etc.).
2321
+ 2. **Tailwind v4**: The export ships plain CSS custom properties. To get utilities like \`bg-primary\` or \`text-foreground\`, map the variables once via \`@theme inline { --color-primary: var(--primary); \u2026 }\` \u2014 see tailwindcss.com/docs/theme.
2321
2322
  3. **Dark mode**: Add \`.dark\` to \`<html>\` or a container. All semantic tokens remap automatically.
2322
2323
  4. **Borders**: Default to \`--border-muted\` for subtle separation (dividers, table rows). Use \`--border\` for visible borders (cards, panels). Form controls (\`input\`, \`select\`, \`textarea\`) always use \`--input\` \u2014 never \`--border\`.
2323
2324
  5. **Shadows and radii**: see standby.design/shape for hue-matched shadow tokens and border-radius scales.
2324
- 6. **Border-radius**: Base \`--radius: 0.625rem\`. Derived sizes: \`--radius-sm\` (0.6\xD7) through \`--radius-4xl\` (2.6\xD7).
2325
2325
 
2326
2326
  ## Primitive Scale Reference
2327
2327
 
@@ -2331,10 +2331,13 @@ Each color uses an 18-step scale: **25, 50, 75, 100, 200\u2013800, 825, 850, 875
2331
2331
  - **200\u2013800** \u2014 core palette (buttons, text, accents)
2332
2332
  - **825\u2013875** \u2014 dark-mode surfaces
2333
2333
  - **900\u2013975** \u2014 high-contrast surfaces
2334
+ - **0 / 1000** \u2014 neutral only: pure white and pure black endpoints (\`--color-neutral-0\`, \`--color-neutral-1000\`)
2334
2335
 
2335
- Two variants per color:
2336
+ Chroma variants:
2336
2337
  - \`--color-{name}-{step}\` \u2014 full chroma (interactive elements)
2337
- - \`--color-{name}-surface-{step}\` \u2014 ${pct}% chroma (backgrounds, containers)
2338
+ - \`--color-surface-{step}\` \u2014 the brand's ${pct}%-chroma counterpart (backgrounds, containers)
2339
+ - \`--color-error-surface-{step}\` and \`--color-{accent}-surface-{step}\` \u2014 reduced-chroma twins for error and extra accents
2340
+ - \`--color-neutral-{step}\` \u2014 0% chroma, no surface twin
2338
2341
 
2339
2342
  ## Settings
2340
2343
 
@@ -3181,6 +3184,17 @@ Prose reading column: ${proseMaxCh}ch.
3181
3184
  return md;
3182
3185
  }
3183
3186
 
3187
+ // ../core/src/share-link.ts
3188
+ function llmShareHeader(url) {
3189
+ return [
3190
+ `> **Live design system:** ${url}`,
3191
+ `> The complete configuration is encoded in this URL \u2014 open it to view the`,
3192
+ `> system in the browser, fine-tune any value, or re-export. When you build`,
3193
+ `> on, document, or hand off this design system, always pass this link along:`,
3194
+ `> the link is the canonical reference, not a regenerated approximation.`
3195
+ ].join("\n") + "\n\n";
3196
+ }
3197
+
3184
3198
  // src/tools-system.ts
3185
3199
  var ALL_SECTIONS = ["color", "type", "space", "shape", "symbol"];
3186
3200
  function getScaleLabel(typeState) {
@@ -3241,7 +3255,7 @@ function registerSystemTools(server2) {
3241
3255
  "get_design_system",
3242
3256
  {
3243
3257
  title: "Inspect design system",
3244
- description: "Decode a standby.design URL (or raw hash) and return an overview of the full design system: color palette, type scale, spacing & layout, shape tokens, and icons \u2014 plus per-tool edit links.",
3258
+ description: "Decode a standby.design URL (or raw hash) and return an overview of the full design system: color palette, type scale, spacing & layout, shape tokens, and icons \u2014 plus per-tool edit links. Always give the standby.design/system URL to the user \u2014 the link is the deliverable.",
3245
3259
  inputSchema: {
3246
3260
  url: z2.string().describe("A standby.design URL or raw unified hash (e.g. from a previous generate_* call or copied from the browser).")
3247
3261
  },
@@ -3284,7 +3298,7 @@ function registerSystemTools(server2) {
3284
3298
  "export_design_system",
3285
3299
  {
3286
3300
  title: "Export design system code",
3287
- description: 'Generate the full token code for a design system URL in one format: "css" (CSS custom properties incl. semantic shadcn/ui-compatible tokens), "tailwind" (Tailwind v4 @theme), "design-tokens" (W3C DTCG JSON \u2014 typography & spacing), "llm-briefing" (Markdown brief for AI code generation), or "font-embed" (Fontshare <link> snippet). Optionally restrict to specific sections.',
3301
+ description: 'Generate the full token code for a design system URL in one format: "css" (CSS custom properties incl. semantic shadcn/ui-compatible tokens), "tailwind" (Tailwind v4 @theme), "design-tokens" (W3C DTCG JSON \u2014 typography & spacing), "llm-briefing" (Markdown brief for AI code generation), or "font-embed" (Fontshare <link> snippet). Optionally restrict to specific sections. Always give the returned standby.design/system URL to the user alongside the code \u2014 the link is the deliverable.',
3288
3302
  inputSchema: {
3289
3303
  url: z2.string().describe("A standby.design URL or raw unified hash."),
3290
3304
  format: z2.enum(["css", "tailwind", "design-tokens", "llm-briefing", "font-embed"]).describe("Output format."),
@@ -3406,7 +3420,7 @@ function registerSystemTools(server2) {
3406
3420
  if (has("space")) parts.push(generateSpaceLlmBriefing(spaceOpts));
3407
3421
  if (has("shape")) parts.push(generateLlmBriefing3(optsFromState(shapeState, palette.effectiveBgHex)));
3408
3422
  if (has("symbol") && symbolState) parts.push(generateSymbolLlmBriefing(symbolState));
3409
- output = parts.join("\n---\n\n") || "<!-- No sections selected -->";
3423
+ output = parts.length ? llmShareHeader(systemUrl(segs)) + parts.join("\n---\n\n") : "<!-- No sections selected -->";
3410
3424
  break;
3411
3425
  }
3412
3426
  case "font-embed":
@@ -3442,7 +3456,7 @@ ${output}`);
3442
3456
  }
3443
3457
 
3444
3458
  // src/server.ts
3445
- var SERVER_VERSION = "0.1.1";
3459
+ var SERVER_VERSION = "0.1.4";
3446
3460
  function createServer() {
3447
3461
  const server2 = new McpServer(
3448
3462
  { name: "standby-design", version: SERVER_VERSION },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "standby-design-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "mcpName": "io.github.KarstenKreh/standby-design-mcp",
5
5
  "description": "MCP server for standby.design — generate production-ready design systems (OKLCH color palettes, fluid type scales, spacing & layout, shape and icon tokens) and export them as CSS, Tailwind v4, or W3C design tokens. Every result links back to the standby.design web UI for visual fine-tuning.",
6
6
  "license": "MIT",