palette-mcp 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@ Figma 디자인을 기존 Design System 컴포넌트를 활용하여 React/Vue
14
14
  2. "Install" 클릭
15
15
  3. 환경 변수 입력:
16
16
  - `FIGMA_ACCESS_TOKEN`: Figma API 토큰 (필수)
17
- - `GITHUB_TOKEN`: GitHub 토큰 (선택, 디자인 시스템 접근용)
17
+ - `GITHUB_TOKEN`: GitHub 토큰 (필수, 조직 인증 및 디자인 시스템 접근용)
18
18
 
19
19
  ### Cursor에서 수동 설치
20
20
 
@@ -26,9 +26,10 @@ Figma 디자인을 기존 Design System 컴포넌트를 활용하여 React/Vue
26
26
  "palette": {
27
27
  "type": "stdio",
28
28
  "command": "npx",
29
- "args": ["-y", "@anthropic/palette-mcp"],
29
+ "args": ["-y", "palette-mcp"],
30
30
  "env": {
31
- "FIGMA_ACCESS_TOKEN": "YOUR_FIGMA_TOKEN_HERE"
31
+ "FIGMA_ACCESS_TOKEN": "YOUR_FIGMA_TOKEN_HERE",
32
+ "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN_HERE"
32
33
  }
33
34
  }
34
35
  }
@@ -40,9 +41,11 @@ Figma 디자인을 기존 Design System 컴포넌트를 활용하여 React/Vue
40
41
  | 변수명 | 필수 | 설명 |
41
42
  |--------|------|------|
42
43
  | `FIGMA_ACCESS_TOKEN` | ✅ | Figma Personal Access Token |
43
- | `GITHUB_TOKEN` | | GitHub 토큰 (디자인 시스템 패키지 접근용) |
44
+ | `GITHUB_TOKEN` | | GitHub 토큰 (dealicious-inc 조직 인증 및 디자인 시스템 접근용) |
44
45
  | `FIGMA_MCP_SERVER_URL` | ❌ | Figma MCP 서버 URL (기본값: http://127.0.0.1:3845/mcp) |
45
46
 
47
+ > ⚠️ **참고**: `GITHUB_TOKEN`은 dealicious-inc 조직 멤버십 확인에 사용됩니다. 조직 멤버만 Palette MCP를 사용할 수 있습니다.
48
+
46
49
  #### Figma Access Token 발급:
47
50
  1. [Figma](https://www.figma.com) → Settings → Account
48
51
  2. Personal Access Tokens → Generate new token
@@ -56,7 +59,7 @@ Figma 디자인을 기존 Design System 컴포넌트를 활용하여 React/Vue
56
59
  Figma에서 디자인을 선택하고 "Copy link to selection"으로 URL을 복사한 후:
57
60
 
58
61
  ```
59
- https://www.figma.com/design/akI7EwlWemAf8KJup9F2ZS/...?node-id=45733-32370
62
+ https://www.figma.com/design/akI7EwlWemAf8KJup9F2ZS/...?node-id=45733-32370
60
63
  를 React 코드로 작성해줘
61
64
  ```
62
65
 
@@ -10,28 +10,26 @@ import { z } from 'zod';
10
10
  *
11
11
  * Palette MCP Server Configuration
12
12
  * Figma 디자인을 Design System 컴포넌트로 변환하기 위한 설정
13
- *
14
- * 모든 필드는 optional로 설정하여 Smithery Optional config 점수 획득
15
13
  */
16
14
  export declare const configSchema: z.ZodObject<{
17
- FIGMA_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
18
- GITHUB_TOKEN: z.ZodOptional<z.ZodString>;
15
+ FIGMA_ACCESS_TOKEN: z.ZodString;
16
+ GITHUB_TOKEN: z.ZodString;
19
17
  FIGMA_MCP_SERVER_URL: z.ZodDefault<z.ZodOptional<z.ZodString>>;
20
18
  }, "strip", z.ZodTypeAny, {
19
+ FIGMA_ACCESS_TOKEN: string;
21
20
  FIGMA_MCP_SERVER_URL: string;
22
- FIGMA_ACCESS_TOKEN?: string | undefined;
23
- GITHUB_TOKEN?: string | undefined;
21
+ GITHUB_TOKEN: string;
24
22
  }, {
25
- FIGMA_ACCESS_TOKEN?: string | undefined;
23
+ FIGMA_ACCESS_TOKEN: string;
24
+ GITHUB_TOKEN: string;
26
25
  FIGMA_MCP_SERVER_URL?: string | undefined;
27
- GITHUB_TOKEN?: string | undefined;
28
26
  }>;
29
27
  type SmitheryConfig = z.infer<typeof configSchema>;
30
28
  /**
31
29
  * MCP 서버 생성 함수 - Smithery가 호출
32
30
  */
33
31
  export default function createMcpServer({ config }?: {
34
- config?: SmitheryConfig;
32
+ config?: Partial<SmitheryConfig>;
35
33
  }): import("@modelcontextprotocol/sdk/server").Server<{
36
34
  method: string;
37
35
  params?: {
package/dist/smithery.js CHANGED
@@ -12,41 +12,35 @@ import { createPaletteServer } from './server.js';
12
12
  *
13
13
  * Palette MCP Server Configuration
14
14
  * Figma 디자인을 Design System 컴포넌트로 변환하기 위한 설정
15
- *
16
- * 모든 필드는 optional로 설정하여 Smithery Optional config 점수 획득
17
15
  */
18
16
  export const configSchema = z.object({
19
- // Figma Access Token - Figma API 호출에 필요
17
+ // Figma Access Token - Figma API 호출에 필수
20
18
  FIGMA_ACCESS_TOKEN: z
21
19
  .string()
22
20
  .min(1)
23
- .optional()
24
- .describe('Figma Personal Access Token. Required for accessing Figma designs. Get yours at https://www.figma.com/developers/api#access-tokens'),
25
- // GitHub Token - 비공개 디자인 시스템 패키지 접근용
21
+ .describe('Figma Personal Access Token (필수). Figma 디자인에 접근하기 위해 필요합니다. https://www.figma.com/developers/api#access-tokens 에서 발급'),
22
+ // GitHub Token - 조직 인증 디자인 시스템 패키지 접근에 필수
26
23
  GITHUB_TOKEN: z
27
24
  .string()
28
25
  .min(1)
29
- .optional()
30
- .describe('GitHub Personal Access Token for accessing private design system packages. Required only for private repositories.'),
26
+ .describe('GitHub Personal Access Token (필수). dealicious-inc 조직 멤버십 확인 및 디자인 시스템 패키지 접근에 필요합니다.'),
31
27
  // Figma MCP Server URL - 로컬 개발용 (Remote 모드에서는 사용 안함)
32
28
  FIGMA_MCP_SERVER_URL: z
33
29
  .string()
34
30
  .url('Must be a valid URL')
35
31
  .optional()
36
32
  .default('http://127.0.0.1:3845/mcp')
37
- .describe('Figma Dev Mode MCP server URL. Only needed for local development with Figma Desktop app.'),
38
- }).describe('Configuration options for Palette MCP Server - Figma to Design System converter');
39
- // 기본 설정
33
+ .describe('Figma Dev Mode MCP server URL (선택). 로컬 개발 Figma Desktop 앱과 연동할 때만 필요합니다.'),
34
+ }).describe('Palette MCP Server 설정 - Figma 디자인을 Design System 컴포넌트로 변환');
35
+ // 기본 설정 (필수 토큰은 런타임에 제공됨)
40
36
  const defaultConfig = {
41
- FIGMA_ACCESS_TOKEN: undefined,
42
- GITHUB_TOKEN: undefined,
43
37
  FIGMA_MCP_SERVER_URL: 'http://127.0.0.1:3845/mcp',
44
38
  };
45
39
  /**
46
40
  * MCP 서버 생성 함수 - Smithery가 호출
47
41
  */
48
42
  export default function createMcpServer({ config } = {}) {
49
- // config 없거나 불완전해도 서버 초기화 가능하도록 방어적 처리
43
+ // config 병합
50
44
  const safeConfig = { ...defaultConfig, ...config };
51
45
  // 환경변수 설정 (값이 있는 경우에만)
52
46
  if (safeConfig.FIGMA_ACCESS_TOKEN) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palette-mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "MCP server for converting Figma designs to React/Vue components using design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/smithery.ts",
package/src/smithery.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Palette MCP Server - Smithery Remote 배포용
3
- *
3
+ *
4
4
  * Smithery.ai에서 호스팅될 때 사용됩니다.
5
5
  * @smithery/sdk를 사용하여 HTTP 서버로 실행됩니다.
6
6
  */
@@ -11,53 +11,47 @@ import { createPaletteServer } from './server.js';
11
11
 
12
12
  /**
13
13
  * Smithery 설정 스키마 정의
14
- *
14
+ *
15
15
  * Palette MCP Server Configuration
16
16
  * Figma 디자인을 Design System 컴포넌트로 변환하기 위한 설정
17
- *
18
- * 모든 필드는 optional로 설정하여 Smithery Optional config 점수 획득
19
17
  */
20
18
  export const configSchema = z.object({
21
- // Figma Access Token - Figma API 호출에 필요
19
+ // Figma Access Token - Figma API 호출에 필수
22
20
  FIGMA_ACCESS_TOKEN: z
23
21
  .string()
24
22
  .min(1)
25
- .optional()
26
- .describe('Figma Personal Access Token. Required for accessing Figma designs. Get yours at https://www.figma.com/developers/api#access-tokens'),
27
-
28
- // GitHub Token - 비공개 디자인 시스템 패키지 접근용
23
+ .describe('Figma Personal Access Token (필수). Figma 디자인에 접근하기 위해 필요합니다. https://www.figma.com/developers/api#access-tokens 에서 발급'),
24
+
25
+ // GitHub Token - 조직 인증 및 디자인 시스템 패키지 접근에 필수
29
26
  GITHUB_TOKEN: z
30
27
  .string()
31
28
  .min(1)
32
- .optional()
33
- .describe('GitHub Personal Access Token for accessing private design system packages. Required only for private repositories.'),
34
-
29
+ .describe('GitHub Personal Access Token (필수). dealicious-inc 조직 멤버십 확인 및 디자인 시스템 패키지 접근에 필요합니다.'),
30
+
35
31
  // Figma MCP Server URL - 로컬 개발용 (Remote 모드에서는 사용 안함)
36
32
  FIGMA_MCP_SERVER_URL: z
37
33
  .string()
38
34
  .url('Must be a valid URL')
39
35
  .optional()
40
36
  .default('http://127.0.0.1:3845/mcp')
41
- .describe('Figma Dev Mode MCP server URL. Only needed for local development with Figma Desktop app.'),
42
- }).describe('Configuration options for Palette MCP Server - Figma to Design System converter');
37
+ .describe('Figma Dev Mode MCP server URL (선택). 로컬 개발 Figma Desktop 앱과 연동할 때만 필요합니다.'),
38
+ }).describe('Palette MCP Server 설정 - Figma 디자인을 Design System 컴포넌트로 변환');
43
39
 
44
40
  // Smithery 설정 타입
45
41
  type SmitheryConfig = z.infer<typeof configSchema>;
46
42
 
47
- // 기본 설정
48
- const defaultConfig: SmitheryConfig = {
49
- FIGMA_ACCESS_TOKEN: undefined,
50
- GITHUB_TOKEN: undefined,
43
+ // 기본 설정 (필수 토큰은 런타임에 제공됨)
44
+ const defaultConfig: Partial<SmitheryConfig> = {
51
45
  FIGMA_MCP_SERVER_URL: 'http://127.0.0.1:3845/mcp',
52
46
  };
53
47
 
54
48
  /**
55
49
  * MCP 서버 생성 함수 - Smithery가 호출
56
50
  */
57
- export default function createMcpServer({ config }: { config?: SmitheryConfig } = {}) {
58
- // config 없거나 불완전해도 서버 초기화 가능하도록 방어적 처리
59
- const safeConfig: SmitheryConfig = { ...defaultConfig, ...config };
60
-
51
+ export default function createMcpServer({ config }: { config?: Partial<SmitheryConfig> } = {}) {
52
+ // config 병합
53
+ const safeConfig = { ...defaultConfig, ...config };
54
+
61
55
  // 환경변수 설정 (값이 있는 경우에만)
62
56
  if (safeConfig.FIGMA_ACCESS_TOKEN) {
63
57
  process.env.FIGMA_ACCESS_TOKEN = safeConfig.FIGMA_ACCESS_TOKEN;