syr-d2c-workflow-mcp 0.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.
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # SYR D2C Workflow MCP
2
+
3
+ Figma 디자인을 프로덕션 레디 컴포넌트로 변환하는 워크플로우 MCP 서버입니다.
4
+
5
+ ## 기능
6
+
7
+ - 🎯 **의존성 사전 검사**: figma-mcp, playwright-mcp 설치 여부 확인 및 가이드
8
+ - 📋 **규칙 관리**: 여러 규칙 파일을 통합하여 로드
9
+ - 🔍 **컴포넌트 검증**: 생성된 코드가 규칙에 맞는지 검증
10
+ - 📊 **디자인 비교**: 원본 디자인과 렌더링 결과 비교
11
+ - 🎨 **템플릿 생성**: React/Vue/Svelte 보일러플레이트 생성
12
+ - 📚 **워크플로우 가이드**: 전체 D2C 프로세스를 안내하는 프롬프트
13
+
14
+ ## 설치
15
+
16
+ ### 사용처에서 설치
17
+
18
+ ```json
19
+ // .vscode/mcp.json
20
+ {
21
+ "servers": {
22
+ "d2c": {
23
+ "command": "npx",
24
+ "args": ["syr-d2c-workflow-mcp"],
25
+ "env": {
26
+ "RULES_PATHS": "./docs/standards.md,./rules/components.md",
27
+ "RULES_GLOB": "**/*-rules.md"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ ### 함께 필요한 MCP들
35
+
36
+ ```json
37
+ {
38
+ "servers": {
39
+ "d2c": {
40
+ "command": "npx",
41
+ "args": ["syr-d2c-workflow-mcp"]
42
+ },
43
+ "figma": {
44
+ "command": "npx",
45
+ "args": ["-y", "figma-developer-mcp", "--stdio"]
46
+ },
47
+ "playwright": {
48
+ "command": "npx",
49
+ "args": ["@anthropic/mcp-playwright"]
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## 환경 변수
56
+
57
+ | 변수 | 설명 | 예시 |
58
+ |------|------|------|
59
+ | `RULES_PATHS` | 쉼표로 구분된 규칙 파일 경로들 | `./docs/a.md,./rules/b.md` |
60
+ | `RULES_GLOB` | 규칙 파일 glob 패턴 | `**/*-standards.md` |
61
+ | `D2C_CONFIG_PATH` | 설정 파일 경로 | `./d2c.config.json` |
62
+
63
+ ### 설정 파일 예시
64
+
65
+ ```json
66
+ // d2c.config.json
67
+ {
68
+ "rules": [
69
+ "./docs/design-standards.md",
70
+ "./rules/component-rules.md",
71
+ ".cursor/rules/*.md"
72
+ ]
73
+ }
74
+ ```
75
+
76
+ ## 트리거 키워드
77
+
78
+ AI가 다음 키워드를 감지하면 이 MCP를 사용합니다:
79
+
80
+ - `syr`, `syr-d2c`, `d2cmcp`, `d2c mcp`
81
+ - "디자인 투 코드", "design to code", "figma 변환"
82
+ - "컴포넌트로 만들어줘", "코드로 변환해줘"
83
+
84
+ ### 사용 예시
85
+
86
+ ```
87
+ "syr로 이 Figma 변환해줘"
88
+ "d2c mcp로 컴포넌트 만들어줘"
89
+ "이 디자인을 코드로 변환해줘"
90
+ ```
91
+
92
+ ## 제공 도구 (Tools)
93
+
94
+ ### `d2c_preflight_check`
95
+ 워크플로우 실행 전 필수 의존성을 확인합니다.
96
+
97
+ ### `d2c_get_design_rules`
98
+ 설정된 경로들에서 디자인 규칙을 수집합니다.
99
+
100
+ ```typescript
101
+ {
102
+ customRules?: string; // 추가 규칙
103
+ includeDefaults?: boolean; // 기본 규칙 포함 (기본: true)
104
+ }
105
+ ```
106
+
107
+ ### `d2c_validate_component`
108
+ 생성된 컴포넌트가 규칙에 맞는지 검증합니다.
109
+
110
+ ```typescript
111
+ {
112
+ code: string; // 검증할 코드
113
+ componentName: string; // 컴포넌트 이름
114
+ rules?: string; // 적용할 규칙
115
+ }
116
+ ```
117
+
118
+ ### `d2c_compare_with_design`
119
+ Figma 디자인과 렌더링 결과를 비교 분석합니다.
120
+
121
+ ```typescript
122
+ {
123
+ designDescription: string; // 원본 디자인 설명
124
+ renderedDescription: string; // 렌더링 결과 설명
125
+ differences?: string[]; // 발견된 차이점
126
+ }
127
+ ```
128
+
129
+ ### `d2c_get_component_template`
130
+ 규칙에 맞는 컴포넌트 템플릿을 생성합니다.
131
+
132
+ ```typescript
133
+ {
134
+ componentName: string; // 컴포넌트 이름
135
+ framework?: "react" | "vue" | "svelte"; // 프레임워크
136
+ props?: PropDefinition[]; // Props 정의
137
+ hasChildren?: boolean; // children 포함 여부
138
+ }
139
+ ```
140
+
141
+ ## 제공 프롬프트 (Prompts)
142
+
143
+ ### `design_to_code`
144
+ 전체 D2C 워크플로우를 단계별로 안내합니다:
145
+
146
+ 1. 사전 검사 (의존성 확인)
147
+ 2. 규칙 수집
148
+ 3. Figma 디자인 가져오기
149
+ 4. 컴포넌트 생성
150
+ 5. 검증
151
+ 6. 렌더링 확인 (반복)
152
+ 7. 완료
153
+
154
+ ## 제공 리소스 (Resources)
155
+
156
+ - `d2c://rules/default` - 기본 디자인 규칙
157
+ - `d2c://templates/react` - React 컴포넌트 템플릿
158
+
159
+ ## 워크플로우
160
+
161
+ ```mermaid
162
+ sequenceDiagram
163
+ participant User as 사용자
164
+ participant AI as AI Agent
165
+ participant D2C as syr-d2c-workflow-mcp
166
+ participant Figma as figma-mcp
167
+ participant PW as playwright-mcp
168
+
169
+ User->>AI: "syr로 이 Figma 변환해줘"
170
+
171
+ AI->>D2C: d2c_preflight_check()
172
+ AI->>Figma: get_design_context() 확인
173
+ AI->>PW: browser_snapshot() 확인
174
+
175
+ AI->>D2C: d2c_get_design_rules()
176
+ AI->>Figma: get_design_context(figmaUrl)
177
+ AI->>Figma: get_screenshot()
178
+
179
+ AI->>D2C: d2c_get_component_template()
180
+ AI->>AI: 코드 생성
181
+ AI->>D2C: d2c_validate_component()
182
+
183
+ loop 완성될 때까지
184
+ AI->>PW: browser_navigate()
185
+ AI->>PW: browser_snapshot()
186
+ AI->>D2C: d2c_compare_with_design()
187
+ AI->>AI: 수정
188
+ end
189
+
190
+ AI-->>User: 완성된 컴포넌트
191
+ ```
192
+
193
+ ## 개발
194
+
195
+ ```bash
196
+ # 의존성 설치
197
+ npm install
198
+
199
+ # 빌드
200
+ npm run build
201
+
202
+ # 개발 모드
203
+ npm run dev
204
+ ```
205
+
206
+ ## 라이선스
207
+
208
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,787 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ import { z } from "zod";
6
+ import { glob } from "glob";
7
+ import * as fs from "fs/promises";
8
+ // 환경 변수에서 설정 읽기
9
+ const RULES_PATHS = process.env.RULES_PATHS?.split(",").map((p) => p.trim()) || [];
10
+ const RULES_GLOB = process.env.RULES_GLOB || "";
11
+ const CONFIG_PATH = process.env.D2C_CONFIG_PATH || "";
12
+ // 서비스 식별자 - AI가 이 키워드를 감지하면 이 MCP를 사용
13
+ const SERVICE_IDENTIFIERS = `
14
+ 🎯 **서비스 식별자**: 다음 키워드가 포함되면 이 MCP를 사용하세요:
15
+ - "syr", "syr-d2c", "d2cmcp", "d2c mcp"
16
+ - "디자인 투 코드", "design to code", "figma 변환"
17
+ - "컴포넌트로 만들어줘", "코드로 변환해줘"
18
+
19
+ ✅ 예시: "syr로 이 Figma 변환해줘", "d2c mcp로 컴포넌트 만들어줘"
20
+ `;
21
+ // 규칙 파일 로드
22
+ async function loadRules() {
23
+ const sources = [];
24
+ let content = "";
25
+ // 1. 설정 파일에서 경로 읽기
26
+ if (CONFIG_PATH) {
27
+ try {
28
+ const configContent = await fs.readFile(CONFIG_PATH, "utf-8");
29
+ const config = JSON.parse(configContent);
30
+ if (config.rules && Array.isArray(config.rules)) {
31
+ RULES_PATHS.push(...config.rules);
32
+ }
33
+ }
34
+ catch (e) {
35
+ console.error(`Config file not found or invalid: ${CONFIG_PATH}`);
36
+ }
37
+ }
38
+ // 2. 직접 지정된 경로에서 읽기
39
+ for (const rulePath of RULES_PATHS) {
40
+ try {
41
+ // glob 패턴 지원
42
+ if (rulePath.includes("*")) {
43
+ const files = await glob(rulePath);
44
+ for (const file of files) {
45
+ const fileContent = await fs.readFile(file, "utf-8");
46
+ content += `\n\n<!-- Source: ${file} -->\n${fileContent}`;
47
+ sources.push(file);
48
+ }
49
+ }
50
+ else {
51
+ const fileContent = await fs.readFile(rulePath, "utf-8");
52
+ content += `\n\n<!-- Source: ${rulePath} -->\n${fileContent}`;
53
+ sources.push(rulePath);
54
+ }
55
+ }
56
+ catch (e) {
57
+ console.error(`Rule file not found: ${rulePath}`);
58
+ }
59
+ }
60
+ // 3. RULES_GLOB 패턴에서 읽기
61
+ if (RULES_GLOB) {
62
+ const patterns = RULES_GLOB.split(",").map((p) => p.trim());
63
+ for (const pattern of patterns) {
64
+ const files = await glob(pattern);
65
+ for (const file of files) {
66
+ if (!sources.includes(file)) {
67
+ try {
68
+ const fileContent = await fs.readFile(file, "utf-8");
69
+ content += `\n\n<!-- Source: ${file} -->\n${fileContent}`;
70
+ sources.push(file);
71
+ }
72
+ catch (e) {
73
+ console.error(`Rule file not found: ${file}`);
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ return { content: content.trim(), sources };
80
+ }
81
+ // 기본 규칙 (내장)
82
+ const DEFAULT_RULES = `
83
+ # SYR D2C 기본 디자인 규칙
84
+
85
+ ## 컴포넌트 구조
86
+ - 컴포넌트는 단일 책임 원칙을 따릅니다
87
+ - Props는 TypeScript 인터페이스로 정의합니다
88
+ - 스타일은 CSS Modules 또는 Tailwind CSS를 사용합니다
89
+
90
+ ## 네이밍 컨벤션
91
+ - 컴포넌트: PascalCase (예: ButtonPrimary)
92
+ - 파일: kebab-case (예: button-primary.tsx)
93
+ - Props 인터페이스: ComponentNameProps
94
+
95
+ ## 접근성
96
+ - 모든 인터랙티브 요소에 적절한 ARIA 속성 추가
97
+ - 키보드 네비게이션 지원
98
+ - 색상 대비 WCAG AA 기준 충족
99
+
100
+ ## 반응형 디자인
101
+ - Mobile-first 접근법
102
+ - Breakpoints: sm(640px), md(768px), lg(1024px), xl(1280px)
103
+ `;
104
+ // MCP 서버 생성
105
+ const server = new Server({
106
+ name: "syr-d2c-workflow-mcp",
107
+ version: "0.1.0",
108
+ }, {
109
+ capabilities: {
110
+ tools: {},
111
+ prompts: {},
112
+ resources: {},
113
+ },
114
+ });
115
+ // ============ TOOLS ============
116
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
117
+ return {
118
+ tools: [
119
+ // preflight_check - 의존성 확인
120
+ {
121
+ name: "d2c_preflight_check",
122
+ description: `워크플로우 실행 전 필요한 의존성을 확인합니다.
123
+ ${SERVICE_IDENTIFIERS}
124
+
125
+ 🔍 **확인 항목**:
126
+ - figma-mcp 설치 여부
127
+ - playwright-mcp 설치 여부
128
+ - 규칙 파일 존재 여부
129
+
130
+ 💡 **사용법**:
131
+ 1. 이 도구를 먼저 호출
132
+ 2. 반환된 check_method로 각 MCP 확인
133
+ 3. 누락된 것이 있으면 install_guide 안내`,
134
+ inputSchema: {
135
+ type: "object",
136
+ properties: {},
137
+ },
138
+ },
139
+ // get_design_rules - 규칙 수집
140
+ {
141
+ name: "d2c_get_design_rules",
142
+ description: `프로젝트의 디자인 규칙을 수집하여 반환합니다.
143
+ ${SERVICE_IDENTIFIERS}
144
+
145
+ 📋 **규칙 소스**:
146
+ 1. 환경변수 RULES_PATHS로 지정된 파일들
147
+ 2. 환경변수 RULES_GLOB 패턴에 매칭되는 파일들
148
+ 3. D2C_CONFIG_PATH 설정 파일에 지정된 경로들
149
+ 4. 직접 입력한 커스텀 규칙
150
+
151
+ 💡 규칙이 없으면 기본 내장 규칙을 반환합니다.`,
152
+ inputSchema: {
153
+ type: "object",
154
+ properties: {
155
+ customRules: {
156
+ type: "string",
157
+ description: "추가할 커스텀 규칙 (선택)",
158
+ },
159
+ includeDefaults: {
160
+ type: "boolean",
161
+ description: "기본 규칙 포함 여부 (기본: true)",
162
+ },
163
+ },
164
+ },
165
+ },
166
+ // validate_component - 컴포넌트 검증
167
+ {
168
+ name: "d2c_validate_component",
169
+ description: `생성된 컴포넌트 코드가 규칙에 맞는지 검증합니다.
170
+ ${SERVICE_IDENTIFIERS}
171
+
172
+ 🔍 **검증 항목**:
173
+ - 네이밍 컨벤션 준수
174
+ - TypeScript Props 정의 여부
175
+ - 접근성 속성 포함 여부
176
+ - 반응형 스타일 적용 여부`,
177
+ inputSchema: {
178
+ type: "object",
179
+ properties: {
180
+ code: {
181
+ type: "string",
182
+ description: "검증할 컴포넌트 코드",
183
+ },
184
+ componentName: {
185
+ type: "string",
186
+ description: "컴포넌트 이름",
187
+ },
188
+ rules: {
189
+ type: "string",
190
+ description: "적용할 규칙 (없으면 로드된 규칙 사용)",
191
+ },
192
+ },
193
+ required: ["code", "componentName"],
194
+ },
195
+ },
196
+ // compare_with_design - 디자인 비교
197
+ {
198
+ name: "d2c_compare_with_design",
199
+ description: `Figma 디자인 스크린샷과 렌더링 결과를 비교 분석합니다.
200
+ ${SERVICE_IDENTIFIERS}
201
+
202
+ 📊 **비교 항목**:
203
+ - 레이아웃 일치도
204
+ - 색상/타이포그래피 일치도
205
+ - 간격/여백 일치도
206
+ - 누락된 요소
207
+
208
+ 💡 **사용법**:
209
+ 1. figma-mcp.get_screenshot으로 원본 이미지 획득
210
+ 2. playwright-mcp로 렌더링 결과 스크린샷
211
+ 3. 이 도구로 비교 분석`,
212
+ inputSchema: {
213
+ type: "object",
214
+ properties: {
215
+ designDescription: {
216
+ type: "string",
217
+ description: "Figma 디자인 설명 (get_design_context 결과)",
218
+ },
219
+ renderedDescription: {
220
+ type: "string",
221
+ description: "렌더링된 결과 설명",
222
+ },
223
+ differences: {
224
+ type: "array",
225
+ items: { type: "string" },
226
+ description: "발견된 차이점 목록",
227
+ },
228
+ },
229
+ required: ["designDescription", "renderedDescription"],
230
+ },
231
+ },
232
+ // get_component_template - 템플릿 생성
233
+ {
234
+ name: "d2c_get_component_template",
235
+ description: `규칙에 맞는 컴포넌트 보일러플레이트를 생성합니다.
236
+ ${SERVICE_IDENTIFIERS}
237
+
238
+ 🎨 **지원 프레임워크**:
239
+ - React (TSX)
240
+ - Vue (SFC)
241
+ - Svelte
242
+
243
+ 📦 **포함 내용**:
244
+ - TypeScript Props 인터페이스
245
+ - 기본 스타일 구조
246
+ - 접근성 기본 속성`,
247
+ inputSchema: {
248
+ type: "object",
249
+ properties: {
250
+ componentName: {
251
+ type: "string",
252
+ description: "컴포넌트 이름 (PascalCase)",
253
+ },
254
+ framework: {
255
+ type: "string",
256
+ enum: ["react", "vue", "svelte"],
257
+ description: "프레임워크 (기본: react)",
258
+ },
259
+ props: {
260
+ type: "array",
261
+ items: {
262
+ type: "object",
263
+ properties: {
264
+ name: { type: "string" },
265
+ type: { type: "string" },
266
+ required: { type: "boolean" },
267
+ description: { type: "string" },
268
+ },
269
+ },
270
+ description: "Props 정의",
271
+ },
272
+ hasChildren: {
273
+ type: "boolean",
274
+ description: "children prop 포함 여부",
275
+ },
276
+ },
277
+ required: ["componentName"],
278
+ },
279
+ },
280
+ ],
281
+ };
282
+ });
283
+ // 도구 실행 핸들러
284
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
285
+ const { name, arguments: args } = request.params;
286
+ try {
287
+ switch (name) {
288
+ case "d2c_preflight_check": {
289
+ return {
290
+ content: [
291
+ {
292
+ type: "text",
293
+ text: `🔍 **D2C 워크플로우 사전 검사**
294
+
295
+ ## 필수 의존성
296
+
297
+ ### 1. Figma MCP
298
+ - **목적**: Figma 디자인 가져오기
299
+ - **확인 방법**: \`get_design_context\` 도구 호출 시도
300
+ - **설치 가이드**:
301
+ \`\`\`json
302
+ // .vscode/mcp.json
303
+ {
304
+ "servers": {
305
+ "figma": {
306
+ "command": "npx",
307
+ "args": ["-y", "figma-developer-mcp", "--stdio"]
308
+ }
309
+ }
310
+ }
311
+ \`\`\`
312
+ - ⚠️ Figma Desktop 앱 설치 및 Dev Mode 활성화 필요
313
+
314
+ ### 2. Playwright MCP
315
+ - **목적**: 렌더링 결과 스크린샷 확인
316
+ - **확인 방법**: \`browser_snapshot\` 도구 호출 시도
317
+ - **설치 가이드**:
318
+ \`\`\`json
319
+ // .vscode/mcp.json
320
+ {
321
+ "servers": {
322
+ "playwright": {
323
+ "command": "npx",
324
+ "args": ["@anthropic/mcp-playwright"]
325
+ }
326
+ }
327
+ }
328
+ \`\`\`
329
+
330
+ ## 선택 의존성
331
+
332
+ ### 규칙 파일
333
+ - **현재 설정된 경로**: ${RULES_PATHS.length > 0 ? RULES_PATHS.join(", ") : "(없음)"}
334
+ - **Glob 패턴**: ${RULES_GLOB || "(없음)"}
335
+ - **설정 파일**: ${CONFIG_PATH || "(없음)"}
336
+
337
+ ## 다음 단계
338
+ 1. 위 MCP들이 설치되어 있는지 확인하세요
339
+ 2. 누락된 MCP가 있다면 설치 가이드를 따라 설치하세요
340
+ 3. 모든 준비가 완료되면 \`d2c_get_design_rules\`로 규칙을 확인하세요`,
341
+ },
342
+ ],
343
+ };
344
+ }
345
+ case "d2c_get_design_rules": {
346
+ const input = z
347
+ .object({
348
+ customRules: z.string().optional(),
349
+ includeDefaults: z.boolean().optional().default(true),
350
+ })
351
+ .parse(args);
352
+ const { content, sources } = await loadRules();
353
+ let finalRules = "";
354
+ // 기본 규칙 추가
355
+ if (input.includeDefaults && !content) {
356
+ finalRules += DEFAULT_RULES;
357
+ }
358
+ // 로드된 규칙 추가
359
+ if (content) {
360
+ finalRules += "\n\n" + content;
361
+ }
362
+ // 커스텀 규칙 추가
363
+ if (input.customRules) {
364
+ finalRules += `\n\n<!-- Custom Rules -->\n${input.customRules}`;
365
+ }
366
+ return {
367
+ content: [
368
+ {
369
+ type: "text",
370
+ text: `📋 **디자인 규칙**
371
+
372
+ ## 규칙 소스
373
+ ${sources.length > 0 ? sources.map((s) => `- ${s}`).join("\n") : "- 기본 내장 규칙 사용"}
374
+
375
+ ## 규칙 내용
376
+
377
+ ${finalRules || DEFAULT_RULES}`,
378
+ },
379
+ ],
380
+ };
381
+ }
382
+ case "d2c_validate_component": {
383
+ const input = z
384
+ .object({
385
+ code: z.string(),
386
+ componentName: z.string(),
387
+ rules: z.string().optional(),
388
+ })
389
+ .parse(args);
390
+ const issues = [];
391
+ const passed = [];
392
+ // 기본 검증
393
+ // 1. PascalCase 체크
394
+ if (!/^[A-Z][a-zA-Z0-9]*$/.test(input.componentName)) {
395
+ issues.push("❌ 컴포넌트 이름이 PascalCase가 아닙니다");
396
+ }
397
+ else {
398
+ passed.push("✅ 컴포넌트 이름 PascalCase 준수");
399
+ }
400
+ // 2. Props 인터페이스 체크
401
+ if (input.code.includes("Props") && input.code.includes("interface")) {
402
+ passed.push("✅ TypeScript Props 인터페이스 정의됨");
403
+ }
404
+ else if (input.code.includes(": {") || input.code.includes("Props")) {
405
+ passed.push("✅ Props 타입 정의됨");
406
+ }
407
+ else {
408
+ issues.push("⚠️ Props 인터페이스가 명시적으로 정의되지 않음");
409
+ }
410
+ // 3. 접근성 속성 체크
411
+ const a11yPatterns = ["aria-", "role=", "tabIndex", "alt=", "title="];
412
+ const hasA11y = a11yPatterns.some((p) => input.code.includes(p));
413
+ if (hasA11y) {
414
+ passed.push("✅ 접근성 속성 포함됨");
415
+ }
416
+ else {
417
+ issues.push("⚠️ 접근성 속성(aria-*, role 등)이 없습니다");
418
+ }
419
+ // 4. 반응형 체크
420
+ const responsivePatterns = ["@media", "sm:", "md:", "lg:", "xl:", "responsive"];
421
+ const hasResponsive = responsivePatterns.some((p) => input.code.includes(p));
422
+ if (hasResponsive) {
423
+ passed.push("✅ 반응형 스타일 적용됨");
424
+ }
425
+ else {
426
+ issues.push("💡 반응형 스타일이 감지되지 않음 (필요시 추가)");
427
+ }
428
+ const isValid = issues.filter((i) => i.startsWith("❌")).length === 0;
429
+ return {
430
+ content: [
431
+ {
432
+ type: "text",
433
+ text: `🔍 **컴포넌트 검증 결과**: ${input.componentName}
434
+
435
+ ## 결과: ${isValid ? "✅ 통과" : "❌ 수정 필요"}
436
+
437
+ ### 통과 항목
438
+ ${passed.join("\n")}
439
+
440
+ ### 이슈/권장사항
441
+ ${issues.length > 0 ? issues.join("\n") : "없음"}
442
+
443
+ ### 검증된 코드 길이
444
+ ${input.code.length} 문자`,
445
+ },
446
+ ],
447
+ };
448
+ }
449
+ case "d2c_compare_with_design": {
450
+ const input = z
451
+ .object({
452
+ designDescription: z.string(),
453
+ renderedDescription: z.string(),
454
+ differences: z.array(z.string()).optional(),
455
+ })
456
+ .parse(args);
457
+ return {
458
+ content: [
459
+ {
460
+ type: "text",
461
+ text: `📊 **디자인 vs 렌더링 비교 분석**
462
+
463
+ ## 원본 디자인
464
+ ${input.designDescription}
465
+
466
+ ## 렌더링 결과
467
+ ${input.renderedDescription}
468
+
469
+ ## 발견된 차이점
470
+ ${input.differences?.length ? input.differences.map((d) => `- ${d}`).join("\n") : "- 차이점이 명시되지 않음"}
471
+
472
+ ## 권장 액션
473
+ ${input.differences?.length
474
+ ? `
475
+ 1. 위 차이점들을 검토하세요
476
+ 2. 중요한 차이점부터 수정하세요
477
+ 3. 수정 후 다시 렌더링하여 비교하세요
478
+ `
479
+ : `
480
+ 1. 시각적으로 두 결과를 비교하세요
481
+ 2. 레이아웃, 색상, 간격, 타이포그래피를 확인하세요
482
+ 3. 차이점이 있다면 differences 파라미터로 명시해주세요
483
+ `}`,
484
+ },
485
+ ],
486
+ };
487
+ }
488
+ case "d2c_get_component_template": {
489
+ const input = z
490
+ .object({
491
+ componentName: z.string(),
492
+ framework: z.enum(["react", "vue", "svelte"]).optional().default("react"),
493
+ props: z
494
+ .array(z.object({
495
+ name: z.string(),
496
+ type: z.string(),
497
+ required: z.boolean().optional(),
498
+ description: z.string().optional(),
499
+ }))
500
+ .optional(),
501
+ hasChildren: z.boolean().optional().default(false),
502
+ })
503
+ .parse(args);
504
+ let template = "";
505
+ if (input.framework === "react") {
506
+ const propsInterface = input.props?.length || input.hasChildren
507
+ ? `
508
+ interface ${input.componentName}Props {
509
+ ${input.props?.map((p) => ` /** ${p.description || p.name} */\n ${p.name}${p.required ? "" : "?"}: ${p.type};`).join("\n") || ""}
510
+ ${input.hasChildren ? " /** Children elements */\n children?: React.ReactNode;" : ""}
511
+ }
512
+ `
513
+ : "";
514
+ template = `import React from 'react';
515
+
516
+ ${propsInterface}
517
+ /**
518
+ * ${input.componentName} 컴포넌트
519
+ *
520
+ * @description Figma 디자인에서 생성된 컴포넌트
521
+ */
522
+ export const ${input.componentName}: React.FC<${input.componentName}Props> = ({
523
+ ${input.props?.map((p) => ` ${p.name},`).join("\n") || ""}
524
+ ${input.hasChildren ? " children," : ""}
525
+ }) => {
526
+ return (
527
+ <div
528
+ className="${input.componentName.toLowerCase()}"
529
+ role="region"
530
+ aria-label="${input.componentName}"
531
+ >
532
+ {/* TODO: Figma 디자인에 맞게 구현 */}
533
+ ${input.hasChildren ? " {children}" : ""}
534
+ </div>
535
+ );
536
+ };
537
+
538
+ export default ${input.componentName};
539
+ `;
540
+ }
541
+ else if (input.framework === "vue") {
542
+ template = `<script setup lang="ts">
543
+ ${input.props?.length ? `defineProps<{\n${input.props.map((p) => ` ${p.name}${p.required ? "" : "?"}: ${p.type}`).join("\n")}\n}>()` : ""}
544
+ </script>
545
+
546
+ <template>
547
+ <div
548
+ class="${input.componentName.toLowerCase()}"
549
+ role="region"
550
+ :aria-label="'${input.componentName}'"
551
+ >
552
+ <!-- TODO: Figma 디자인에 맞게 구현 -->
553
+ ${input.hasChildren ? " <slot />" : ""}
554
+ </div>
555
+ </template>
556
+
557
+ <style scoped>
558
+ .${input.componentName.toLowerCase()} {
559
+ /* TODO: 스타일 추가 */
560
+ }
561
+ </style>
562
+ `;
563
+ }
564
+ else if (input.framework === "svelte") {
565
+ template = `<script lang="ts">
566
+ ${input.props?.map((p) => ` export let ${p.name}: ${p.type}${p.required ? "" : " | undefined"};`).join("\n") || ""}
567
+ </script>
568
+
569
+ <div
570
+ class="${input.componentName.toLowerCase()}"
571
+ role="region"
572
+ aria-label="${input.componentName}"
573
+ >
574
+ <!-- TODO: Figma 디자인에 맞게 구현 -->
575
+ ${input.hasChildren ? " <slot />" : ""}
576
+ </div>
577
+
578
+ <style>
579
+ .${input.componentName.toLowerCase()} {
580
+ /* TODO: 스타일 추가 */
581
+ }
582
+ </style>
583
+ `;
584
+ }
585
+ return {
586
+ content: [
587
+ {
588
+ type: "text",
589
+ text: `🎨 **컴포넌트 템플릿**: ${input.componentName}
590
+
591
+ ## 프레임워크
592
+ ${input.framework}
593
+
594
+ ## 생성된 템플릿
595
+
596
+ \`\`\`${input.framework === "react" ? "tsx" : input.framework === "vue" ? "vue" : "svelte"}
597
+ ${template}
598
+ \`\`\`
599
+
600
+ ## 다음 단계
601
+ 1. Figma 디자인 컨텍스트를 가져오세요 (figma-mcp)
602
+ 2. 템플릿을 디자인에 맞게 수정하세요
603
+ 3. \`d2c_validate_component\`로 검증하세요`,
604
+ },
605
+ ],
606
+ };
607
+ }
608
+ default:
609
+ throw new Error(`Unknown tool: ${name}`);
610
+ }
611
+ }
612
+ catch (error) {
613
+ const message = error instanceof Error ? error.message : "Unknown error";
614
+ return {
615
+ content: [{ type: "text", text: `❌ 오류: ${message}` }],
616
+ isError: true,
617
+ };
618
+ }
619
+ });
620
+ // ============ PROMPTS ============
621
+ server.setRequestHandler(ListPromptsRequestSchema, async () => {
622
+ return {
623
+ prompts: [
624
+ {
625
+ name: "design_to_code",
626
+ description: `Figma 디자인을 규칙에 맞는 컴포넌트로 변환하는 전체 워크플로우 가이드.
627
+ ${SERVICE_IDENTIFIERS}`,
628
+ arguments: [
629
+ {
630
+ name: "figmaUrl",
631
+ description: "Figma 디자인 URL (선택, 없으면 현재 선택된 노드 사용)",
632
+ required: false,
633
+ },
634
+ {
635
+ name: "componentName",
636
+ description: "생성할 컴포넌트 이름",
637
+ required: false,
638
+ },
639
+ {
640
+ name: "framework",
641
+ description: "프레임워크 (react/vue/svelte)",
642
+ required: false,
643
+ },
644
+ ],
645
+ },
646
+ ],
647
+ };
648
+ });
649
+ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
650
+ const { name, arguments: args } = request.params;
651
+ if (name === "design_to_code") {
652
+ const figmaUrl = args?.figmaUrl || "(현재 선택된 Figma 노드)";
653
+ const componentName = args?.componentName || "(디자인에서 추출)";
654
+ const framework = args?.framework || "react";
655
+ return {
656
+ description: "Figma 디자인을 컴포넌트로 변환하는 워크플로우",
657
+ messages: [
658
+ {
659
+ role: "user",
660
+ content: {
661
+ type: "text",
662
+ text: `## SYR D2C 워크플로우 실행
663
+
664
+ ### 입력 정보
665
+ - Figma: ${figmaUrl}
666
+ - 컴포넌트명: ${componentName}
667
+ - 프레임워크: ${framework}
668
+
669
+ ### 워크플로우 단계
670
+
671
+ **Step 0: 사전 검사 (필수)**
672
+ 1. \`d2c_preflight_check\` 호출
673
+ 2. figma-mcp 확인: \`get_design_context\` 호출 시도
674
+ 3. playwright-mcp 확인: \`browser_snapshot\` 호출 시도
675
+ 4. 누락된 MCP가 있으면 설치 가이드 안내 후 중단
676
+
677
+ **Step 1: 규칙 수집**
678
+ 1. \`d2c_get_design_rules\` 호출
679
+ 2. 반환된 규칙을 숙지
680
+
681
+ **Step 2: Figma 디자인 가져오기**
682
+ 1. \`figma-mcp.get_design_context\` 호출 (URL 또는 선택된 노드)
683
+ 2. \`figma-mcp.get_screenshot\` 호출하여 원본 이미지 저장
684
+ 3. 디자인 구조, 색상, 타이포그래피, 간격 분석
685
+
686
+ **Step 3: 컴포넌트 생성**
687
+ 1. \`d2c_get_component_template\`로 보일러플레이트 생성
688
+ 2. Figma 디자인 정보를 기반으로 템플릿 수정
689
+ 3. 규칙에 맞게 스타일, 접근성 속성 추가
690
+
691
+ **Step 4: 검증**
692
+ 1. \`d2c_validate_component\`로 코드 검증
693
+ 2. 이슈가 있으면 수정
694
+
695
+ **Step 5: 렌더링 확인 (반복)**
696
+ 1. 생성된 컴포넌트를 프로젝트에 추가
697
+ 2. \`playwright-mcp.browser_navigate\`로 페이지 열기
698
+ 3. \`playwright-mcp.browser_snapshot\`으로 스크린샷
699
+ 4. \`d2c_compare_with_design\`으로 원본과 비교
700
+ 5. 차이점이 있으면 수정 후 Step 5 반복
701
+
702
+ **Step 6: 완료**
703
+ 1. 최종 코드와 파일 경로 보고
704
+ 2. 수정 이력 요약
705
+
706
+ ---
707
+ 위 워크플로우대로 진행해주세요.`,
708
+ },
709
+ },
710
+ ],
711
+ };
712
+ }
713
+ throw new Error(`Unknown prompt: ${name}`);
714
+ });
715
+ // ============ RESOURCES ============
716
+ server.setRequestHandler(ListResourcesRequestSchema, async () => {
717
+ return {
718
+ resources: [
719
+ {
720
+ uri: "d2c://rules/default",
721
+ name: "기본 디자인 규칙",
722
+ description: "SYR D2C 기본 디자인 규칙 문서",
723
+ mimeType: "text/markdown",
724
+ },
725
+ {
726
+ uri: "d2c://templates/react",
727
+ name: "React 컴포넌트 템플릿",
728
+ description: "React TSX 컴포넌트 기본 템플릿",
729
+ mimeType: "text/plain",
730
+ },
731
+ ],
732
+ };
733
+ });
734
+ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
735
+ const { uri } = request.params;
736
+ if (uri === "d2c://rules/default") {
737
+ return {
738
+ contents: [
739
+ {
740
+ uri,
741
+ mimeType: "text/markdown",
742
+ text: DEFAULT_RULES,
743
+ },
744
+ ],
745
+ };
746
+ }
747
+ if (uri === "d2c://templates/react") {
748
+ return {
749
+ contents: [
750
+ {
751
+ uri,
752
+ mimeType: "text/plain",
753
+ text: `import React from 'react';
754
+
755
+ interface ComponentProps {
756
+ // Props here
757
+ }
758
+
759
+ export const Component: React.FC<ComponentProps> = (props) => {
760
+ return (
761
+ <div role="region" aria-label="Component">
762
+ {/* Content */}
763
+ </div>
764
+ );
765
+ };
766
+
767
+ export default Component;
768
+ `,
769
+ },
770
+ ],
771
+ };
772
+ }
773
+ throw new Error(`Unknown resource: ${uri}`);
774
+ });
775
+ // 서버 시작
776
+ async function main() {
777
+ const transport = new StdioServerTransport();
778
+ await server.connect(transport);
779
+ console.error("SYR D2C Workflow MCP server running on stdio (v0.1.0)");
780
+ console.error(` Rules paths: ${RULES_PATHS.join(", ") || "(none)"}`);
781
+ console.error(` Rules glob: ${RULES_GLOB || "(none)"}`);
782
+ }
783
+ main().catch((error) => {
784
+ console.error("Fatal error:", error);
785
+ process.exit(1);
786
+ });
787
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAGlC,gBAAgB;AAChB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;AACnF,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;AAChD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;AAEtD,sCAA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;iBACpB;aACF;SACF,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,KAAK,uBAAuB,EAAE,CAAC;QACpC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG;oBACH,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE;;;;;;;;;;;;;;;CAef;iBACQ;aACF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,QAAQ;AACR,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,kBAAkB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,KAAK,CAAC,iBAAiB,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "syr-d2c-workflow-mcp",
3
+ "version": "0.1.0",
4
+ "description": "Design-to-Code workflow MCP - Transform Figma designs into production-ready components with rules validation",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "syr-d2c-workflow-mcp": "dist/index.js",
9
+ "syr-d2c": "dist/index.js",
10
+ "d2cmcp": "dist/index.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "dev": "tsc --watch",
19
+ "start": "node dist/index.js",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "mcp",
24
+ "figma",
25
+ "design-to-code",
26
+ "d2c",
27
+ "syr",
28
+ "workflow",
29
+ "components",
30
+ "react",
31
+ "claude",
32
+ "cursor"
33
+ ],
34
+ "author": "syr",
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/Mike-kor/syr-d2c-workflow-mcp.git"
39
+ },
40
+ "homepage": "https://github.com/Mike-kor/syr-d2c-workflow-mcp#readme",
41
+ "bugs": {
42
+ "url": "https://github.com/Mike-kor/syr-d2c-workflow-mcp/issues"
43
+ },
44
+ "dependencies": {
45
+ "@modelcontextprotocol/sdk": "^1.0.0",
46
+ "glob": "^11.0.0",
47
+ "zod": "^3.23.8"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^20.0.0",
51
+ "typescript": "^5.0.0"
52
+ },
53
+ "engines": {
54
+ "node": ">=18"
55
+ }
56
+ }