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,44 @@
1
+ /**
2
+ * Palette MCP Server - Smithery Remote 배포용
3
+ *
4
+ * Smithery.ai에서 호스팅될 때 사용됩니다.
5
+ * Smithery가 이 파일을 로드하고 createServer 함수를 호출합니다.
6
+ */
7
+ import { z } from 'zod';
8
+ import { createPaletteServer, tools } from './server.js';
9
+ // Smithery 설정 스키마 정의
10
+ export const configSchema = z.object({
11
+ FIGMA_ACCESS_TOKEN: z
12
+ .string()
13
+ .describe('Figma Personal Access Token (https://www.figma.com/developers/api#access-tokens)'),
14
+ GITHUB_TOKEN: z
15
+ .string()
16
+ .describe('GitHub Personal Access Token for design system packages'),
17
+ FIGMA_MCP_SERVER_URL: z
18
+ .string()
19
+ .default('http://127.0.0.1:3845/mcp')
20
+ .describe('Figma Dev Mode MCP server URL'),
21
+ });
22
+ /**
23
+ * Smithery에서 호출하는 서버 생성 함수
24
+ *
25
+ * @param config - Smithery에서 전달받은 사용자 설정
26
+ * @returns MCP 서버 인스턴스
27
+ */
28
+ export default function createServer({ config }) {
29
+ // 환경변수 설정
30
+ process.env.FIGMA_ACCESS_TOKEN = config.FIGMA_ACCESS_TOKEN;
31
+ process.env.GITHUB_TOKEN = config.GITHUB_TOKEN;
32
+ process.env.FIGMA_MCP_SERVER_URL = config.FIGMA_MCP_SERVER_URL;
33
+ // 공통 서버 생성 로직 사용
34
+ const server = createPaletteServer({
35
+ figmaAccessToken: config.FIGMA_ACCESS_TOKEN,
36
+ githubToken: config.GITHUB_TOKEN,
37
+ figmaMcpServerUrl: config.FIGMA_MCP_SERVER_URL,
38
+ });
39
+ console.error('Palette server created for Smithery (Remote mode)');
40
+ // Smithery가 기대하는 형식으로 반환
41
+ return server;
42
+ }
43
+ // Tools 정보도 export (Smithery가 capabilities 탐지에 사용할 수 있음)
44
+ export { tools };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ import dotenv from 'dotenv';
3
+ import { fileURLToPath } from 'url';
4
+ import { dirname, join } from 'path';
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+ dotenv.config({ path: join(__dirname, '..', '.env') });
8
+ import { FigmaMCPClient } from './utils/figma-mcp-client.js';
9
+ async function main() {
10
+ const client = new FigmaMCPClient();
11
+ console.log('Figma Desktop MCP 서버에 연결 중...\n');
12
+ try {
13
+ const isAvailable = await client.isAvailable();
14
+ if (!isAvailable) {
15
+ console.error('❌ Figma Desktop MCP 서버를 사용할 수 없습니다.');
16
+ console.log('Figma Desktop 앱이 실행 중이고 MCP 서버가 활성화되어 있는지 확인하세요.');
17
+ process.exit(1);
18
+ }
19
+ console.log('✅ Figma Desktop MCP 서버 연결 성공!\n');
20
+ console.log('도구 목록 조회 중...');
21
+ // 직접 sendRequest를 호출해서 원본 응답 확인
22
+ // @ts-ignore - private 메서드이지만 테스트를 위해 접근
23
+ const rawResult = await client.sendRequest('tools/list');
24
+ console.log('원본 응답:', JSON.stringify(rawResult, null, 2));
25
+ const tools = await client.listTools();
26
+ console.log(`파싱된 도구 목록:`, JSON.stringify(tools, null, 2));
27
+ if (tools.length === 0) {
28
+ console.log('⚠️ 사용 가능한 도구가 없습니다.');
29
+ console.log('\n💡 확인 사항:');
30
+ console.log('1. Figma Desktop 앱이 실행 중인지 확인하세요.');
31
+ console.log('2. Figma Desktop 앱의 Preferences에서 "Enable Dev Mode MCP Server"가 활성화되어 있는지 확인하세요.');
32
+ console.log('3. Figma 파일이 열려있는지 확인하세요.');
33
+ return;
34
+ }
35
+ console.log(`📋 총 ${tools.length}개의 도구를 찾았습니다:\n`);
36
+ tools.forEach((tool, index) => {
37
+ console.log(`${index + 1}. ${tool.name}`);
38
+ if (tool.description) {
39
+ console.log(` 설명: ${tool.description}`);
40
+ }
41
+ if (tool.inputSchema?.properties) {
42
+ console.log(` 파라미터:`);
43
+ Object.entries(tool.inputSchema.properties).forEach(([key, value]) => {
44
+ console.log(` - ${key}: ${value.type || 'any'} ${value.description ? `(${value.description})` : ''}`);
45
+ });
46
+ }
47
+ console.log('');
48
+ });
49
+ }
50
+ catch (error) {
51
+ console.error('❌ 오류 발생:', error);
52
+ process.exit(1);
53
+ }
54
+ }
55
+ main();
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,166 @@
1
+ #!/usr/bin/env node
2
+ import dotenv from 'dotenv';
3
+ import { fileURLToPath } from 'url';
4
+ import { dirname, join } from 'path';
5
+ import axios from 'axios';
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+ dotenv.config({ path: join(__dirname, '..', '.env') });
9
+ /**
10
+ * HTTP 타입 MCP 서버 테스트
11
+ */
12
+ async function testHttpMCPServer(name, url) {
13
+ console.log(`\n${'='.repeat(60)}`);
14
+ console.log(`🔍 ${name} MCP 서버 테스트`);
15
+ console.log(`URL: ${url}`);
16
+ console.log('='.repeat(60));
17
+ try {
18
+ const client = axios.create({
19
+ baseURL: url,
20
+ timeout: 10000,
21
+ headers: {
22
+ 'Content-Type': 'application/json',
23
+ },
24
+ });
25
+ // JSON-RPC 2.0 요청 생성
26
+ const request = {
27
+ jsonrpc: '2.0',
28
+ id: 1,
29
+ method: 'tools/list',
30
+ params: {},
31
+ };
32
+ console.log('\n📤 요청 전송 중...');
33
+ const response = await client.post('', request);
34
+ console.log('✅ 연결 성공!');
35
+ console.log('\n📥 응답 상태:', response.status);
36
+ console.log('📥 응답 데이터:', JSON.stringify(response.data, null, 2));
37
+ if (response.data.error) {
38
+ console.error('❌ MCP 에러:', response.data.error);
39
+ return false;
40
+ }
41
+ const tools = response.data.result?.tools || [];
42
+ console.log(`\n📋 도구 개수: ${tools.length}`);
43
+ if (tools.length > 0) {
44
+ console.log('\n📝 도구 목록:');
45
+ tools.forEach((tool, index) => {
46
+ console.log(`\n${index + 1}. ${tool.name}`);
47
+ if (tool.description) {
48
+ console.log(` 설명: ${tool.description}`);
49
+ }
50
+ if (tool.inputSchema?.properties) {
51
+ console.log(` 파라미터:`);
52
+ Object.entries(tool.inputSchema.properties).forEach(([key, value]) => {
53
+ console.log(` - ${key}: ${value.type || 'any'}`);
54
+ });
55
+ }
56
+ });
57
+ return true;
58
+ }
59
+ else {
60
+ console.log('⚠️ 도구가 없습니다.');
61
+ return false;
62
+ }
63
+ }
64
+ catch (error) {
65
+ if (axios.isAxiosError(error)) {
66
+ if (error.code === 'ECONNREFUSED') {
67
+ console.error('❌ 연결 거부됨 - 서버가 실행 중이지 않습니다.');
68
+ }
69
+ else if (error.code === 'ETIMEDOUT') {
70
+ console.error('❌ 타임아웃 - 서버가 응답하지 않습니다.');
71
+ }
72
+ else if (error.response) {
73
+ console.error(`❌ HTTP 에러: ${error.response.status} ${error.response.statusText}`);
74
+ console.error('응답 데이터:', error.response.data);
75
+ }
76
+ else {
77
+ console.error('❌ 연결 에러:', error.message);
78
+ }
79
+ }
80
+ else {
81
+ console.error('❌ 예상치 못한 에러:', error);
82
+ }
83
+ return false;
84
+ }
85
+ }
86
+ /**
87
+ * stdio 타입 MCP 서버는 직접 테스트하기 어려우므로 정보만 출력
88
+ */
89
+ function testStdioMCPServer(name, config) {
90
+ console.log(`\n${'='.repeat(60)}`);
91
+ console.log(`ℹ️ ${name} MCP 서버 정보`);
92
+ console.log('='.repeat(60));
93
+ console.log('타입: stdio');
94
+ console.log('명령:', config.command);
95
+ console.log('인자:', config.args?.join(' ') || '없음');
96
+ console.log('\n💡 stdio 타입 MCP 서버는 Cursor가 직접 관리합니다.');
97
+ console.log(' "Loading tools" 상태가 지속되면:');
98
+ console.log(' 1. Cursor를 재시작해보세요');
99
+ console.log(' 2. MCP 서버 설정을 확인하세요');
100
+ console.log(' 3. 환경 변수가 올바르게 설정되었는지 확인하세요');
101
+ if (config.env) {
102
+ console.log('\n환경 변수:');
103
+ Object.keys(config.env).forEach(key => {
104
+ if (key.includes('TOKEN') || key.includes('KEY') || key.includes('SECRET')) {
105
+ console.log(` ${key}: *** (보안상 숨김)`);
106
+ }
107
+ else {
108
+ console.log(` ${key}: ${config.env[key]}`);
109
+ }
110
+ });
111
+ }
112
+ }
113
+ async function main() {
114
+ console.log('🚀 MCP 서버 연결 테스트 시작\n');
115
+ // mcp.json 파일 읽기
116
+ const mcpConfigPath = join(process.env.HOME || '', '.cursor', 'mcp.json');
117
+ let mcpConfig = {};
118
+ try {
119
+ const fs = await import('fs/promises');
120
+ const configContent = await fs.readFile(mcpConfigPath, 'utf-8');
121
+ mcpConfig = JSON.parse(configContent);
122
+ console.log(`✅ mcp.json 파일 로드 성공: ${mcpConfigPath}\n`);
123
+ }
124
+ catch (error) {
125
+ console.error(`❌ mcp.json 파일을 읽을 수 없습니다: ${mcpConfigPath}`);
126
+ console.error('에러:', error);
127
+ process.exit(1);
128
+ }
129
+ if (!mcpConfig.mcpServers) {
130
+ console.error('❌ mcpServers 설정을 찾을 수 없습니다.');
131
+ process.exit(1);
132
+ }
133
+ const servers = mcpConfig.mcpServers;
134
+ const httpServers = [];
135
+ const stdioServers = [];
136
+ // 서버 분류
137
+ Object.entries(servers).forEach(([name, config]) => {
138
+ if (config.type === 'http' || config.url) {
139
+ httpServers.push({ name, url: config.url });
140
+ }
141
+ else if (config.type === 'stdio' || config.command) {
142
+ stdioServers.push({ name, config });
143
+ }
144
+ });
145
+ // HTTP 타입 서버 테스트
146
+ if (httpServers.length > 0) {
147
+ console.log(`\n📡 HTTP 타입 MCP 서버 (${httpServers.length}개):`);
148
+ for (const server of httpServers) {
149
+ await testHttpMCPServer(server.name, server.url);
150
+ }
151
+ }
152
+ // stdio 타입 서버 정보 출력
153
+ if (stdioServers.length > 0) {
154
+ console.log(`\n\n📡 stdio 타입 MCP 서버 (${stdioServers.length}개):`);
155
+ for (const server of stdioServers) {
156
+ testStdioMCPServer(server.name, server.config);
157
+ }
158
+ }
159
+ console.log(`\n${'='.repeat(60)}`);
160
+ console.log('✅ 테스트 완료');
161
+ console.log('='.repeat(60));
162
+ }
163
+ main().catch((error) => {
164
+ console.error('❌ 치명적 오류:', error);
165
+ process.exit(1);
166
+ });
package/dist/test.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/test.js ADDED
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import { DesignSystemService } from './services/design-system.js';
3
+ import { FigmaService } from './services/figma.js';
4
+ import { CodeGenerator } from './services/code-generator.js';
5
+ async function testServices() {
6
+ console.log('🧪 Testing Palette Services...\n');
7
+ // Test Design System Service
8
+ console.log('1. Testing Design System Service...');
9
+ const designSystemService = new DesignSystemService();
10
+ const reactComponents = await designSystemService.getAvailableComponents('react');
11
+ console.log(`✅ Found ${reactComponents.length} React components`);
12
+ const vueComponents = await designSystemService.getAvailableComponents('vue');
13
+ console.log(`✅ Found ${vueComponents.length} Vue components`);
14
+ // Test component matching
15
+ const buttonMatch = designSystemService.findBestMatch('button', 'react');
16
+ console.log(`✅ Button match: ${buttonMatch?.name || 'Not found'}`);
17
+ const inputMatch = designSystemService.findBestMatch('text-field', 'vue');
18
+ console.log(`✅ Input match: ${inputMatch?.name || 'Not found'}\n`);
19
+ // Test Figma Service (without actual API call)
20
+ console.log('2. Testing Figma Service...');
21
+ const figmaService = new FigmaService();
22
+ // Test URL parsing
23
+ try {
24
+ const fileId = figmaService['extractFileId']('https://www.figma.com/file/abc123/Test-File');
25
+ console.log(`✅ URL parsing works: ${fileId}`);
26
+ }
27
+ catch (error) {
28
+ console.log(`❌ URL parsing failed: ${error}`);
29
+ }
30
+ // Test Code Generator
31
+ console.log('3. Testing Code Generator...');
32
+ const codeGenerator = new CodeGenerator(designSystemService);
33
+ // Mock Figma data
34
+ const mockFigmaData = {
35
+ document: {
36
+ id: 'root',
37
+ name: 'Test Component',
38
+ type: 'FRAME',
39
+ children: [
40
+ {
41
+ id: 'button-1',
42
+ name: 'Submit Button',
43
+ type: 'RECTANGLE',
44
+ characters: 'Submit',
45
+ absoluteBoundingBox: { x: 0, y: 0, width: 100, height: 40 },
46
+ cornerRadius: 8,
47
+ fills: [{
48
+ type: 'SOLID',
49
+ color: { r: 0.2, g: 0.4, b: 0.8, a: 1 }
50
+ }]
51
+ }
52
+ ]
53
+ },
54
+ components: {},
55
+ styles: {},
56
+ name: 'Test File',
57
+ lastModified: '2024-01-01',
58
+ thumbnailUrl: ''
59
+ };
60
+ try {
61
+ const reactCode = await codeGenerator.generateReactComponent(mockFigmaData, 'TestComponent');
62
+ console.log('✅ React code generation works');
63
+ console.log('Generated React component preview:');
64
+ console.log(reactCode.split('\n').slice(0, 10).join('\n') + '...\n');
65
+ const vueCode = await codeGenerator.generateVueComponent(mockFigmaData, 'TestComponent');
66
+ console.log('✅ Vue code generation works');
67
+ console.log('Generated Vue component preview:');
68
+ console.log(vueCode.split('\n').slice(0, 10).join('\n') + '...\n');
69
+ }
70
+ catch (error) {
71
+ console.log(`❌ Code generation failed: ${error}`);
72
+ }
73
+ console.log('🎉 All tests completed!');
74
+ }
75
+ // Run tests
76
+ testServices().catch(console.error);
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "palette-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server for converting Figma designs to React/Vue components using design system",
5
5
  "main": "dist/index.js",
6
+ "module": "src/smithery.ts",
6
7
  "type": "module",
7
8
  "bin": {
8
9
  "palette": "./dist/index.js",
9
10
  "palette-mcp": "./dist/index.js"
10
11
  },
11
12
  "files": [
12
- "dist/index.js",
13
- "dist/index.d.ts",
14
- "dist/services/**/*",
15
- "dist/utils/**/*",
13
+ "dist/**/*",
14
+ "src/**/*",
16
15
  "README.md",
17
16
  "LICENSE",
18
17
  "smithery.yaml"
package/smithery.yaml CHANGED
@@ -1,61 +1,12 @@
1
1
  # Smithery.ai MCP Server Configuration
2
2
  # https://smithery.ai/docs/build/config
3
+ #
4
+ # 이 서버는 두 가지 모드를 지원합니다:
5
+ # - Remote: Smithery.ai에서 호스팅 (runtime: typescript)
6
+ # - Local: npx palette-mcp로 직접 실행
3
7
 
4
- name: palette-mcp
5
- version: 1.0.0
6
- description: |
7
- Convert Figma designs to React/Vue components using design system.
8
- Supports @dealicious/design-system-react and @dealicious/design-system components.
8
+ # TypeScript 런타임으로 Smithery 호스팅
9
+ runtime: typescript
9
10
 
10
- # Runtime specification (required)
11
- runtime: node
12
-
13
- # Start command configuration (required)
14
- startCommand:
15
- type: stdio
16
- configSchema:
17
- type: object
18
- properties:
19
- FIGMA_ACCESS_TOKEN:
20
- type: string
21
- description: |
22
- Figma Personal Access Token for API access.
23
- Get it from: https://www.figma.com/developers/api#access-tokens
24
- GITHUB_TOKEN:
25
- type: string
26
- description: |
27
- GitHub Personal Access Token for accessing @dealicious/design-system packages.
28
- Get it from: https://github.com/settings/tokens
29
- FIGMA_MCP_SERVER_URL:
30
- type: string
31
- description: |
32
- URL of the Figma MCP server (Figma Desktop Dev Mode).
33
- Default: http://127.0.0.1:3845/mcp
34
- default: "http://127.0.0.1:3845/mcp"
35
- required:
36
- - FIGMA_ACCESS_TOKEN
37
- - GITHUB_TOKEN
38
- - FIGMA_MCP_SERVER_URL
39
- commandFunction: |
40
- (config) => ({
41
- command: "npx",
42
- args: ["-y", "palette-mcp"],
43
- env: {
44
- FIGMA_ACCESS_TOKEN: config.FIGMA_ACCESS_TOKEN,
45
- GITHUB_TOKEN: config.GITHUB_TOKEN,
46
- FIGMA_MCP_SERVER_URL: config.FIGMA_MCP_SERVER_URL || "http://127.0.0.1:3845/mcp"
47
- }
48
- })
49
-
50
- # Environment variables as object (for documentation)
51
- env:
52
- FIGMA_ACCESS_TOKEN:
53
- description: Figma 개인 액세스 토큰 (필수)
54
- required: true
55
- GITHUB_TOKEN:
56
- description: 디자인 시스템 패키지 접근용 GitHub 토큰 (필수)
57
- required: true
58
- FIGMA_MCP_SERVER_URL:
59
- description: Figma MCP 서버 URL (필수)
60
- required: true
61
- default: "http://127.0.0.1:3845/mcp"
11
+ # Smithery가 로드할 모듈 (src/smithery.ts)
12
+ # package.json의 "module" 필드와 연동됨