@shoplflow/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/README.md +595 -55
- package/dist/index.js +325 -9
- package/package.json +25 -4
package/README.md
CHANGED
|
@@ -1,92 +1,632 @@
|
|
|
1
1
|
# @shoplflow/mcp
|
|
2
2
|
|
|
3
3
|
Model Context Protocol (MCP) server that exposes the shoplflow design system to AI coding agents
|
|
4
|
-
(Claude Code, Cursor, …) so they generate UI against **real** tokens, components, and icons instead
|
|
4
|
+
(Claude Code, Cursor, Codex, …) so they generate UI against **real** tokens, components, and icons instead
|
|
5
5
|
of hallucinating them.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```tsx
|
|
8
|
+
// Without the MCP — plausible, but nothing here exists
|
|
9
|
+
<Button variant="primary" size="medium" color="#3B82F6" />
|
|
10
|
+
<Icon name="plus" />
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
// With the MCP — looked up from the shipped library
|
|
13
|
+
<Button styleVar="PRIMARY" sizeVar="M" />
|
|
14
|
+
<Icon iconSource={AddIcon} sizeVar="S" color="neutral500" />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> 내부 구조·설계 결정·확장 가이드는 [아키텍쳐.md](./아키텍쳐.md)를 참고하세요.
|
|
18
|
+
|
|
19
|
+
**Contents:** [Quick start](#quick-start) · [Verify](#verify-the-connection) · [Tools](#tool-reference) · [Resources](#resources) · [Working with an agent](#working-with-an-agent) · [What's served](#whats-served) · [Development](#local-development) · [Troubleshooting](#troubleshooting)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
The server runs over **stdio** and needs no auth, no network, and no config — the whole design-system
|
|
26
|
+
catalog is bundled into the published binary.
|
|
27
|
+
|
|
28
|
+
### Claude Code
|
|
29
|
+
|
|
30
|
+
Easiest path — install the plugin, which wires up this MCP **and** the [`@shoplflow/skills`](../skills) agent skills in one step:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
/plugin marketplace add shopl/shoplflow
|
|
34
|
+
/plugin install shoplflow@shoplflow-marketplace
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
MCP only:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
claude mcp add shoplflow -- npx -y @shoplflow/mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or commit it to the project so the whole team gets it — `.mcp.json` at the repo root:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"shoplflow": {
|
|
49
|
+
"type": "stdio",
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["-y", "@shoplflow/mcp"]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Cursor
|
|
58
|
+
|
|
59
|
+
`.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"mcpServers": {
|
|
64
|
+
"shoplflow": {
|
|
65
|
+
"command": "npx",
|
|
66
|
+
"args": ["-y", "@shoplflow/mcp"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Codex
|
|
73
|
+
|
|
74
|
+
`~/.codex/config.toml`:
|
|
75
|
+
|
|
76
|
+
```toml
|
|
77
|
+
[mcp_servers.shoplflow]
|
|
78
|
+
command = "npx"
|
|
79
|
+
args = ["-y", "@shoplflow/mcp"]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### VS Code (GitHub Copilot)
|
|
83
|
+
|
|
84
|
+
`.vscode/mcp.json`:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"servers": {
|
|
89
|
+
"shoplflow": {
|
|
90
|
+
"type": "stdio",
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["-y", "@shoplflow/mcp"]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Any other MCP client
|
|
99
|
+
|
|
100
|
+
Anything that speaks stdio MCP works — the command is always:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx -y @shoplflow/mcp
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Or install it and use the bin directly:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm i -g @shoplflow/mcp && shoplflow-mcp
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Requires **Node ≥ 18**.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Verify the connection
|
|
117
|
+
|
|
118
|
+
After restarting your agent, ask it something only this server can answer:
|
|
119
|
+
|
|
120
|
+
> "shoplflow에서 primary300 토큰 값이 뭐야?"
|
|
121
|
+
|
|
122
|
+
A working connection returns `#3299fe` **via a `get_token` call** (you should see the tool invocation).
|
|
123
|
+
If the agent answers from guesswork without calling a tool, it isn't connected.
|
|
124
|
+
|
|
125
|
+
In Claude Code you can also list it explicitly:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
claude mcp list # shoplflow should appear as connected
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Connect-time preflight.** On connect, the server hands the client an `instructions` string that the agent
|
|
132
|
+
keeps in context for the whole session:
|
|
133
|
+
|
|
134
|
+
> MANDATORY shoplflow setup before rendering ANY `@shoplflow/base` component: (1) import `@shoplflow/base/styles`
|
|
135
|
+
> at the app entry; (2) wrap the tree in `<ShoplflowProvider domain="SHOPL" | "HADA">`. These components are
|
|
136
|
+
> CLIENT-ONLY … Next.js App Router requires a `'use client'` boundary plus an Emotion registry.
|
|
137
|
+
|
|
138
|
+
This is why the agent won't forget the provider even if you never mention it.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Tool reference
|
|
143
|
+
|
|
144
|
+
Eight tools, organised as **discover → detail**. List tools return summaries; detail tools return everything.
|
|
145
|
+
That split keeps the agent's context small — pulling all 65 component APIs at once would cost tens of
|
|
146
|
+
thousands of tokens.
|
|
147
|
+
|
|
148
|
+
| Tool | Use it to | Returns |
|
|
149
|
+
| ----------------------------------------- | ------------------------------- | ------------------------------- |
|
|
150
|
+
| [`list_tokens`](#list_tokens) | discover token names/values | summaries |
|
|
151
|
+
| [`get_token`](#get_token) | get one token in full | full record |
|
|
152
|
+
| [`search_icon`](#search_icon) | find an icon by name or meaning | name + alias + import |
|
|
153
|
+
| [`search_component`](#search_component) | discover components | summaries + variants |
|
|
154
|
+
| [`get_component_api`](#get_component_api) | get one component's full API | props + variants + polymorphism |
|
|
155
|
+
| [`get_usage_example`](#get_usage_example) | get real usage code | story-derived examples |
|
|
156
|
+
| [`get_setup_guide`](#get_setup_guide) | scaffold correct setup | provider + CSS + snippet |
|
|
157
|
+
| [`check_environment`](#check_environment) | check framework support | support status + workaround |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `list_tokens`
|
|
162
|
+
|
|
163
|
+
Discover exact token names and values before writing UI code.
|
|
164
|
+
|
|
165
|
+
| Param | Type | Required | Description |
|
|
166
|
+
| -------- | ------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
167
|
+
| `domain` | `"shared" \| "shopl" \| "hada"` | – | `shared` = palette/spacing/radius/weights/shadows (brand-agnostic). `shopl`/`hada` = typography + primary/semantic colors. |
|
|
168
|
+
| `type` | `string` | – | One of `color`, `spacing`, `borderRadius`, `fontWeights`, `typography`, `boxShadow`. |
|
|
169
|
+
| `query` | `string` | – | Case-insensitive substring against the token **name or value**. |
|
|
170
|
+
|
|
171
|
+
```jsonc
|
|
172
|
+
// list_tokens({ type: "color", query: "primary" })
|
|
173
|
+
{
|
|
174
|
+
"count": 10, // primary100/150/200/300/400 × shopl + hada
|
|
175
|
+
"tokens": [
|
|
176
|
+
{
|
|
177
|
+
"name": "primary300",
|
|
178
|
+
"type": "color",
|
|
179
|
+
"domain": "shopl",
|
|
180
|
+
"value": "#3299fe",
|
|
181
|
+
"cssVar": "--primary300",
|
|
182
|
+
"className": null,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
> **`cssVar` vs `className`.** Most tokens are CSS custom properties (`var(--primary300)`).
|
|
189
|
+
> Typography tokens are **not** — they're applied as a class or via the `typography` prop
|
|
190
|
+
> (`<Text typography="body1_700" />`), so they carry `className` instead. The agent uses this
|
|
191
|
+
> field to pick the right consumption pattern.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### `get_token`
|
|
196
|
+
|
|
197
|
+
Full record for one token by exact name.
|
|
198
|
+
|
|
199
|
+
| Param | Type | Required | Description |
|
|
200
|
+
| -------- | ------------------------------- | -------- | -------------------------------------------------------------- |
|
|
201
|
+
| `name` | `string` | ✅ | Exact token name, e.g. `primary300`, `body1_700`, `spacing08`. |
|
|
202
|
+
| `domain` | `"shared" \| "shopl" \| "hada"` | – | Disambiguate — the same name can exist per brand. |
|
|
203
|
+
|
|
204
|
+
A miss returns suggestions rather than an error, so the agent can self-correct:
|
|
205
|
+
|
|
206
|
+
```jsonc
|
|
207
|
+
// get_token({ name: "primaryX" })
|
|
208
|
+
{ "found": false, "name": "primaryX", "suggestions": ["primary100 (shopl)", "primary200 (shopl)", …] }
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### `search_icon`
|
|
214
|
+
|
|
215
|
+
Find icons by name **or meaning**. Both the raw name (`IcAdd`) and the public alias (`AddIcon`) are
|
|
216
|
+
importable and both are returned.
|
|
217
|
+
|
|
218
|
+
| Param | Type | Required | Description |
|
|
219
|
+
| -------- | ------------------- | -------- | ------------------------------------------------------- |
|
|
220
|
+
| `query` | `string` | ✅ | Name or keywords — `"add"`, `"chat bot"`, `"calendar"`. |
|
|
221
|
+
| `domain` | `"shopl" \| "hada"` | – | Restrict to one brand's icon set. |
|
|
222
|
+
| `limit` | `number` (≤50) | – | Max results, default 15. |
|
|
223
|
+
|
|
224
|
+
```jsonc
|
|
225
|
+
// search_icon({ query: "trash", domain: "shopl" })
|
|
226
|
+
{
|
|
227
|
+
"query": "trash",
|
|
228
|
+
"count": 2,
|
|
229
|
+
"icons": [
|
|
230
|
+
{
|
|
231
|
+
"name": "IcTrash",
|
|
232
|
+
"alias": "TrashIcon",
|
|
233
|
+
"domain": "shopl",
|
|
234
|
+
"importFrom": "@shoplflow/shopl-assets",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "IcTrashLine",
|
|
238
|
+
"alias": "TrashLineIcon",
|
|
239
|
+
"domain": "shopl",
|
|
240
|
+
"importFrom": "@shoplflow/shopl-assets",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
> **Multi-word queries narrow, they don't broaden.** Every term must match — `"chat bot"` returns only
|
|
247
|
+
> `IcAiChatBot`, not everything chat-related. Search first, then use `<Icon iconSource={TrashIcon} />`.
|
|
248
|
+
>
|
|
249
|
+
> **Icon sets differ per brand.** An icon in `shopl` may not exist in `hada`. Pass `domain` when the app
|
|
250
|
+
> targets one brand.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### `search_component`
|
|
255
|
+
|
|
256
|
+
Discover components by name, module, prop name, or variant value.
|
|
257
|
+
|
|
258
|
+
| Param | Type | Required | Description |
|
|
259
|
+
| ------- | -------------- | -------- | ---------------------------------------------------------------- |
|
|
260
|
+
| `query` | `string` | ✅ | e.g. `"button"`, `"modal"`, `"date"`, `"styleVar"`, `"loading"`. |
|
|
261
|
+
| `group` | `string` | – | Restrict to one module (the component folder, e.g. `"Modal"`). |
|
|
262
|
+
| `limit` | `number` (≤50) | – | Max results, default 20. |
|
|
263
|
+
|
|
264
|
+
Compound components are listed **per part** — searching `"modal"` returns `ModalContainer`,
|
|
265
|
+
`ModalHeader`, `ModalContents`, … not a single `Modal` entry.
|
|
266
|
+
|
|
267
|
+
```jsonc
|
|
268
|
+
// search_component({ query: "button" })
|
|
269
|
+
{
|
|
270
|
+
"count": 11, // Button, ChipButton, DropdownButton, IconButton, SplitButton, ToggleButton, …
|
|
271
|
+
"components": [
|
|
272
|
+
{
|
|
273
|
+
"name": "Button",
|
|
274
|
+
"group": "Button",
|
|
275
|
+
"polymorphic": true,
|
|
276
|
+
"variants": [
|
|
277
|
+
{ "prop": "sizeVar", "values": ["S", "M", "XS"] },
|
|
278
|
+
{
|
|
279
|
+
"prop": "styleVar",
|
|
280
|
+
"values": ["PRIMARY", "SECONDARY", "SOLID", "GHOST"],
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
"propCount": 9,
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### `get_component_api`
|
|
292
|
+
|
|
293
|
+
Everything about one component.
|
|
294
|
+
|
|
295
|
+
| Param | Type | Required | Description |
|
|
296
|
+
| ------ | -------- | -------- | ------------------------------------------------------------------------ |
|
|
297
|
+
| `name` | `string` | ✅ | Exact component name, case-insensitive — `"Button"`, `"ModalContainer"`. |
|
|
298
|
+
|
|
299
|
+
```jsonc
|
|
300
|
+
// get_component_api({ name: "Button" })
|
|
301
|
+
{
|
|
302
|
+
"found": true,
|
|
303
|
+
"component": {
|
|
304
|
+
"name": "Button",
|
|
305
|
+
"group": "Button",
|
|
306
|
+
"importFrom": "@shoplflow/base",
|
|
307
|
+
"polymorphic": true, // accepts `as`
|
|
308
|
+
"defaultElement": "button", // renders <button> by default
|
|
309
|
+
"nativeAttrs": "button", // forwards native <button> attributes
|
|
310
|
+
"variants": [
|
|
311
|
+
{ "prop": "sizeVar", "values": ["S", "M", "XS"] },
|
|
312
|
+
{
|
|
313
|
+
"prop": "styleVar",
|
|
314
|
+
"values": ["PRIMARY", "SECONDARY", "SOLID", "GHOST"],
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
"props": [
|
|
318
|
+
{
|
|
319
|
+
"name": "color",
|
|
320
|
+
"optional": true,
|
|
321
|
+
"type": "ColorTokens",
|
|
322
|
+
"description": "텍스트 혹은 아이콘의 색상을 설정합니다. styleVar이 있는 경우 메인색상을 설정합니다.",
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "isLoading",
|
|
326
|
+
"optional": true,
|
|
327
|
+
"type": "boolean",
|
|
328
|
+
"description": "로딩 여부를 설정합니다.",
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Field meanings:
|
|
336
|
+
|
|
337
|
+
| Field | Meaning |
|
|
338
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
339
|
+
| `polymorphic` | Accepts an `as` prop — `<Button as="a" href="…">`. |
|
|
340
|
+
| `defaultElement` | The element rendered when `as` is omitted. |
|
|
341
|
+
| `nativeAttrs` | Forwards that element's native HTML attributes (`onClick`, `type`, `aria-*`, …). Not enumerated — there are hundreds. |
|
|
342
|
+
| `variants` | The **exact** allowed values, read from the `as const` enums in the source. Nothing else is valid. |
|
|
343
|
+
| `props` | Component-specific props with JSDoc (Korean, straight from the library) and optionality. Types longer than 80 chars are elided with `…`. |
|
|
344
|
+
|
|
345
|
+
Misses return `suggestions`, same as `get_token`.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
### `get_usage_example`
|
|
350
|
+
|
|
351
|
+
Real, copy-pasteable usage extracted from the component's Storybook stories — `args` and `render` JSX,
|
|
352
|
+
with `play`/`parameters`/`argTypes` test noise stripped.
|
|
353
|
+
|
|
354
|
+
| Param | Type | Required | Description |
|
|
355
|
+
| ------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
356
|
+
| `name` | `string` | ✅ | Module name (`"Button"`, `"Modal"`) **or** a component name from `get_component_api` (`"ModalContainer"` resolves to the `Modal` stories). |
|
|
357
|
+
|
|
358
|
+
```jsonc
|
|
359
|
+
// get_usage_example({ name: "Button" })
|
|
360
|
+
{
|
|
361
|
+
"found": true,
|
|
362
|
+
"component": "Button",
|
|
363
|
+
"group": "Button",
|
|
364
|
+
"examples": [
|
|
365
|
+
{
|
|
366
|
+
"story": "Playground",
|
|
367
|
+
"args": "{ styleVar: 'PRIMARY', sizeVar: 'M', children: 'Button', disabled: false }",
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"story": "Variants",
|
|
371
|
+
"code": "<div style={flexWrap}>\n <Button {...args} styleVar='PRIMARY'>Primary</Button>\n <Button {...args} styleVar='SOLID' color='neutral300'>Solid</Button>\n</div>",
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
> Stories are the best usage source because they're rendered in CI — an example that broke would fail the build.
|
|
378
|
+
> Up to 8 examples per module; long code is clipped at ~1200 chars.
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
### `get_setup_guide`
|
|
383
|
+
|
|
384
|
+
The prerequisite setup before **any** `@shoplflow/base` component renders. Takes no arguments.
|
|
385
|
+
|
|
386
|
+
```jsonc
|
|
387
|
+
{
|
|
388
|
+
"provider": {
|
|
389
|
+
"name": "ShoplflowProvider",
|
|
390
|
+
"importFrom": "@shoplflow/base",
|
|
391
|
+
"clientOnly": true,
|
|
392
|
+
"clientReasons": [
|
|
393
|
+
"framer-motion (LazyMotion)",
|
|
394
|
+
"Modal/Popper portals",
|
|
395
|
+
"DOM theming hook (data-shoplflow)",
|
|
396
|
+
"Emotion CSS-in-JS",
|
|
397
|
+
],
|
|
398
|
+
"props": [
|
|
399
|
+
{
|
|
400
|
+
"name": "domain",
|
|
401
|
+
"type": "DomainType",
|
|
402
|
+
"optional": true,
|
|
403
|
+
"default": "SHOPL",
|
|
404
|
+
"values": ["SHOPL", "HADA"],
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
"styles": [
|
|
409
|
+
{
|
|
410
|
+
"specifier": "@shoplflow/base/styles",
|
|
411
|
+
"role": "design-token CSS vars + typography classes (required)",
|
|
412
|
+
},
|
|
413
|
+
{ "specifier": "@shoplflow/base/reset", "role": "CSS reset (optional)" },
|
|
414
|
+
],
|
|
415
|
+
"peerDependencies": {
|
|
416
|
+
"@emotion/react": "^11",
|
|
417
|
+
"@emotion/styled": "^11",
|
|
418
|
+
"react": "^18",
|
|
419
|
+
"react-dom": "^18",
|
|
420
|
+
},
|
|
421
|
+
"setupSteps": ["…"],
|
|
422
|
+
"snippet": "import { ShoplflowProvider } from '@shoplflow/base';\nimport '@shoplflow/base/styles';\n\n<ShoplflowProvider domain=\"SHOPL\">\n <App />\n</ShoplflowProvider>",
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
> The `snippet` is **synthesised from the real provider and package exports**, so it can never reference a
|
|
427
|
+
> wrong import path or a prop that doesn't exist.
|
|
428
|
+
|
|
429
|
+
Call this before scaffolding a project. For framework-specific caveats, pair it with `check_environment`.
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
### `check_environment`
|
|
434
|
+
|
|
435
|
+
Whether — and how — shoplflow works in a given framework. Components are client-only, so SSR/RSC
|
|
436
|
+
frameworks have caveats.
|
|
437
|
+
|
|
438
|
+
| Param | Type | Required | Description |
|
|
439
|
+
| ----------- | -------- | -------- | ----------------------------------------------------------------------------------- |
|
|
440
|
+
| `framework` | `string` | – | e.g. `"next app router"`, `"vite"`, `"next pages"`. Omit to list every environment. |
|
|
441
|
+
|
|
442
|
+
| Environment | Support | Summary |
|
|
443
|
+
| -------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
444
|
+
| Vite / CRA (SPA, CSR) | ✅ supported | Recommended. Import the styles and wrap with the provider at the entry point. |
|
|
445
|
+
| Next.js — Pages Router | ⚠️ constrained | Renders, but FOUC without Emotion SSR. Workaround: wrap in `_app.tsx`, add `extractCriticalToChunks` in `_document.tsx`. |
|
|
446
|
+
| Next.js — App Router (RSC) | ⛔ needs workaround | Cannot render inside a Server Component. Workaround: `'use client'` provider wrapper + Emotion registry (`useServerInsertedHTML`); keep every consumer inside the client boundary. |
|
|
447
|
+
|
|
448
|
+
Unknown input returns the full list rather than an empty result.
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Resources
|
|
453
|
+
|
|
454
|
+
For clients that prefer reading a document over calling tools.
|
|
455
|
+
|
|
456
|
+
| URI | Content |
|
|
457
|
+
| ------------------------ | --------------------------------------------------------------------------------- |
|
|
458
|
+
| `shoplflow://tokens` | The entire token catalog as JSON (all 114 records with counts by type/domain). |
|
|
459
|
+
| `shoplflow://components` | Compact index of every component — name, group, polymorphism, variant prop names. |
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Working with an agent
|
|
464
|
+
|
|
465
|
+
You don't need to name the tools — the descriptions steer the agent. But knowing the flow helps you
|
|
466
|
+
diagnose a bad result.
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
"shoplflow로 삭제 버튼 만들어줘"
|
|
470
|
+
├ search_component("button") → Button, IconButton, SplitButton, ToggleButton, …
|
|
471
|
+
├ get_component_api("Button") → exact styleVar/sizeVar values + props
|
|
472
|
+
├ get_usage_example("Button") → real JSX from the stories
|
|
473
|
+
├ search_icon("trash") → IcTrash / TrashIcon + import path
|
|
474
|
+
└ list_tokens({type:"color"}) → exact color token keys
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
**Prompts that use the server well**
|
|
478
|
+
|
|
479
|
+
| Goal | Ask |
|
|
480
|
+
| ------------------- | --------------------------------------------------------------------------------- |
|
|
481
|
+
| Correct scaffolding | "Vite 앱에 shoplflow 셋업해줘" → triggers `get_setup_guide` + `check_environment` |
|
|
482
|
+
| Exact variants | "Button에 어떤 styleVar 값이 있어?" → `get_component_api` |
|
|
483
|
+
| Find an icon | "휴지통 아이콘 뭐 써야 해?" → `search_icon` |
|
|
484
|
+
| Match the design | "이 카드 배경을 shoplflow 뉴트럴 토큰으로 바꿔줘" → `list_tokens` |
|
|
485
|
+
| Framework check | "Next.js App Router에서 shoplflow 써도 돼?" → `check_environment` |
|
|
486
|
+
|
|
487
|
+
**Pair with the skills package.** The MCP gives an agent _facts_; [`@shoplflow/skills`](../skills) gives it
|
|
488
|
+
_idioms_ — the setup order, the KEY-vs-VALUE distinction, the `styleVar`/`sizeVar` convention. Installing the
|
|
489
|
+
plugin gets both. See [../skills/README.md](../skills/README.md).
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## What's served
|
|
494
|
+
|
|
495
|
+
Everything is generated at build time from the same files that produce the shipped library, so the served
|
|
496
|
+
metadata can't describe something that differs from what ships.
|
|
497
|
+
|
|
498
|
+
| Surface | Count | Source |
|
|
499
|
+
| -------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
500
|
+
| Design tokens | **114** (color 44 · typography 47 · spacing 13 · borderRadius 6 · fontWeights 3 · boxShadow 1) | `base/src/styles/tokens.json` |
|
|
501
|
+
| Icons | **473** (shopl 369 · hada 104) | `{shopl,hada}-assets` barrels |
|
|
502
|
+
| Component APIs | **65 cards** across 43 modules (19 with variants) | `base/src/components/**/*.types.ts` |
|
|
503
|
+
| Usage examples | **149** across 42 modules | `base/src/components/**/*.stories.tsx` |
|
|
504
|
+
| Setup & environments | provider + 2 CSS exports + 3 frameworks | `base` provider/package.json + `setup.curated.json` |
|
|
12
505
|
|
|
13
506
|
```
|
|
14
507
|
tokens.json ─┐
|
|
15
508
|
*-assets barrel ─┤ scripts/generate-metadata.cjs ─► src/data/*.generated.json ─► MCP server (stdio)
|
|
16
|
-
*.types.ts
|
|
509
|
+
*.types.ts ─┤ (build step, ts-morph) (inlined into the bin)
|
|
510
|
+
*.stories.tsx ─┘
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
Full pipeline details in [아키텍쳐.md](./아키텍쳐.md).
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## Local development
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
pnpm --filter @shoplflow/mcp generate:metadata # regenerate metadata from the library sources
|
|
521
|
+
pnpm --filter @shoplflow/mcp build:package # generate + bundle to dist/
|
|
522
|
+
pnpm --filter @shoplflow/mcp dev # generate + tsup --watch
|
|
523
|
+
pnpm --filter @shoplflow/mcp start # run the built server over stdio
|
|
524
|
+
pnpm --filter @shoplflow/mcp check:wiring # verify the base-release coupling is intact
|
|
17
525
|
```
|
|
18
526
|
|
|
19
|
-
|
|
527
|
+
`build:package` always runs `generate:metadata` first, so a normal build can't ship stale data.
|
|
20
528
|
|
|
21
|
-
|
|
22
|
-
|-------|---------|--------|--------|
|
|
23
|
-
| 1 | Design tokens (`list_tokens`, `get_token`, `shoplflow://tokens`) | `tokens.json` | ✅ done |
|
|
24
|
-
| 2 | Icon search (`search_icon`) | `*-assets` barrels | ✅ done |
|
|
25
|
-
| 3 | Component API (`search_component`, `get_component_api`) | `*.types.ts` | ✅ done |
|
|
26
|
-
| 4 | Usage examples (`get_usage_example`) | `*.stories.tsx` | ✅ done |
|
|
27
|
-
| 5 | Setup & environment (`get_setup_guide`, `check_environment`, server `instructions`) | provider + `setup.curated.json` | ✅ done |
|
|
529
|
+
### Smoke test
|
|
28
530
|
|
|
29
|
-
|
|
531
|
+
The only end-to-end check — spins up `dist/index.js` with a real MCP client and exercises every tool:
|
|
30
532
|
|
|
31
533
|
```bash
|
|
32
|
-
pnpm --filter @shoplflow/mcp
|
|
33
|
-
|
|
34
|
-
pnpm --filter @shoplflow/mcp start # run the built server over stdio
|
|
534
|
+
pnpm --filter @shoplflow/mcp build:package
|
|
535
|
+
node packages/mcp/scripts/smoke.mjs
|
|
35
536
|
```
|
|
36
537
|
|
|
37
|
-
|
|
538
|
+
Expected tail: `✓ smoke test passed`. Run it after touching `server.ts` or any extractor.
|
|
38
539
|
|
|
39
|
-
|
|
540
|
+
### Point your agent at the local build
|
|
541
|
+
|
|
542
|
+
The repo root `.mcp.json` already does this for monorepo development:
|
|
40
543
|
|
|
41
544
|
```json
|
|
42
545
|
{
|
|
43
546
|
"mcpServers": {
|
|
44
547
|
"shoplflow": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
548
|
+
"type": "stdio",
|
|
549
|
+
"command": "node",
|
|
550
|
+
"args": ["packages/mcp/dist/index.js"]
|
|
47
551
|
}
|
|
48
552
|
}
|
|
49
553
|
}
|
|
50
554
|
```
|
|
51
555
|
|
|
52
|
-
|
|
556
|
+
Rebuild (`build:package`) and restart the agent to pick up changes.
|
|
557
|
+
|
|
558
|
+
### After changing the library
|
|
559
|
+
|
|
560
|
+
Regenerate and **commit the generated JSON** — it's tracked in git so releases are reproducible and diffs
|
|
561
|
+
are reviewable.
|
|
562
|
+
|
|
563
|
+
| You changed | Regenerate affects |
|
|
564
|
+
| ------------------------------------ | --------------------------- |
|
|
565
|
+
| `tokens.json` | `tokens.generated.json` |
|
|
566
|
+
| SVG assets (after `build:assets`) | `icons.generated.json` |
|
|
567
|
+
| a `*.types.ts` | `components.generated.json` |
|
|
568
|
+
| a `*.stories.tsx` | `stories.generated.json` |
|
|
569
|
+
| provider / `base` exports / peerDeps | `setup.generated.json` |
|
|
570
|
+
|
|
571
|
+
Sanity-check the console summary (`✓ tokens: 114 …`) — a sudden drop in a count means an extractor's
|
|
572
|
+
assumption broke.
|
|
573
|
+
|
|
574
|
+
**CI enforces this.** `build-test.yml` regenerates the metadata on every PR and fails if the committed
|
|
575
|
+
JSON differs, with the exact command to fix it. Without that gate the committed copy silently rots and
|
|
576
|
+
the "review the effect of a base change in the PR diff" benefit disappears.
|
|
577
|
+
|
|
578
|
+
### Release coupling (why `check:wiring` exists)
|
|
579
|
+
|
|
580
|
+
A `@shoplflow/base` release automatically republishes this package with freshly extracted metadata. That
|
|
581
|
+
behaviour isn't declared in one place — it emerges from settings spread across `package.json`,
|
|
582
|
+
`turbo.json`, and the release scripts:
|
|
583
|
+
|
|
584
|
+
| Piece | Removing it… |
|
|
585
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
|
586
|
+
| `@shoplflow/{base,shopl-assets,hada-assets}` in devDeps | loses turbo's build ordering → extraction can read stale icon barrels |
|
|
587
|
+
| `generate:metadata &&` in `build:package` | allows a build path that bundles previously generated JSON |
|
|
588
|
+
| turbo scheduling `mcp#build:package` under `turbo run build` | means CI's `pnpm build` never produces `dist/` before publish |
|
|
589
|
+
| `ensure:changeset` at the front of the root `version` script | base releases stop adding an mcp changeset → **mcp is never republished** |
|
|
590
|
+
|
|
591
|
+
Changesets will **not** bump mcp on its own: a package that depends on base only through
|
|
592
|
+
`devDependencies` resolves to `none`, even with `updateInternalDependents: "always"`. So the root
|
|
593
|
+
`version` script runs `pnpm --filter @shoplflow/mcp ensure:changeset` first, which adds an
|
|
594
|
+
`"@shoplflow/mcp": patch` changeset whenever a pending changeset releases base or an asset package and
|
|
595
|
+
none mentions mcp yet. The coupling is one-way — an mcp-only change never forces a base release. To skip
|
|
596
|
+
it for one release, list `"@shoplflow/mcp": none` in any pending changeset.
|
|
597
|
+
|
|
598
|
+
Each removal keeps the build green — the failure is silent, and consumers just keep receiving stale
|
|
599
|
+
metadata. `check:wiring` asserts all four and runs on every PR. Details in
|
|
600
|
+
[아키텍쳐.md §6](./아키텍쳐.md).
|
|
601
|
+
|
|
602
|
+
### Editing the setup guidance
|
|
53
603
|
|
|
54
|
-
**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- Resource **`shoplflow://tokens`** — the entire catalog as JSON.
|
|
604
|
+
`setup.curated.json` is the **one file the team edits by hand**. It holds `setupSteps`, per-framework
|
|
605
|
+
`environments`, and the connect-time `instructions`. Everything else (provider props, CSS exports, peer deps)
|
|
606
|
+
is extracted from code and must not be duplicated there.
|
|
58
607
|
|
|
59
|
-
|
|
60
|
-
|
|
608
|
+
Keep the Next.js entries in sync with the library's actual support stance — the App Router entry currently
|
|
609
|
+
carries a `verify` note flagging it as an inferred, unratified position.
|
|
61
610
|
|
|
62
|
-
|
|
63
|
-
- **`search_icon`** — find icons by name or meaning; filter by `domain` (`shopl` | `hada`) and `limit`.
|
|
64
|
-
Returns the raw name (`IcAdd`) and public alias (`AddIcon`), both importable from the brand asset
|
|
65
|
-
package and usable as `<Icon iconSource={AddIcon} />`. Icon sets differ per brand.
|
|
611
|
+
---
|
|
66
612
|
|
|
67
|
-
|
|
68
|
-
- **`search_component`** — discover `@shoplflow/base` components by name, module, prop, or variant value;
|
|
69
|
-
filter by `group` (module) and `limit`. Compound components are listed per part (e.g. `ModalContainer`, `ModalHeader`).
|
|
70
|
-
- **`get_component_api`** — full API for one component by exact name: props (with JSDoc + optionality),
|
|
71
|
-
exact variant values (`sizeVar`/`styleVar`/…), polymorphism (`as` + default element), and native-HTML-attr passthrough.
|
|
72
|
-
- Resource **`shoplflow://components`** — compact index of every component.
|
|
613
|
+
## Troubleshooting
|
|
73
614
|
|
|
74
|
-
|
|
75
|
-
|
|
615
|
+
| Symptom | Cause | Fix |
|
|
616
|
+
| --------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
617
|
+
| Agent doesn't call any tool | Server not connected | `claude mcp list` / check the client's MCP panel. Restart the agent after editing config. |
|
|
618
|
+
| `npx` fails or hangs | Node < 18, or no network on first fetch | `node -v`; run `npx -y @shoplflow/mcp` in a terminal to see the real error. First run downloads the package. |
|
|
619
|
+
| Connection drops immediately | Something wrote to stdout | stdout is reserved for JSON-RPC. Any `console.log` in the server corrupts the protocol — logs must go to `stderr`. |
|
|
620
|
+
| Tools work but data looks stale | Metadata not regenerated | `pnpm --filter @shoplflow/mcp build:package`, restart the agent. Published versions ship the metadata frozen at release time — bump the package. |
|
|
621
|
+
| An icon isn't found | Wrong brand | Icon sets differ per brand; retry `search_icon` without `domain`, or with the other one. |
|
|
622
|
+
| A component isn't found | Compound part name | Search the module (`search_component({ query: "modal" })`) to see the real part names. |
|
|
623
|
+
| Agent still skips the provider | Client ignores `instructions` | Some clients don't surface server instructions. Install [`@shoplflow/skills`](../skills) so the setup rule arrives as a skill too. |
|
|
624
|
+
| Multi-word search returns nothing | AND semantics | Every term must match. Try fewer/shorter terms. |
|
|
76
625
|
|
|
77
|
-
|
|
78
|
-
- **`get_usage_example`** — real, copy-pasteable examples for a component, extracted from its stories
|
|
79
|
-
(`args` + `render` JSX, with `play`/test code stripped). Accepts a module name (`Button`, `Modal`) or a
|
|
80
|
-
component name from `get_component_api` (`ModalContainer` resolves to the `Modal` stories).
|
|
626
|
+
---
|
|
81
627
|
|
|
82
|
-
|
|
83
|
-
- Server **`instructions`** — an always-on preflight (surfaced at connect) so the agent never skips the
|
|
84
|
-
mandatory `ShoplflowProvider` + global-CSS setup, or the client-only / Next.js constraint.
|
|
85
|
-
- **`get_setup_guide`** — required style import, the Provider wrapper + `domain` prop, peer deps, and a
|
|
86
|
-
ready-to-paste snippet (synthesized from the real provider/exports, so it can't reference a wrong import).
|
|
87
|
-
- **`check_environment`** — per-framework support (Vite/CRA supported; Next.js Pages constrained; Next.js
|
|
88
|
-
App Router needs a `'use client'` boundary + Emotion registry), with workarounds.
|
|
628
|
+
## Related
|
|
89
629
|
|
|
90
|
-
|
|
91
|
-
(
|
|
92
|
-
|
|
630
|
+
- [아키텍쳐.md](./아키텍쳐.md) — internal architecture, design decisions, extension guide
|
|
631
|
+
- [`@shoplflow/skills`](../skills) — agent skills + the plugin that bundles this server
|
|
632
|
+
- [CLAUDE.md](../../CLAUDE.md) — monorepo guide
|
package/dist/index.js
CHANGED
|
@@ -15,18 +15,18 @@ var tokens_generated_default = {
|
|
|
15
15
|
"shopl",
|
|
16
16
|
"hada"
|
|
17
17
|
],
|
|
18
|
-
count:
|
|
18
|
+
count: 115,
|
|
19
19
|
countByType: {
|
|
20
20
|
color: 44,
|
|
21
21
|
borderRadius: 6,
|
|
22
22
|
fontWeights: 3,
|
|
23
23
|
spacing: 13,
|
|
24
24
|
boxShadow: 1,
|
|
25
|
-
typography:
|
|
25
|
+
typography: 48
|
|
26
26
|
},
|
|
27
27
|
countByDomain: {
|
|
28
28
|
shared: 55,
|
|
29
|
-
shopl:
|
|
29
|
+
shopl: 31,
|
|
30
30
|
hada: 29
|
|
31
31
|
},
|
|
32
32
|
tokens: [
|
|
@@ -901,6 +901,34 @@ var tokens_generated_default = {
|
|
|
901
901
|
className: null,
|
|
902
902
|
value: "#2d89e4"
|
|
903
903
|
},
|
|
904
|
+
{
|
|
905
|
+
name: "caption2_700",
|
|
906
|
+
type: "typography",
|
|
907
|
+
domain: "shopl",
|
|
908
|
+
path: "caption2_700",
|
|
909
|
+
cssVar: null,
|
|
910
|
+
className: ".caption2_700",
|
|
911
|
+
value: {
|
|
912
|
+
fontWeight: "{fontWeight.bold}",
|
|
913
|
+
fontSize: "10",
|
|
914
|
+
lineHeight: "15",
|
|
915
|
+
fontFamily: "Pretendard"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "caption2_400",
|
|
920
|
+
type: "typography",
|
|
921
|
+
domain: "shopl",
|
|
922
|
+
path: "caption2_400",
|
|
923
|
+
cssVar: null,
|
|
924
|
+
className: ".caption2_400",
|
|
925
|
+
value: {
|
|
926
|
+
fontFamily: "Pretendard",
|
|
927
|
+
fontWeight: "{fontWeight.regular}",
|
|
928
|
+
fontSize: "10",
|
|
929
|
+
lineHeight: "15"
|
|
930
|
+
}
|
|
931
|
+
},
|
|
904
932
|
{
|
|
905
933
|
name: "heading1_700",
|
|
906
934
|
type: "typography",
|
|
@@ -1290,9 +1318,9 @@ var icons_generated_default = {
|
|
|
1290
1318
|
"shopl",
|
|
1291
1319
|
"hada"
|
|
1292
1320
|
],
|
|
1293
|
-
count:
|
|
1321
|
+
count: 483,
|
|
1294
1322
|
countByDomain: {
|
|
1295
|
-
shopl:
|
|
1323
|
+
shopl: 379,
|
|
1296
1324
|
hada: 104
|
|
1297
1325
|
},
|
|
1298
1326
|
icons: [
|
|
@@ -1486,6 +1514,36 @@ var icons_generated_default = {
|
|
|
1486
1514
|
"alert"
|
|
1487
1515
|
]
|
|
1488
1516
|
},
|
|
1517
|
+
{
|
|
1518
|
+
name: "IcAlignCenter",
|
|
1519
|
+
alias: "AlignCenterIcon",
|
|
1520
|
+
domain: "shopl",
|
|
1521
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
1522
|
+
keywords: [
|
|
1523
|
+
"align",
|
|
1524
|
+
"center"
|
|
1525
|
+
]
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
name: "IcAlignLeft",
|
|
1529
|
+
alias: "AlignLeftIcon",
|
|
1530
|
+
domain: "shopl",
|
|
1531
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
1532
|
+
keywords: [
|
|
1533
|
+
"align",
|
|
1534
|
+
"left"
|
|
1535
|
+
]
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "IcAlignRight",
|
|
1539
|
+
alias: "AlignRightIcon",
|
|
1540
|
+
domain: "shopl",
|
|
1541
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
1542
|
+
keywords: [
|
|
1543
|
+
"align",
|
|
1544
|
+
"right"
|
|
1545
|
+
]
|
|
1546
|
+
},
|
|
1489
1547
|
{
|
|
1490
1548
|
name: "IcAnnualMedium",
|
|
1491
1549
|
alias: "AnnualMediumIcon",
|
|
@@ -2049,6 +2107,16 @@ var icons_generated_default = {
|
|
|
2049
2107
|
"plus"
|
|
2050
2108
|
]
|
|
2051
2109
|
},
|
|
2110
|
+
{
|
|
2111
|
+
name: "IcCopyXsmall",
|
|
2112
|
+
alias: "CopyXsmallIcon",
|
|
2113
|
+
domain: "shopl",
|
|
2114
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
2115
|
+
keywords: [
|
|
2116
|
+
"copy",
|
|
2117
|
+
"xsmall"
|
|
2118
|
+
]
|
|
2119
|
+
},
|
|
2052
2120
|
{
|
|
2053
2121
|
name: "IcCopy",
|
|
2054
2122
|
alias: "CopyIcon",
|
|
@@ -2290,6 +2358,15 @@ var icons_generated_default = {
|
|
|
2290
2358
|
"dropdown"
|
|
2291
2359
|
]
|
|
2292
2360
|
},
|
|
2361
|
+
{
|
|
2362
|
+
name: "IcDuplicate",
|
|
2363
|
+
alias: "DuplicateIcon",
|
|
2364
|
+
domain: "shopl",
|
|
2365
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
2366
|
+
keywords: [
|
|
2367
|
+
"duplicate"
|
|
2368
|
+
]
|
|
2369
|
+
},
|
|
2293
2370
|
{
|
|
2294
2371
|
name: "IcDuration",
|
|
2295
2372
|
alias: "DurationIcon",
|
|
@@ -2497,6 +2574,18 @@ var icons_generated_default = {
|
|
|
2497
2574
|
"page"
|
|
2498
2575
|
]
|
|
2499
2576
|
},
|
|
2577
|
+
{
|
|
2578
|
+
name: "IcFlexibleWorkingHoursSystem",
|
|
2579
|
+
alias: "FlexibleWorkingHoursSystemIcon",
|
|
2580
|
+
domain: "shopl",
|
|
2581
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
2582
|
+
keywords: [
|
|
2583
|
+
"flexible",
|
|
2584
|
+
"working",
|
|
2585
|
+
"hours",
|
|
2586
|
+
"system"
|
|
2587
|
+
]
|
|
2588
|
+
},
|
|
2500
2589
|
{
|
|
2501
2590
|
name: "IcFlexibleWorking",
|
|
2502
2591
|
alias: "FlexibleWorkingIcon",
|
|
@@ -2507,6 +2596,24 @@ var icons_generated_default = {
|
|
|
2507
2596
|
"working"
|
|
2508
2597
|
]
|
|
2509
2598
|
},
|
|
2599
|
+
{
|
|
2600
|
+
name: "IcFlexitime",
|
|
2601
|
+
alias: "FlexitimeIcon",
|
|
2602
|
+
domain: "shopl",
|
|
2603
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
2604
|
+
keywords: [
|
|
2605
|
+
"flexitime"
|
|
2606
|
+
]
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
name: "IcForward",
|
|
2610
|
+
alias: "ForwardIcon",
|
|
2611
|
+
domain: "shopl",
|
|
2612
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
2613
|
+
keywords: [
|
|
2614
|
+
"forward"
|
|
2615
|
+
]
|
|
2616
|
+
},
|
|
2510
2617
|
{
|
|
2511
2618
|
name: "IcFullScreenMedium",
|
|
2512
2619
|
alias: "FullScreenMediumIcon",
|
|
@@ -3952,6 +4059,16 @@ var icons_generated_default = {
|
|
|
3952
4059
|
"check"
|
|
3953
4060
|
]
|
|
3954
4061
|
},
|
|
4062
|
+
{
|
|
4063
|
+
name: "IcPinCluster",
|
|
4064
|
+
alias: "PinClusterIcon",
|
|
4065
|
+
domain: "shopl",
|
|
4066
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4067
|
+
keywords: [
|
|
4068
|
+
"pin",
|
|
4069
|
+
"cluster"
|
|
4070
|
+
]
|
|
4071
|
+
},
|
|
3955
4072
|
{
|
|
3956
4073
|
name: "IcPinXlarge",
|
|
3957
4074
|
alias: "PinXlargeIcon",
|
|
@@ -4424,6 +4541,39 @@ var icons_generated_default = {
|
|
|
4424
4541
|
"solved"
|
|
4425
4542
|
]
|
|
4426
4543
|
},
|
|
4544
|
+
{
|
|
4545
|
+
name: "IcSortAscendingXsmall",
|
|
4546
|
+
alias: "SortAscendingXsmallIcon",
|
|
4547
|
+
domain: "shopl",
|
|
4548
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4549
|
+
keywords: [
|
|
4550
|
+
"sort",
|
|
4551
|
+
"ascending",
|
|
4552
|
+
"xsmall"
|
|
4553
|
+
]
|
|
4554
|
+
},
|
|
4555
|
+
{
|
|
4556
|
+
name: "IcSortDefaultXsmall",
|
|
4557
|
+
alias: "SortDefaultXsmallIcon",
|
|
4558
|
+
domain: "shopl",
|
|
4559
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4560
|
+
keywords: [
|
|
4561
|
+
"sort",
|
|
4562
|
+
"default",
|
|
4563
|
+
"xsmall"
|
|
4564
|
+
]
|
|
4565
|
+
},
|
|
4566
|
+
{
|
|
4567
|
+
name: "IcSortDescendingXsmall",
|
|
4568
|
+
alias: "SortDescendingXsmallIcon",
|
|
4569
|
+
domain: "shopl",
|
|
4570
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4571
|
+
keywords: [
|
|
4572
|
+
"sort",
|
|
4573
|
+
"descending",
|
|
4574
|
+
"xsmall"
|
|
4575
|
+
]
|
|
4576
|
+
},
|
|
4427
4577
|
{
|
|
4428
4578
|
name: "IcSortingAtoz",
|
|
4429
4579
|
alias: "SortingAtozIcon",
|
|
@@ -4464,6 +4614,15 @@ var icons_generated_default = {
|
|
|
4464
4614
|
"ztoa"
|
|
4465
4615
|
]
|
|
4466
4616
|
},
|
|
4617
|
+
{
|
|
4618
|
+
name: "IcSparkles",
|
|
4619
|
+
alias: "SparklesIcon",
|
|
4620
|
+
domain: "shopl",
|
|
4621
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4622
|
+
keywords: [
|
|
4623
|
+
"sparkles"
|
|
4624
|
+
]
|
|
4625
|
+
},
|
|
4467
4626
|
{
|
|
4468
4627
|
name: "IcStaggeredWorking",
|
|
4469
4628
|
alias: "StaggeredWorkingIcon",
|
|
@@ -4686,6 +4845,16 @@ var icons_generated_default = {
|
|
|
4686
4845
|
"arrow"
|
|
4687
4846
|
]
|
|
4688
4847
|
},
|
|
4848
|
+
{
|
|
4849
|
+
name: "IcUploadXsmall",
|
|
4850
|
+
alias: "UploadXsmallIcon",
|
|
4851
|
+
domain: "shopl",
|
|
4852
|
+
importFrom: "@shoplflow/shopl-assets",
|
|
4853
|
+
keywords: [
|
|
4854
|
+
"upload",
|
|
4855
|
+
"xsmall"
|
|
4856
|
+
]
|
|
4857
|
+
},
|
|
4689
4858
|
{
|
|
4690
4859
|
name: "IcUserNameLine",
|
|
4691
4860
|
alias: "UserNameLineIcon",
|
|
@@ -5853,8 +6022,8 @@ var icons_generated_default = {
|
|
|
5853
6022
|
var components_generated_default = {
|
|
5854
6023
|
source: "packages/base/src/components/**/*.types.ts",
|
|
5855
6024
|
importFrom: "@shoplflow/base",
|
|
5856
|
-
count:
|
|
5857
|
-
withVariants:
|
|
6025
|
+
count: 66,
|
|
6026
|
+
withVariants: 20,
|
|
5858
6027
|
components: [
|
|
5859
6028
|
{
|
|
5860
6029
|
name: "AnnualDatepicker",
|
|
@@ -6332,6 +6501,121 @@ var components_generated_default = {
|
|
|
6332
6501
|
}
|
|
6333
6502
|
]
|
|
6334
6503
|
},
|
|
6504
|
+
{
|
|
6505
|
+
name: "Combobox",
|
|
6506
|
+
group: "Combobox",
|
|
6507
|
+
importFrom: "@shoplflow/base",
|
|
6508
|
+
polymorphic: false,
|
|
6509
|
+
variants: [
|
|
6510
|
+
{
|
|
6511
|
+
prop: "sizeVar",
|
|
6512
|
+
values: [
|
|
6513
|
+
"S",
|
|
6514
|
+
"M"
|
|
6515
|
+
]
|
|
6516
|
+
}
|
|
6517
|
+
],
|
|
6518
|
+
props: [
|
|
6519
|
+
{
|
|
6520
|
+
name: "'aria-label'",
|
|
6521
|
+
optional: true,
|
|
6522
|
+
type: "string"
|
|
6523
|
+
},
|
|
6524
|
+
{
|
|
6525
|
+
name: "className",
|
|
6526
|
+
optional: true,
|
|
6527
|
+
type: "string"
|
|
6528
|
+
},
|
|
6529
|
+
{
|
|
6530
|
+
name: "defaultValue",
|
|
6531
|
+
optional: true,
|
|
6532
|
+
type: "string",
|
|
6533
|
+
description: "\uBE44\uC81C\uC5B4 \uBAA8\uB4DC\uC758 \uCD08\uAE30\uAC12\uC785\uB2C8\uB2E4."
|
|
6534
|
+
},
|
|
6535
|
+
{
|
|
6536
|
+
name: "disabled",
|
|
6537
|
+
optional: true,
|
|
6538
|
+
type: "boolean",
|
|
6539
|
+
description: "\uBE44\uD65C\uC131\uD654 \uC5EC\uBD80\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."
|
|
6540
|
+
},
|
|
6541
|
+
{
|
|
6542
|
+
name: "floatingZIndex",
|
|
6543
|
+
optional: true,
|
|
6544
|
+
type: "CSSProperties['zIndex']",
|
|
6545
|
+
description: "\uD31D\uC624\uBC84 z-index\uC785\uB2C8\uB2E4."
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
name: "inputMode",
|
|
6549
|
+
optional: true,
|
|
6550
|
+
type: "ComboboxInputModeType",
|
|
6551
|
+
description: "\uC785\uB825 \uBAA8\uB4DC\uC785\uB2C8\uB2E4. `numeric`\uC774\uBA74 \uC22B\uC790\uB9CC \uC785\uB825\uB429\uB2C8\uB2E4."
|
|
6552
|
+
},
|
|
6553
|
+
{
|
|
6554
|
+
name: "isError",
|
|
6555
|
+
optional: true,
|
|
6556
|
+
type: "boolean",
|
|
6557
|
+
description: "\uC5D0\uB7EC \uC5EC\uBD80\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."
|
|
6558
|
+
},
|
|
6559
|
+
{
|
|
6560
|
+
name: "items",
|
|
6561
|
+
optional: false,
|
|
6562
|
+
type: "ComboboxItem[]",
|
|
6563
|
+
description: "\uB4DC\uB86D\uB2E4\uC6B4\uC5D0 \uD45C\uC2DC\uD560 \uD56D\uBAA9\uC785\uB2C8\uB2E4."
|
|
6564
|
+
},
|
|
6565
|
+
{
|
|
6566
|
+
name: "maxLength",
|
|
6567
|
+
optional: true,
|
|
6568
|
+
type: "number"
|
|
6569
|
+
},
|
|
6570
|
+
{
|
|
6571
|
+
name: "onChange",
|
|
6572
|
+
optional: true,
|
|
6573
|
+
type: "(value: string) => void",
|
|
6574
|
+
description: "\uC785\uB825\uAC12\uC774 \uBC14\uB014 \uB54C \uD638\uCD9C\uB429\uB2C8\uB2E4."
|
|
6575
|
+
},
|
|
6576
|
+
{
|
|
6577
|
+
name: "onSelect",
|
|
6578
|
+
optional: true,
|
|
6579
|
+
type: "(value: string) => void",
|
|
6580
|
+
description: "\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD\uD558\uBA74 item.value\uAC00 \uC804\uB2EC\uB429\uB2C8\uB2E4. Enter\uB85C \uD655\uC815\uD558\uBA74 \uD604\uC7AC \uC785\uB825\uAC12\uC774 \uC804\uB2EC\uB429\uB2C8\uB2E4."
|
|
6581
|
+
},
|
|
6582
|
+
{
|
|
6583
|
+
name: "placeholder",
|
|
6584
|
+
optional: true,
|
|
6585
|
+
type: "string"
|
|
6586
|
+
},
|
|
6587
|
+
{
|
|
6588
|
+
name: "sizeVar",
|
|
6589
|
+
optional: true,
|
|
6590
|
+
type: "Size",
|
|
6591
|
+
description: "\uCEF4\uD3EC\uB10C\uD2B8\uC758 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."
|
|
6592
|
+
},
|
|
6593
|
+
{
|
|
6594
|
+
name: "tag",
|
|
6595
|
+
optional: true,
|
|
6596
|
+
type: "ReactNode",
|
|
6597
|
+
description: "\uD544\uB4DC \uBC14\uAE65 \uC624\uB978\uCABD\uC5D0 \uBD99\uB294 \uC120\uD0DD\uC801 \uD0DC\uADF8/\uB2E8\uC704 \uC601\uC5ED\uC785\uB2C8\uB2E4."
|
|
6598
|
+
},
|
|
6599
|
+
{
|
|
6600
|
+
name: "textAlign",
|
|
6601
|
+
optional: true,
|
|
6602
|
+
type: "ComboboxTextAlignType",
|
|
6603
|
+
description: "\uC785\uB825 \uD14D\uC2A4\uD2B8 \uC815\uB82C\uC785\uB2C8\uB2E4."
|
|
6604
|
+
},
|
|
6605
|
+
{
|
|
6606
|
+
name: "value",
|
|
6607
|
+
optional: true,
|
|
6608
|
+
type: "string",
|
|
6609
|
+
description: "\uC785\uB825\uAC12\uC785\uB2C8\uB2E4. \uC804\uB2EC\uD558\uBA74 \uC81C\uC5B4 \uCEF4\uD3EC\uB10C\uD2B8\uB85C \uB3D9\uC791\uD569\uB2C8\uB2E4."
|
|
6610
|
+
},
|
|
6611
|
+
{
|
|
6612
|
+
name: "width",
|
|
6613
|
+
optional: true,
|
|
6614
|
+
type: "CSSProperties['width']",
|
|
6615
|
+
description: "\uD544\uB4DC \uB108\uBE44\uC785\uB2C8\uB2E4. \uD0DC\uADF8 \uC601\uC5ED\uC740 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
6616
|
+
}
|
|
6617
|
+
]
|
|
6618
|
+
},
|
|
6335
6619
|
{
|
|
6336
6620
|
name: "DayDatepicker",
|
|
6337
6621
|
group: "DayDatepicker",
|
|
@@ -9062,8 +9346,8 @@ var components_generated_default = {
|
|
|
9062
9346
|
var stories_generated_default = {
|
|
9063
9347
|
source: "packages/base/src/components (each *.stories.tsx)",
|
|
9064
9348
|
importFrom: "@shoplflow/base",
|
|
9065
|
-
count:
|
|
9066
|
-
exampleCount:
|
|
9349
|
+
count: 43,
|
|
9350
|
+
exampleCount: 155,
|
|
9067
9351
|
modules: [
|
|
9068
9352
|
{
|
|
9069
9353
|
name: "AnnualDatepicker",
|
|
@@ -9248,6 +9532,38 @@ var stories_generated_default = {
|
|
|
9248
9532
|
}
|
|
9249
9533
|
]
|
|
9250
9534
|
},
|
|
9535
|
+
{
|
|
9536
|
+
name: "Combobox",
|
|
9537
|
+
group: "Combobox",
|
|
9538
|
+
title: "COMPONENTS/Comboboxs/Combobox",
|
|
9539
|
+
importFrom: "@shoplflow/base",
|
|
9540
|
+
examples: [
|
|
9541
|
+
{
|
|
9542
|
+
story: "Playground",
|
|
9543
|
+
code: "<Stack>\n <Combobox\n {...componentProps}\n items={resolvedItems}\n value={value}\n onChange={handleChange}\n tag={showTag ? <Text typography='caption_700'>\uB2E8\uC704</Text> : tag}\n />\n </Stack>"
|
|
9544
|
+
},
|
|
9545
|
+
{
|
|
9546
|
+
story: "Disabled",
|
|
9547
|
+
code: "<Stack>\n <Combobox {...args} items={TEXT_ITEMS} value='Option A' disabled />\n </Stack>"
|
|
9548
|
+
},
|
|
9549
|
+
{
|
|
9550
|
+
story: "Error",
|
|
9551
|
+
code: "<Stack>\n <Combobox {...args} items={TEXT_ITEMS} value='Option A' isError />\n </Stack>"
|
|
9552
|
+
},
|
|
9553
|
+
{
|
|
9554
|
+
story: "TextAlign",
|
|
9555
|
+
code: "<Stack.Horizontal spacing='spacing12'>\n <Combobox {...args} items={TEXT_ITEMS} value='Option A' textAlign='left' />\n <Combobox {...args} items={TEXT_ITEMS} value='Option A' textAlign='right' />\n </Stack.Horizontal>"
|
|
9556
|
+
},
|
|
9557
|
+
{
|
|
9558
|
+
story: "Numeric",
|
|
9559
|
+
code: "<Stack>\n <Combobox\n {...args}\n items={NUMBER_ITEMS}\n inputMode='numeric'\n value={value}\n onChange={setValue}\n onSelect={setValue}\n />\n </Stack>"
|
|
9560
|
+
},
|
|
9561
|
+
{
|
|
9562
|
+
story: "WithTag",
|
|
9563
|
+
code: "<Stack.Horizontal spacing='spacing12'>\n <Combobox\n {...args}\n items={NUMBER_ITEMS}\n inputMode='numeric'\n value={hours}\n onChange={setHours}\n onSelect={setHours}\n tag={<Text typography='caption_700'>\uC2DC\uAC04</Text>}\n />\n <Combobox\n {...args}\n items={NUMBER_ITEMS}\n inputMode='numeric'\n value={minutes}\n onChange={setMinutes}\n onSelect={setMinutes}\n tag={<Text typography='caption_700'>\uBD84</Text>}\n />\n </Stack.Horizontal>"
|
|
9564
|
+
}
|
|
9565
|
+
]
|
|
9566
|
+
},
|
|
9251
9567
|
{
|
|
9252
9568
|
name: "DayDatepicker",
|
|
9253
9569
|
group: "DayDatepicker",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplflow/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Model Context Protocol server exposing the shoplflow design system (tokens, components, icons) to AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -27,18 +27,37 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
+
"//scripts": [
|
|
31
|
+
"build:package MUST keep `generate:metadata &&` at the front. It is what guarantees the",
|
|
32
|
+
"published bundle can never carry stale design-system metadata — there is no build path",
|
|
33
|
+
"that skips extraction. Verified by `check:wiring`.",
|
|
34
|
+
"ensure:changeset is what republishes mcp when base/assets release — changesets will not.",
|
|
35
|
+
"The root `version` script MUST run it before `changeset version`. Verified by `check:wiring`."
|
|
36
|
+
],
|
|
30
37
|
"dependencies": {
|
|
31
38
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
32
39
|
"zod": "^3.23.8"
|
|
33
40
|
},
|
|
41
|
+
"//devDependencies": [
|
|
42
|
+
"DO NOT REMOVE the three @shoplflow/* workspace deps below just because nothing imports them.",
|
|
43
|
+
"They are not runtime deps — turbo reads them to order `build:package` after base/assets",
|
|
44
|
+
"have built, so the extractors see the current icon barrels.",
|
|
45
|
+
"They do NOT make changesets bump mcp: a devDependency-only dependent resolves to `none`,",
|
|
46
|
+
"even with updateInternalDependents: always. The base -> mcp republish is done by",
|
|
47
|
+
"`ensure:changeset` (scripts/ensure-release-changeset.cjs) instead.",
|
|
48
|
+
"Removing them breaks NOTHING visibly: extraction still works (scripts read ../../base/src",
|
|
49
|
+
"by relative path) and the build still passes, but mcp may bundle stale icon metadata.",
|
|
50
|
+
"Guarded by `pnpm check:wiring`. See 아키텍쳐.md section 6."
|
|
51
|
+
],
|
|
34
52
|
"devDependencies": {
|
|
53
|
+
"@changesets/get-release-plan": "^4.0.14",
|
|
35
54
|
"@types/node": "^22.0.0",
|
|
36
55
|
"ts-morph": "^24.0.0",
|
|
37
56
|
"tsup": "7.2.0",
|
|
38
57
|
"typescript": "6.0.3",
|
|
39
|
-
"@shoplflow/
|
|
40
|
-
"@shoplflow/
|
|
41
|
-
"@shoplflow/
|
|
58
|
+
"@shoplflow/shopl-assets": "0.12.54",
|
|
59
|
+
"@shoplflow/base": "0.49.2",
|
|
60
|
+
"@shoplflow/hada-assets": "0.1.12"
|
|
42
61
|
},
|
|
43
62
|
"repository": {
|
|
44
63
|
"type": "git",
|
|
@@ -54,6 +73,8 @@
|
|
|
54
73
|
"build:package": "pnpm generate:metadata && rm -rf dist/ && tsup",
|
|
55
74
|
"dev": "pnpm generate:metadata && tsup --watch",
|
|
56
75
|
"start": "node dist/index.js",
|
|
76
|
+
"check:wiring": "node scripts/check-release-wiring.cjs",
|
|
77
|
+
"ensure:changeset": "node scripts/ensure-release-changeset.cjs",
|
|
57
78
|
"type-check": "tsc --noEmit || true"
|
|
58
79
|
}
|
|
59
80
|
}
|