palette-mcp 1.0.0 → 1.1.0

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.
Files changed (84) hide show
  1. package/dist/components/OrderManagementGuide.d.ts +6 -0
  2. package/dist/components/OrderManagementGuide.js +266 -0
  3. package/dist/index-simple.d.ts +2 -0
  4. package/dist/index-simple.js +139 -0
  5. package/dist/index.d.ts +6 -0
  6. package/dist/index.js +16 -226
  7. package/dist/requests/1762927928451-ajgna9b/SomaComponent.html +63 -0
  8. package/dist/requests/1762927928451-ajgna9b/SomaComponent.tsx +913 -0
  9. package/dist/requests/1762927928451-ajgna9b/metadata.json +9 -0
  10. package/dist/requests/1762931214963-cqlwvxn/SomaComponent.html +63 -0
  11. package/dist/requests/1762931214963-cqlwvxn/SomaComponent.tsx +525 -0
  12. package/dist/requests/1762931214963-cqlwvxn/metadata.json +9 -0
  13. package/dist/requests/1762932805663-m5wkk3a/SomaComponent.html +248 -0
  14. package/dist/requests/1762932805663-m5wkk3a/SomaComponent.tsx +1050 -0
  15. package/dist/requests/1762932805663-m5wkk3a/metadata.json +9 -0
  16. package/dist/requests/1762934645710-b67ldow/SomaComponent.html +193 -0
  17. package/dist/requests/1762934645710-b67ldow/SomaComponent.tsx +307 -0
  18. package/dist/requests/1762934645710-b67ldow/metadata.json +9 -0
  19. package/dist/requests/1762934961257-wwnmpvx/SomaComponent.html +193 -0
  20. package/dist/requests/1762934961257-wwnmpvx/SomaComponent.tsx +932 -0
  21. package/dist/requests/1762934961257-wwnmpvx/metadata.json +9 -0
  22. package/dist/requests/1762935126549-yjdcezr/SomaComponent.html +193 -0
  23. package/dist/requests/1762935126549-yjdcezr/SomaComponent.tsx +847 -0
  24. package/dist/requests/1762935126549-yjdcezr/metadata.json +9 -0
  25. package/dist/requests/1762935353759-fuokdeu/SomaComponent.html +193 -0
  26. package/dist/requests/1762935353759-fuokdeu/SomaComponent.tsx +334 -0
  27. package/dist/requests/1762935353759-fuokdeu/metadata.json +9 -0
  28. package/dist/requests/1762935378891-ckwbabn/SomaComponent.html +193 -0
  29. package/dist/requests/1762935378891-ckwbabn/SomaComponent.tsx +256 -0
  30. package/dist/requests/1762935378891-ckwbabn/metadata.json +9 -0
  31. package/dist/requests/1762935418352-181zqu4/SomaComponent.html +193 -0
  32. package/dist/requests/1762935418352-181zqu4/SomaComponent.tsx +45 -0
  33. package/dist/requests/1762935418352-181zqu4/metadata.json +9 -0
  34. package/dist/requests/1762935438157-vzkcbwy/SomaComponent.html +193 -0
  35. package/dist/requests/1762935438157-vzkcbwy/SomaComponent.tsx +238 -0
  36. package/dist/requests/1762935438157-vzkcbwy/metadata.json +9 -0
  37. package/dist/requests/1762935529749-ukzmiu3/SomaComponent.html +193 -0
  38. package/dist/requests/1762935529749-ukzmiu3/SomaComponent.tsx +138 -0
  39. package/dist/requests/1762935529749-ukzmiu3/metadata.json +9 -0
  40. package/dist/requests/1762935556527-jxelwj4/SomaComponent.html +193 -0
  41. package/dist/requests/1762935556527-jxelwj4/SomaComponent.tsx +138 -0
  42. package/dist/requests/1762935556527-jxelwj4/metadata.json +9 -0
  43. package/dist/requests/1762935579673-g39fqly/SomaComponent.html +193 -0
  44. package/dist/requests/1762935579673-g39fqly/SomaComponent.tsx +138 -0
  45. package/dist/requests/1762935579673-g39fqly/metadata.json +9 -0
  46. package/dist/requests/1762935613556-ogvsekd/SomaComponent.html +193 -0
  47. package/dist/requests/1762935613556-ogvsekd/SomaComponent.tsx +150 -0
  48. package/dist/requests/1762935613556-ogvsekd/metadata.json +9 -0
  49. package/dist/requests/1762935943631-hb2drgf/SomaComponent.html +193 -0
  50. package/dist/requests/1762935943631-hb2drgf/SomaComponent.tsx +150 -0
  51. package/dist/requests/1762935943631-hb2drgf/metadata.json +9 -0
  52. package/dist/requests/1762935954110-m7jb9m7/SomaComponent.html +193 -0
  53. package/dist/requests/1762935954110-m7jb9m7/SomaComponent.tsx +150 -0
  54. package/dist/requests/1762935954110-m7jb9m7/metadata.json +9 -0
  55. package/dist/requests/1762936003095-0jnmlga/SomaComponent.html +193 -0
  56. package/dist/requests/1762936003095-0jnmlga/SomaComponent.tsx +150 -0
  57. package/dist/requests/1762936003095-0jnmlga/metadata.json +9 -0
  58. package/dist/requests/1762937044748-7ubrrua/SomaComponent.html +193 -0
  59. package/dist/requests/1762937044748-7ubrrua/SomaComponent.tsx +138 -0
  60. package/dist/requests/1762937044748-7ubrrua/metadata.json +9 -0
  61. package/dist/server.d.ts +18 -0
  62. package/dist/server.js +246 -0
  63. package/dist/smithery.d.ts +50 -0
  64. package/dist/smithery.js +44 -0
  65. package/dist/test-figma-tools.d.ts +2 -0
  66. package/dist/test-figma-tools.js +55 -0
  67. package/dist/test-mcp-servers.d.ts +2 -0
  68. package/dist/test-mcp-servers.js +166 -0
  69. package/dist/test.d.ts +2 -0
  70. package/dist/test.js +76 -0
  71. package/package.json +4 -5
  72. package/smithery.yaml +8 -57
  73. package/src/components/OrderManagementGuide.tsx +459 -0
  74. package/src/index.ts +43 -0
  75. package/src/server.ts +301 -0
  76. package/src/services/code-generator.ts +1330 -0
  77. package/src/services/design-system.ts +2133 -0
  78. package/src/services/figma.ts +422 -0
  79. package/src/smithery.ts +54 -0
  80. package/src/test-figma-tools.ts +72 -0
  81. package/src/test-mcp-servers.ts +180 -0
  82. package/src/test.ts +89 -0
  83. package/src/utils/figma-mcp-client.ts +193 -0
  84. package/src/utils/request-manager.ts +101 -0
@@ -0,0 +1,459 @@
1
+ import React from 'react';
2
+ // Design System 컴포넌트 import
3
+ import { Button } from '@dealicious/design-system-react/src/components/ssm-button';
4
+ import { Check } from '@dealicious/design-system-react/src/components/ssm-check';
5
+ import { Chip } from '@dealicious/design-system-react/src/components/ssm-chip';
6
+ import { Tag } from '@dealicious/design-system-react/src/components/ssm-tag';
7
+ import { Text } from '@dealicious/design-system-react/src/components/ssm-text';
8
+ import { Dropdown } from '@dealicious/design-system-react/src/components/ssm-dropdown';
9
+ import { Icon } from '@dealicious/design-system-react/src/components/ssm-icon';
10
+
11
+ // 이미지 상수 정의
12
+ const imgComThumb80X80 = "http://localhost:3845/assets/a23a50ac4b0c21068425b9fbad7b10871c10708b.png";
13
+ const imgComThumb80X81 = "http://localhost:3845/assets/e7dd647a3f3a4b3b8333554648daac78edc8f0a8.png";
14
+ const imgComThumb80X82 = "http://localhost:3845/assets/428b26e10d3dccc7b39edb320853f5a5a9343bc7.png";
15
+ const imgComThumb80X83 = "http://localhost:3845/assets/2d8cebb7a930eb4beb026cf183bb70f432d00fe8.png";
16
+ const imgComThumb80X84 = "http://localhost:3845/assets/04789514f16aa28956a4a0c7d58b66d0ad9d03a6.png";
17
+ const imgComThumb80X85 = "http://localhost:3845/assets/ec6280d9d0c6cf7bd10ca6ba39cf132d15790a08.png";
18
+ const imgComThumb80X86 = "http://localhost:3845/assets/6006ff448e6770595c456de983e6af596bc9ecf2.png";
19
+ const imgComThumb80X87 = "http://localhost:3845/assets/5c335464e980f216e60ce1339fc1da90325ddce8.png";
20
+ const imgComThumb80X88 = "http://localhost:3845/assets/d06db60f0ce3d1a8a913812f3a977e24895e72ef.png";
21
+ const imgComThumb80X89 = "http://localhost:3845/assets/cf9069016fa2f8e1515a0dbabfe7fd88cb5c1d5a.png";
22
+ const imgComThumb80X90 = "http://localhost:3845/assets/fe4632a583f8225edd00b4ca191577b33eafbeff.png";
23
+ const imgComThumb80X91 = "http://localhost:3845/assets/daf12b453c04aa7032b812bba199d0d9a71fae1f.png";
24
+ const imgComThumb80X92 = "http://localhost:3845/assets/b226fd351bdd04b5dd222a331275c7cd2650b4a5.png";
25
+ const img = "http://localhost:3845/assets/f6843e9d48c5f4efce619a1dd1a4ac585682c746.svg";
26
+ const img1 = "http://localhost:3845/assets/cfdcad20a987a42a3a82975b10558672c6989679.svg";
27
+ const img2 = "http://localhost:3845/assets/02fb25fdf55c3329cb12788dda06eb81c93a6c97.svg";
28
+ const img3 = "http://localhost:3845/assets/a996cd8d306819476ae2b46cf48c5b05582487a0.svg";
29
+ const img4 = "http://localhost:3845/assets/9fc03fee616256d57ccf3c58c9348e5a2995aeb2.svg";
30
+ const img5 = "http://localhost:3845/assets/f9c30996c34ac82743f76638e5ffa7124a4fcac3.svg";
31
+ const img6 = "http://localhost:3845/assets/2e89ee11cc0020affd12b24169b5a1c75f41b507.svg";
32
+
33
+ /**
34
+ * 주문 관리 안내 컴포넌트
35
+ * 주문관리 화면에서 매장주문을 더욱 쉽게 확인하고 관리할 수 있도록 안내하는 모달 컴포넌트
36
+ * Design System 컴포넌트를 사용하여 구현
37
+ */
38
+ export default function OrderManagementGuide() {
39
+ const [dontShowAgain, setDontShowAgain] = React.useState(false);
40
+
41
+ // 필터 옵션
42
+ const orderStatusOptions = [
43
+ { value: 'all', label: '전체' },
44
+ { value: 'received', label: '주문접수' },
45
+ { value: 'processing', label: '처리중' },
46
+ { value: 'completed', label: '완료' },
47
+ ];
48
+
49
+ const periodOptions = [
50
+ { value: '1month', label: '1개월' },
51
+ { value: '3months', label: '3개월' },
52
+ { value: '6months', label: '6개월' },
53
+ { value: '1year', label: '1년' },
54
+ ];
55
+
56
+ return (
57
+ <div style={{
58
+ backgroundColor: '#ffffff',
59
+ display: 'flex',
60
+ flexDirection: 'column',
61
+ alignItems: 'flex-start',
62
+ borderRadius: '10px',
63
+ width: '100%',
64
+ maxWidth: '360px'
65
+ }}>
66
+ {/* 헤더 섹션 */}
67
+ <div style={{
68
+ backgroundColor: '#ffffff',
69
+ display: 'flex',
70
+ gap: '16px',
71
+ alignItems: 'center',
72
+ padding: '20px',
73
+ borderTopLeftRadius: '10px',
74
+ borderTopRightRadius: '10px',
75
+ width: '100%'
76
+ }}>
77
+ <Text variant="heading" size="large">
78
+ 주문 관리 안내
79
+ </Text>
80
+ </div>
81
+
82
+ {/* 메인 콘텐츠 섹션 */}
83
+ <div style={{
84
+ display: 'flex',
85
+ flexDirection: 'column',
86
+ gap: '8px',
87
+ alignItems: 'center',
88
+ padding: '4px 16px 24px 16px',
89
+ width: '100%'
90
+ }}>
91
+ {/* 설명 텍스트 */}
92
+ <div style={{
93
+ display: 'flex',
94
+ gap: '8px',
95
+ alignItems: 'flex-start',
96
+ width: '100%'
97
+ }}>
98
+ <div style={{ height: '18px', width: '3px' }}>
99
+ <img alt="" src={img} style={{ width: '100%', height: '100%' }} />
100
+ </div>
101
+ <Text variant="body" size="small" color="#686e7b">
102
+ 주문관리 화면에서 매장주문을 더욱 쉽게 확인하고 관리할 수 있어요.
103
+ </Text>
104
+ </div>
105
+
106
+ {/* 주문 관리 인터페이스 카드 */}
107
+ <div style={{
108
+ backgroundColor: '#f5f6fb',
109
+ display: 'flex',
110
+ flexDirection: 'column',
111
+ alignItems: 'center',
112
+ justifyContent: 'center',
113
+ padding: '16px 12px',
114
+ borderRadius: '6px',
115
+ width: '100%'
116
+ }}>
117
+ <div style={{
118
+ backgroundColor: '#ffffff',
119
+ display: 'flex',
120
+ flexDirection: 'column',
121
+ alignItems: 'center',
122
+ borderRadius: '6px',
123
+ width: '100%'
124
+ }}>
125
+ {/* 상단 필터 바 */}
126
+ <div style={{
127
+ display: 'flex',
128
+ flexDirection: 'column',
129
+ alignItems: 'flex-start',
130
+ width: '100%'
131
+ }}>
132
+ <div style={{
133
+ backgroundColor: '#ffffff',
134
+ display: 'flex',
135
+ flexDirection: 'column',
136
+ alignItems: 'flex-start',
137
+ width: '100%'
138
+ }}>
139
+ <div style={{
140
+ display: 'flex',
141
+ gap: '2.5px',
142
+ alignItems: 'center',
143
+ padding: '7.5px 10px',
144
+ width: '100%'
145
+ }}>
146
+ <div style={{
147
+ display: 'flex',
148
+ gap: '2.5px',
149
+ alignItems: 'center',
150
+ flex: 1
151
+ }}>
152
+ {/* 주문상태 필터 - Chip 컴포넌트 사용 */}
153
+ <Chip variant="outlined" size="small">
154
+ 주문상태
155
+ <Icon name="arrow-down" size="small" />
156
+ </Chip>
157
+ {/* 기간 필터 - Chip 컴포넌트 사용 */}
158
+ <Chip variant="outlined" size="small">
159
+ 3개월
160
+ <Icon name="arrow-down" size="small" />
161
+ </Chip>
162
+ </div>
163
+ {/* 필터 아이콘 */}
164
+ <Chip variant="outlined" size="small">
165
+ <Icon name="filter" size="small" />
166
+ </Chip>
167
+ </div>
168
+ <div style={{
169
+ backgroundColor: '#ebeef6',
170
+ height: '1px',
171
+ width: '100%'
172
+ }} />
173
+ </div>
174
+ {/* 섹션 헤더 */}
175
+ <div style={{
176
+ display: 'flex',
177
+ gap: '5px',
178
+ alignItems: 'flex-start',
179
+ padding: '8.8px 9.4px',
180
+ width: '100%'
181
+ }}>
182
+ <Text variant="body" size="small">
183
+ 거래완료 요청
184
+ </Text>
185
+ <Text variant="heading" size="small">
186
+ 3
187
+ </Text>
188
+ </div>
189
+ </div>
190
+
191
+ {/* 주문 목록 */}
192
+ <div style={{
193
+ display: 'flex',
194
+ flexDirection: 'column',
195
+ alignItems: 'center',
196
+ width: '100%'
197
+ }}>
198
+ <div style={{
199
+ backgroundColor: '#ebeef6',
200
+ height: '1px',
201
+ width: '100%'
202
+ }} />
203
+
204
+ {/* 첫 번째 주문 항목 */}
205
+ <div style={{
206
+ display: 'flex',
207
+ flexDirection: 'column',
208
+ gap: '10px',
209
+ alignItems: 'flex-start',
210
+ padding: '10px',
211
+ width: '100%'
212
+ }}>
213
+ <div style={{
214
+ display: 'flex',
215
+ flexDirection: 'column',
216
+ gap: '7.5px',
217
+ alignItems: 'flex-start',
218
+ width: '100%'
219
+ }}>
220
+ {/* 상태 태그 - Tag 컴포넌트 사용 */}
221
+ <div style={{
222
+ display: 'flex',
223
+ gap: '2.5px',
224
+ alignItems: 'center'
225
+ }}>
226
+ <Tag variant="error" size="small">주문접수</Tag>
227
+ <Tag variant="default" size="small">사입사 방문</Tag>
228
+ <Tag variant="default" size="small">현장 결제</Tag>
229
+ </div>
230
+
231
+ {/* 주문 정보 */}
232
+ <div style={{
233
+ display: 'flex',
234
+ gap: '7.5px',
235
+ alignItems: 'center',
236
+ width: '100%'
237
+ }}>
238
+ {/* 상품 썸네일 */}
239
+ <div style={{
240
+ border: '0.3px solid rgba(0,0,0,0.05)',
241
+ borderRadius: '6px',
242
+ width: '45px',
243
+ height: '45px',
244
+ position: 'relative'
245
+ }}>
246
+ <img
247
+ alt="상품 이미지"
248
+ src={imgComThumb80X80}
249
+ style={{
250
+ width: '100%',
251
+ height: '100%',
252
+ objectFit: 'cover',
253
+ borderRadius: '6px'
254
+ }}
255
+ />
256
+ </div>
257
+ {/* 상품 상세 정보 */}
258
+ <div style={{
259
+ display: 'flex',
260
+ flexDirection: 'column',
261
+ gap: '5px',
262
+ flex: 1
263
+ }}>
264
+ <div style={{
265
+ display: 'flex',
266
+ flexDirection: 'column',
267
+ gap: '1.3px'
268
+ }}>
269
+ <Text variant="heading" size="small">
270
+ 신상플래닛
271
+ </Text>
272
+ <Text variant="body" size="small" color="#686e7b">
273
+ 베스트 검정 니트
274
+ </Text>
275
+ </div>
276
+ {/* 가격 정보 */}
277
+ <div style={{
278
+ display: 'flex',
279
+ alignItems: 'center',
280
+ gap: '2.5px'
281
+ }}>
282
+ <Text variant="heading" size="small">
283
+ ₩30,000
284
+ </Text>
285
+ <div style={{ display: 'flex', gap: '2.5px', alignItems: 'center' }}>
286
+ <img alt="" src={img4} style={{ width: '16px', height: '16px' }} />
287
+ <img alt="" src={img5} style={{ width: '16px', height: '16px' }} />
288
+ </div>
289
+ </div>
290
+ </div>
291
+ </div>
292
+ </div>
293
+ {/* 주문 취소 버튼 - Button 컴포넌트 사용 */}
294
+ <Button variant="secondary" size="medium" style={{ width: '100%' }}>
295
+ 주문취소
296
+ </Button>
297
+ </div>
298
+
299
+ {/* 구분선 */}
300
+ <div style={{
301
+ backgroundColor: '#ebeef6',
302
+ height: '1px',
303
+ width: '100%'
304
+ }} />
305
+
306
+ {/* 두 번째 주문 항목 */}
307
+ <div style={{
308
+ display: 'flex',
309
+ flexDirection: 'column',
310
+ gap: '10px',
311
+ alignItems: 'flex-start',
312
+ padding: '10px',
313
+ width: '100%'
314
+ }}>
315
+ <div style={{
316
+ display: 'flex',
317
+ flexDirection: 'column',
318
+ gap: '7.5px',
319
+ alignItems: 'flex-start',
320
+ width: '100%'
321
+ }}>
322
+ {/* 상태 태그 - Tag 컴포넌트 사용 */}
323
+ <div style={{
324
+ display: 'flex',
325
+ gap: '2.5px',
326
+ alignItems: 'center'
327
+ }}>
328
+ <Tag variant="warning" size="small">포장완료</Tag>
329
+ <Tag variant="default" size="small">직접 수령</Tag>
330
+ <Tag variant="default" size="small">현장 결제</Tag>
331
+ </div>
332
+
333
+ {/* 주문 정보 */}
334
+ <div style={{
335
+ display: 'flex',
336
+ gap: '7.5px',
337
+ alignItems: 'center',
338
+ width: '100%'
339
+ }}>
340
+ {/* 상품 썸네일 */}
341
+ <div style={{
342
+ border: '0.3px solid rgba(0,0,0,0.05)',
343
+ borderRadius: '6px',
344
+ width: '45px',
345
+ height: '45px',
346
+ position: 'relative'
347
+ }}>
348
+ <img
349
+ alt="상품 이미지"
350
+ src={imgComThumb80X80}
351
+ style={{
352
+ width: '100%',
353
+ height: '100%',
354
+ objectFit: 'cover',
355
+ borderRadius: '6px'
356
+ }}
357
+ />
358
+ </div>
359
+ {/* 상품 상세 정보 */}
360
+ <div style={{
361
+ display: 'flex',
362
+ flexDirection: 'column',
363
+ gap: '5px',
364
+ flex: 1
365
+ }}>
366
+ <div style={{
367
+ display: 'flex',
368
+ flexDirection: 'column',
369
+ gap: '1.3px'
370
+ }}>
371
+ <div style={{ display: 'flex', gap: '2.5px', alignItems: 'center' }}>
372
+ <Text variant="heading" size="small">
373
+ 신상랩
374
+ </Text>
375
+ <div style={{
376
+ backgroundColor: '#fb4760',
377
+ borderRadius: '11px',
378
+ width: '6px',
379
+ height: '6px',
380
+ display: 'flex',
381
+ alignItems: 'center',
382
+ justifyContent: 'center'
383
+ }}>
384
+ <img alt="" src={img6} style={{ width: '4px', height: '4px' }} />
385
+ </div>
386
+ </div>
387
+ <Text variant="body" size="small" color="#686e7b">
388
+ 데일리 티셔츠 외 2건
389
+ </Text>
390
+ </div>
391
+ {/* 가격 정보 */}
392
+ <div style={{
393
+ display: 'flex',
394
+ alignItems: 'center',
395
+ gap: '2.5px'
396
+ }}>
397
+ <Text variant="heading" size="small">
398
+ ₩56,000
399
+ </Text>
400
+ <div style={{ display: 'flex', gap: '2.5px', alignItems: 'center' }}>
401
+ <img alt="" src={img4} style={{ width: '16px', height: '16px' }} />
402
+ <img alt="" src={img5} style={{ width: '16px', height: '16px' }} />
403
+ </div>
404
+ </div>
405
+ </div>
406
+ </div>
407
+ </div>
408
+ </div>
409
+ </div>
410
+ </div>
411
+ </div>
412
+
413
+ {/* 다시 보지 않기 체크박스 - Check 컴포넌트 사용 */}
414
+ <div style={{
415
+ display: 'flex',
416
+ gap: '4px',
417
+ alignItems: 'flex-start',
418
+ width: '100%'
419
+ }}>
420
+ <Check
421
+ checked={dontShowAgain}
422
+ onChange={(checked: boolean) => setDontShowAgain(checked)}
423
+ label="다시 보지 않기"
424
+ />
425
+ </div>
426
+ </div>
427
+
428
+ {/* 하단 버튼 섹션 */}
429
+ <div style={{
430
+ backgroundColor: '#ffffff',
431
+ display: 'flex',
432
+ flexDirection: 'column',
433
+ alignItems: 'flex-start',
434
+ borderBottomLeftRadius: '10px',
435
+ borderBottomRightRadius: '10px',
436
+ width: '100%'
437
+ }}>
438
+ <div style={{
439
+ backgroundColor: '#ebeef6',
440
+ height: '1px',
441
+ width: '100%'
442
+ }} />
443
+ <div style={{
444
+ display: 'flex',
445
+ gap: '8px',
446
+ alignItems: 'center',
447
+ justifyContent: 'center',
448
+ padding: '20px',
449
+ width: '100%'
450
+ }}>
451
+ {/* 확인 버튼 - Button 컴포넌트 사용 */}
452
+ <Button variant="primary" size="medium" style={{ flex: 1 }}>
453
+ 확인
454
+ </Button>
455
+ </div>
456
+ </div>
457
+ </div>
458
+ );
459
+ }
package/src/index.ts ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Palette MCP Server - Local 실행 모드
5
+ *
6
+ * npx palette-mcp 또는 직접 실행 시 사용됩니다.
7
+ * stdio transport를 사용하여 MCP 클라이언트와 통신합니다.
8
+ */
9
+
10
+ // .env 파일 로드
11
+ import dotenv from 'dotenv';
12
+ import { fileURLToPath } from 'url';
13
+ import { dirname, join } from 'path';
14
+
15
+ const __filename = fileURLToPath(import.meta.url);
16
+ const __dirname = dirname(__filename);
17
+
18
+ // 프로젝트 루트의 .env 파일 로드
19
+ dotenv.config({ path: join(__dirname, '..', '.env') });
20
+
21
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
22
+ import { createPaletteServer } from './server.js';
23
+
24
+ // 서버 시작 (Local 모드)
25
+ async function main() {
26
+ // 환경변수에서 설정 읽기
27
+ const server = createPaletteServer({
28
+ figmaAccessToken: process.env.FIGMA_ACCESS_TOKEN,
29
+ githubToken: process.env.GITHUB_TOKEN,
30
+ figmaMcpServerUrl: process.env.FIGMA_MCP_SERVER_URL,
31
+ });
32
+
33
+ // stdio transport로 연결
34
+ const transport = new StdioServerTransport();
35
+ await server.connect(transport);
36
+
37
+ console.error('Palette server running on stdio (Local mode)');
38
+ }
39
+
40
+ main().catch((error) => {
41
+ console.error('Server error:', error);
42
+ process.exit(1);
43
+ });