mozaic-mcp-server 2.5.5 → 2.7.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.
@@ -0,0 +1,313 @@
1
+ import { ConfigService } from "@nestjs/config";
2
+ interface McpToolCall {
3
+ name: string;
4
+ arguments?: Record<string, unknown>;
5
+ }
6
+ interface McpResponse {
7
+ content: Array<{
8
+ type: string;
9
+ text: string;
10
+ }>;
11
+ }
12
+ interface JsonRpcRequest {
13
+ jsonrpc: string;
14
+ method: string;
15
+ params?: {
16
+ name?: string;
17
+ arguments?: Record<string, unknown>;
18
+ };
19
+ id?: string | number;
20
+ }
21
+ export declare class McpLightController {
22
+ private configService;
23
+ private db;
24
+ constructor(configService: ConfigService);
25
+ handleJsonRpc(body: JsonRpcRequest | McpToolCall): McpResponse | {
26
+ jsonrpc: string;
27
+ id: string | number;
28
+ result: {
29
+ tools: ({
30
+ name: string;
31
+ description: string;
32
+ inputSchema: {
33
+ type: string;
34
+ properties: {
35
+ category: {
36
+ type: string;
37
+ enum: string[];
38
+ description: string;
39
+ default?: undefined;
40
+ };
41
+ format: {
42
+ type: string;
43
+ enum: string[];
44
+ default: string;
45
+ description: string;
46
+ };
47
+ name?: undefined;
48
+ includeClasses?: undefined;
49
+ query?: undefined;
50
+ type?: undefined;
51
+ size?: undefined;
52
+ limit?: undefined;
53
+ };
54
+ required: string[];
55
+ };
56
+ } | {
57
+ name: string;
58
+ description: string;
59
+ inputSchema: {
60
+ type: string;
61
+ properties: {
62
+ category: {
63
+ type: string;
64
+ enum: string[];
65
+ default: string;
66
+ description: string;
67
+ };
68
+ format?: undefined;
69
+ name?: undefined;
70
+ includeClasses?: undefined;
71
+ query?: undefined;
72
+ type?: undefined;
73
+ size?: undefined;
74
+ limit?: undefined;
75
+ };
76
+ required: any[];
77
+ };
78
+ } | {
79
+ name: string;
80
+ description: string;
81
+ inputSchema: {
82
+ type: string;
83
+ properties: {
84
+ name: {
85
+ type: string;
86
+ description: string;
87
+ };
88
+ includeClasses: {
89
+ type: string;
90
+ default: boolean;
91
+ description: string;
92
+ };
93
+ category?: undefined;
94
+ format?: undefined;
95
+ query?: undefined;
96
+ type?: undefined;
97
+ size?: undefined;
98
+ limit?: undefined;
99
+ };
100
+ required: string[];
101
+ };
102
+ } | {
103
+ name: string;
104
+ description: string;
105
+ inputSchema: {
106
+ type: string;
107
+ properties: {
108
+ query: {
109
+ type: string;
110
+ description: string;
111
+ };
112
+ type: {
113
+ type: string;
114
+ description: string;
115
+ };
116
+ size: {
117
+ type: string;
118
+ description: string;
119
+ };
120
+ limit: {
121
+ type: string;
122
+ default: number;
123
+ description: string;
124
+ };
125
+ category?: undefined;
126
+ format?: undefined;
127
+ name?: undefined;
128
+ includeClasses?: undefined;
129
+ };
130
+ required: string[];
131
+ };
132
+ } | {
133
+ name: string;
134
+ description: string;
135
+ inputSchema: {
136
+ type: string;
137
+ properties: {
138
+ name: {
139
+ type: string;
140
+ description: string;
141
+ };
142
+ format: {
143
+ type: string;
144
+ enum: string[];
145
+ default: string;
146
+ description: string;
147
+ };
148
+ category?: undefined;
149
+ includeClasses?: undefined;
150
+ query?: undefined;
151
+ type?: undefined;
152
+ size?: undefined;
153
+ limit?: undefined;
154
+ };
155
+ required: string[];
156
+ };
157
+ })[];
158
+ };
159
+ error?: undefined;
160
+ } | {
161
+ jsonrpc: string;
162
+ id: string | number;
163
+ error: {
164
+ code: number;
165
+ message: string;
166
+ };
167
+ result?: undefined;
168
+ } | {
169
+ jsonrpc: string;
170
+ id: string | number;
171
+ result: McpResponse;
172
+ error?: undefined;
173
+ };
174
+ listTools(): {
175
+ tools: ({
176
+ name: string;
177
+ description: string;
178
+ inputSchema: {
179
+ type: string;
180
+ properties: {
181
+ category: {
182
+ type: string;
183
+ enum: string[];
184
+ description: string;
185
+ default?: undefined;
186
+ };
187
+ format: {
188
+ type: string;
189
+ enum: string[];
190
+ default: string;
191
+ description: string;
192
+ };
193
+ name?: undefined;
194
+ includeClasses?: undefined;
195
+ query?: undefined;
196
+ type?: undefined;
197
+ size?: undefined;
198
+ limit?: undefined;
199
+ };
200
+ required: string[];
201
+ };
202
+ } | {
203
+ name: string;
204
+ description: string;
205
+ inputSchema: {
206
+ type: string;
207
+ properties: {
208
+ category: {
209
+ type: string;
210
+ enum: string[];
211
+ default: string;
212
+ description: string;
213
+ };
214
+ format?: undefined;
215
+ name?: undefined;
216
+ includeClasses?: undefined;
217
+ query?: undefined;
218
+ type?: undefined;
219
+ size?: undefined;
220
+ limit?: undefined;
221
+ };
222
+ required: any[];
223
+ };
224
+ } | {
225
+ name: string;
226
+ description: string;
227
+ inputSchema: {
228
+ type: string;
229
+ properties: {
230
+ name: {
231
+ type: string;
232
+ description: string;
233
+ };
234
+ includeClasses: {
235
+ type: string;
236
+ default: boolean;
237
+ description: string;
238
+ };
239
+ category?: undefined;
240
+ format?: undefined;
241
+ query?: undefined;
242
+ type?: undefined;
243
+ size?: undefined;
244
+ limit?: undefined;
245
+ };
246
+ required: string[];
247
+ };
248
+ } | {
249
+ name: string;
250
+ description: string;
251
+ inputSchema: {
252
+ type: string;
253
+ properties: {
254
+ query: {
255
+ type: string;
256
+ description: string;
257
+ };
258
+ type: {
259
+ type: string;
260
+ description: string;
261
+ };
262
+ size: {
263
+ type: string;
264
+ description: string;
265
+ };
266
+ limit: {
267
+ type: string;
268
+ default: number;
269
+ description: string;
270
+ };
271
+ category?: undefined;
272
+ format?: undefined;
273
+ name?: undefined;
274
+ includeClasses?: undefined;
275
+ };
276
+ required: string[];
277
+ };
278
+ } | {
279
+ name: string;
280
+ description: string;
281
+ inputSchema: {
282
+ type: string;
283
+ properties: {
284
+ name: {
285
+ type: string;
286
+ description: string;
287
+ };
288
+ format: {
289
+ type: string;
290
+ enum: string[];
291
+ default: string;
292
+ description: string;
293
+ };
294
+ category?: undefined;
295
+ includeClasses?: undefined;
296
+ query?: undefined;
297
+ type?: undefined;
298
+ size?: undefined;
299
+ limit?: undefined;
300
+ };
301
+ required: string[];
302
+ };
303
+ })[];
304
+ };
305
+ callTool(body: McpToolCall): McpResponse;
306
+ private getDesignTokens;
307
+ private listCssUtilities;
308
+ private getCssUtility;
309
+ private searchIcons;
310
+ private getIcon;
311
+ }
312
+ export {};
313
+ //# sourceMappingURL=mcp-light.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-light.controller.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp-light.controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAqD/C,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,qBAIa,kBAAkB;IAGjB,OAAO,CAAC,aAAa;IAFjC,OAAO,CAAC,EAAE,CAAoB;gBAEV,aAAa,EAAE,aAAa;IAShD,aAAa,CAAS,IAAI,EAAE,cAAc,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6DxD,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+HT,QAAQ,CAAS,IAAI,EAAE,WAAW,GAAG,WAAW;IA0BhD,OAAO,CAAC,eAAe;IAuDvB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,aAAa;IAmCrB,OAAO,CAAC,WAAW;IA8CnB,OAAO,CAAC,OAAO;CAuDhB"}
@@ -0,0 +1,466 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { Controller, Post, Body, UseGuards, HttpCode, HttpStatus } from "@nestjs/common";
14
+ import { ApiTags, ApiOperation, ApiBearerAuth } from "@nestjs/swagger";
15
+ import { AuthGuard } from "../auth/auth.guard.js";
16
+ import Database from "better-sqlite3";
17
+ import { ConfigService } from "@nestjs/config";
18
+ import { getTokensByCategory, getCssUtility, listCssUtilities, searchIcons, getIconByName, } from "../db/queries.js";
19
+ import { mapCategoryToDbCategories } from "../parsers/tokens-parser.js";
20
+ import { generateSvg } from "../parsers/icons-parser.js";
21
+ // Token formatting functions
22
+ function formatAsScss(tokens) {
23
+ const lines = [];
24
+ for (const token of tokens) {
25
+ const varName = token.scssVariable || `$${token.path.replace(/\./g, "-")}`;
26
+ lines.push(`${varName}: ${token.valueRaw};`);
27
+ }
28
+ return lines.join("\n");
29
+ }
30
+ function formatAsCss(tokens) {
31
+ const lines = [":root {"];
32
+ for (const token of tokens) {
33
+ const varName = token.cssVariable || `--${token.path.replace(/\./g, "-")}`;
34
+ lines.push(` ${varName}: ${token.valueRaw};`);
35
+ }
36
+ lines.push("}");
37
+ return lines.join("\n");
38
+ }
39
+ function formatAsJs(tokens) {
40
+ const obj = {};
41
+ for (const token of tokens) {
42
+ const parts = token.path.split(".");
43
+ let current = obj;
44
+ for (let i = 0; i < parts.length - 1; i++) {
45
+ const part = parts[i];
46
+ if (!(part in current)) {
47
+ current[part] = {};
48
+ }
49
+ current = current[part];
50
+ }
51
+ current[parts[parts.length - 1]] = token.valueRaw;
52
+ }
53
+ return `export const tokens = ${JSON.stringify(obj, null, 2)};`;
54
+ }
55
+ let McpLightController = class McpLightController {
56
+ configService;
57
+ db;
58
+ constructor(configService) {
59
+ this.configService = configService;
60
+ const dbPath = this.configService.get("database.path");
61
+ this.db = new Database(dbPath, { readonly: true });
62
+ this.db.pragma("journal_mode = WAL");
63
+ }
64
+ handleJsonRpc(body) {
65
+ // Check if this is a JSON-RPC 2.0 request
66
+ if ("jsonrpc" in body && body.jsonrpc === "2.0") {
67
+ const request = body;
68
+ try {
69
+ switch (request.method) {
70
+ case "tools/list":
71
+ return {
72
+ jsonrpc: "2.0",
73
+ id: request.id,
74
+ result: this.listTools(),
75
+ };
76
+ case "tools/call":
77
+ if (!request.params?.name) {
78
+ return {
79
+ jsonrpc: "2.0",
80
+ id: request.id,
81
+ error: {
82
+ code: -32602,
83
+ message: "Invalid params: 'name' is required",
84
+ },
85
+ };
86
+ }
87
+ return {
88
+ jsonrpc: "2.0",
89
+ id: request.id,
90
+ result: this.callTool({
91
+ name: request.params.name,
92
+ arguments: request.params.arguments,
93
+ }),
94
+ };
95
+ default:
96
+ return {
97
+ jsonrpc: "2.0",
98
+ id: request.id,
99
+ error: {
100
+ code: -32601,
101
+ message: `Method not found: ${request.method}`,
102
+ },
103
+ };
104
+ }
105
+ }
106
+ catch (error) {
107
+ const errorMessage = error instanceof Error ? error.message : "Internal error";
108
+ return {
109
+ jsonrpc: "2.0",
110
+ id: request.id,
111
+ error: {
112
+ code: -32603,
113
+ message: errorMessage,
114
+ },
115
+ };
116
+ }
117
+ }
118
+ // Fallback: treat as simple tool call request
119
+ return this.callTool(body);
120
+ }
121
+ listTools() {
122
+ return {
123
+ tools: [
124
+ {
125
+ name: "get_design_tokens",
126
+ description: "Get Mozaic design tokens (colors, typography, spacing, shadows, borders, screens, grid) in various formats (JSON, SCSS, CSS, JS)",
127
+ inputSchema: {
128
+ type: "object",
129
+ properties: {
130
+ category: {
131
+ type: "string",
132
+ enum: [
133
+ "colors",
134
+ "typography",
135
+ "spacing",
136
+ "shadows",
137
+ "borders",
138
+ "screens",
139
+ "grid",
140
+ "all",
141
+ ],
142
+ description: "Token category to retrieve",
143
+ },
144
+ format: {
145
+ type: "string",
146
+ enum: ["json", "scss", "css", "js"],
147
+ default: "json",
148
+ description: "Output format",
149
+ },
150
+ },
151
+ required: ["category"],
152
+ },
153
+ },
154
+ {
155
+ name: "list_css_utilities",
156
+ description: "List Mozaic CSS utilities (Flexy grid, Container, Margin, Padding, Ratio, Scroll). CSS-only, no framework needed.",
157
+ inputSchema: {
158
+ type: "object",
159
+ properties: {
160
+ category: {
161
+ type: "string",
162
+ enum: ["layout", "utility", "all"],
163
+ default: "all",
164
+ description: "Filter: layout (Flexy, Container) or utility (Margin, Padding, etc.)",
165
+ },
166
+ },
167
+ required: [],
168
+ },
169
+ },
170
+ {
171
+ name: "get_css_utility",
172
+ description: "Get CSS utility classes and examples. Available: flexy, container, margin, padding, ratio, scroll.",
173
+ inputSchema: {
174
+ type: "object",
175
+ properties: {
176
+ name: {
177
+ type: "string",
178
+ description: "Utility name (e.g., 'flexy', 'margin', 'padding')",
179
+ },
180
+ includeClasses: {
181
+ type: "boolean",
182
+ default: true,
183
+ description: "Include all CSS class names",
184
+ },
185
+ },
186
+ required: ["name"],
187
+ },
188
+ },
189
+ {
190
+ name: "search_icons",
191
+ description: "Search Mozaic icons by name or type. Returns icon names, types, and available sizes (16, 24, 32, 48, 64).",
192
+ inputSchema: {
193
+ type: "object",
194
+ properties: {
195
+ query: {
196
+ type: "string",
197
+ description: 'Search query (e.g., "arrow", "cart", "user")',
198
+ },
199
+ type: {
200
+ type: "string",
201
+ description: 'Filter by type (e.g., "navigation", "media", "social")',
202
+ },
203
+ size: {
204
+ type: "number",
205
+ description: "Filter by size (16, 24, 32, 48, 64)",
206
+ },
207
+ limit: {
208
+ type: "number",
209
+ default: 20,
210
+ description: "Max results",
211
+ },
212
+ },
213
+ required: ["query"],
214
+ },
215
+ },
216
+ {
217
+ name: "get_icon",
218
+ description: "Get specific icon by name with SVG markup. Use search_icons first to find names.",
219
+ inputSchema: {
220
+ type: "object",
221
+ properties: {
222
+ name: {
223
+ type: "string",
224
+ description: 'Icon name (e.g., "ArrowArrowBottom16", "Cart24")',
225
+ },
226
+ format: {
227
+ type: "string",
228
+ enum: ["svg", "json"],
229
+ default: "json",
230
+ description: "Output: svg (raw SVG) or json (metadata + SVG)",
231
+ },
232
+ },
233
+ required: ["name"],
234
+ },
235
+ },
236
+ ],
237
+ };
238
+ }
239
+ callTool(body) {
240
+ const { name, arguments: args = {} } = body;
241
+ switch (name) {
242
+ case "get_design_tokens":
243
+ return this.getDesignTokens(args);
244
+ case "list_css_utilities":
245
+ return this.listCssUtilities(args);
246
+ case "get_css_utility":
247
+ return this.getCssUtility(args);
248
+ case "search_icons":
249
+ return this.searchIcons(args);
250
+ case "get_icon":
251
+ return this.getIcon(args);
252
+ default:
253
+ return {
254
+ content: [
255
+ {
256
+ type: "text",
257
+ text: JSON.stringify({ error: `Unknown tool: ${name}` }),
258
+ },
259
+ ],
260
+ };
261
+ }
262
+ }
263
+ getDesignTokens(args) {
264
+ const { category, format = "json" } = args;
265
+ let tokens = [];
266
+ if (category === "all") {
267
+ tokens = getTokensByCategory(this.db, "all");
268
+ }
269
+ else {
270
+ const dbCategories = mapCategoryToDbCategories(category);
271
+ for (const cat of dbCategories) {
272
+ tokens.push(...getTokensByCategory(this.db, cat));
273
+ }
274
+ }
275
+ if (tokens.length === 0) {
276
+ return {
277
+ content: [{ type: "text", text: `No tokens found for category: ${category}` }],
278
+ };
279
+ }
280
+ let output;
281
+ switch (format) {
282
+ case "scss":
283
+ output = formatAsScss(tokens);
284
+ break;
285
+ case "css":
286
+ output = formatAsCss(tokens);
287
+ break;
288
+ case "js":
289
+ output = formatAsJs(tokens);
290
+ break;
291
+ case "json":
292
+ default:
293
+ output = JSON.stringify(tokens.map((t) => ({
294
+ category: t.category,
295
+ subcategory: t.subcategory,
296
+ name: t.name,
297
+ path: t.path,
298
+ value: t.valueRaw,
299
+ valueComputed: t.valueComputed,
300
+ cssVariable: t.cssVariable,
301
+ scssVariable: t.scssVariable,
302
+ description: t.description,
303
+ })), null, 2);
304
+ break;
305
+ }
306
+ return { content: [{ type: "text", text: output }] };
307
+ }
308
+ listCssUtilities(args) {
309
+ const { category = "all" } = args;
310
+ const utilities = listCssUtilities(this.db, category);
311
+ const output = utilities.map((u) => ({
312
+ name: u.name,
313
+ slug: u.slug,
314
+ category: u.category,
315
+ description: u.description,
316
+ classCount: u.classCount,
317
+ }));
318
+ return {
319
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
320
+ };
321
+ }
322
+ getCssUtility(args) {
323
+ const { name, includeClasses = true } = args;
324
+ const utility = getCssUtility(this.db, name.toLowerCase());
325
+ if (!utility) {
326
+ return {
327
+ content: [
328
+ {
329
+ type: "text",
330
+ text: JSON.stringify({
331
+ error: `CSS utility not found: ${name}`,
332
+ available: ["flexy", "container", "margin", "padding", "ratio", "scroll"],
333
+ }),
334
+ },
335
+ ],
336
+ };
337
+ }
338
+ const output = {
339
+ name: utility.name,
340
+ category: utility.category,
341
+ description: utility.description,
342
+ classes: includeClasses ? utility.classes : [],
343
+ examples: utility.examples.map((e) => ({
344
+ title: e.title,
345
+ code: e.code,
346
+ })),
347
+ };
348
+ return {
349
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
350
+ };
351
+ }
352
+ searchIcons(args) {
353
+ const { query, type, size, limit = 20, } = args;
354
+ const terms = query
355
+ .trim()
356
+ .split(/\s+/)
357
+ .filter((t) => t.length > 1);
358
+ const ftsQuery = terms.length > 0 ? terms.map((t) => `${t}*`).join(" OR ") : `${query}*`;
359
+ const results = searchIcons(this.db, ftsQuery, { type, size, limit });
360
+ const grouped = new Map();
361
+ for (const icon of results) {
362
+ const key = icon.iconName;
363
+ if (!grouped.has(key)) {
364
+ grouped.set(key, { iconName: icon.iconName, type: icon.type, sizes: [] });
365
+ }
366
+ grouped.get(key)?.sizes.push(icon.size);
367
+ }
368
+ const output = {
369
+ query,
370
+ resultCount: results.length,
371
+ uniqueIcons: grouped.size,
372
+ icons: Array.from(grouped.values()).map((g) => ({
373
+ name: g.iconName,
374
+ type: g.type,
375
+ availableSizes: g.sizes.sort((a, b) => a - b),
376
+ })),
377
+ };
378
+ return {
379
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
380
+ };
381
+ }
382
+ getIcon(args) {
383
+ const { name, format = "json" } = args;
384
+ let icon = getIconByName(this.db, name);
385
+ if (!icon) {
386
+ for (const size of [16, 24, 32, 48, 64]) {
387
+ icon = getIconByName(this.db, `${name}${size}`);
388
+ if (icon)
389
+ break;
390
+ }
391
+ }
392
+ if (!icon) {
393
+ return {
394
+ content: [
395
+ {
396
+ type: "text",
397
+ text: JSON.stringify({
398
+ error: `Icon not found: ${name}`,
399
+ hint: "Use search_icons to find icons",
400
+ }),
401
+ },
402
+ ],
403
+ };
404
+ }
405
+ const parsedIcon = {
406
+ name: icon.name,
407
+ iconName: icon.iconName,
408
+ type: icon.type,
409
+ size: icon.size,
410
+ viewBox: icon.viewBox,
411
+ paths: icon.paths,
412
+ };
413
+ if (format === "svg") {
414
+ return {
415
+ content: [{ type: "text", text: generateSvg(parsedIcon) }],
416
+ };
417
+ }
418
+ const output = {
419
+ name: icon.name,
420
+ iconName: icon.iconName,
421
+ type: icon.type,
422
+ size: icon.size,
423
+ viewBox: icon.viewBox,
424
+ svg: generateSvg(parsedIcon),
425
+ rawPaths: icon.paths,
426
+ };
427
+ return {
428
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
429
+ };
430
+ }
431
+ };
432
+ __decorate([
433
+ Post(),
434
+ HttpCode(HttpStatus.OK),
435
+ ApiOperation({ summary: "JSON-RPC 2.0 endpoint for MCP Light protocol" }),
436
+ __param(0, Body()),
437
+ __metadata("design:type", Function),
438
+ __metadata("design:paramtypes", [Object]),
439
+ __metadata("design:returntype", void 0)
440
+ ], McpLightController.prototype, "handleJsonRpc", null);
441
+ __decorate([
442
+ Post("list-tools"),
443
+ HttpCode(HttpStatus.OK),
444
+ ApiOperation({ summary: "List available lightweight MCP tools (tokens, utilities, icons only)" }),
445
+ __metadata("design:type", Function),
446
+ __metadata("design:paramtypes", []),
447
+ __metadata("design:returntype", void 0)
448
+ ], McpLightController.prototype, "listTools", null);
449
+ __decorate([
450
+ Post("call-tool"),
451
+ HttpCode(HttpStatus.OK),
452
+ ApiOperation({ summary: "Call a lightweight MCP tool" }),
453
+ __param(0, Body()),
454
+ __metadata("design:type", Function),
455
+ __metadata("design:paramtypes", [Object]),
456
+ __metadata("design:returntype", Object)
457
+ ], McpLightController.prototype, "callTool", null);
458
+ McpLightController = __decorate([
459
+ ApiTags("MCP Light"),
460
+ Controller("mcp/light"),
461
+ UseGuards(AuthGuard),
462
+ ApiBearerAuth(),
463
+ __metadata("design:paramtypes", [ConfigService])
464
+ ], McpLightController);
465
+ export { McpLightController };
466
+ //# sourceMappingURL=mcp-light.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-light.controller.js","sourceRoot":"","sources":["../../src/mcp/mcp-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;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,EAAE,WAAW,CAAC,UAAU,CAAC;YAC5B,QAAQ,EAAE,IAAI,CAAC,KAAK;SACrB,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC;CACF,CAAA;AAtaC;IAHC,IAAI,EAAE;IACN,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,EAAE,8CAA8C,EAAE,CAAC;IAC3D,WAAA,IAAI,EAAE,CAAA;;;;uDAwDpB;AAKD;IAHC,IAAI,CAAC,YAAY,CAAC;IAClB,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,EAAE,sEAAsE,EAAE,CAAC;;;;mDA2HjG;AAKD;IAHC,IAAI,CAAC,WAAW,CAAC;IACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IAC/C,WAAA,IAAI,EAAE,CAAA;;;;kDAwBf;AAhOU,kBAAkB;IAJ9B,OAAO,CAAC,WAAW,CAAC;IACpB,UAAU,CAAC,WAAW,CAAC;IACvB,SAAS,CAAC,SAAS,CAAC;IACpB,aAAa,EAAE;qCAIqB,aAAa;GAHrC,kBAAkB,CAkb9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.module.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.module.ts"],"names":[],"mappings":"AAIA,qBAKa,SAAS;CAAG"}
1
+ {"version":3,"file":"mcp.module.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.module.ts"],"names":[],"mappings":"AAKA,qBAKa,SAAS;CAAG"}
@@ -6,12 +6,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { Module } from "@nestjs/common";
8
8
  import { McpController } from "./mcp.controller.js";
9
+ import { McpLightController } from "./mcp-light.controller.js";
9
10
  import { McpService } from "./mcp.service.js";
10
11
  let McpModule = class McpModule {
11
12
  };
12
13
  McpModule = __decorate([
13
14
  Module({
14
- controllers: [McpController],
15
+ controllers: [McpController, McpLightController],
15
16
  providers: [McpService],
16
17
  exports: [McpService],
17
18
  })
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.module.js","sourceRoot":"","sources":["../../src/mcp/mcp.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOvC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,SAAS;IALrB,MAAM,CAAC;QACN,WAAW,EAAE,CAAC,aAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,UAAU,CAAC;QACvB,OAAO,EAAE,CAAC,UAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
1
+ {"version":3,"file":"mcp.module.js","sourceRoot":"","sources":["../../src/mcp/mcp.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOvC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,SAAS;IALrB,MAAM,CAAC;QACN,WAAW,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC;QAChD,SAAS,EAAE,CAAC,UAAU,CAAC;QACvB,OAAO,EAAE,CAAC,UAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
@@ -8,9 +8,9 @@ import { z } from "zod";
8
8
  declare const _ListFreemarkerInputSchema: z.ZodObject<{
9
9
  category: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "action", "form", "feedback", "navigation", "layout", "data-display", "other"]>>>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- category?: "all" | "form" | "navigation" | "feedback" | "layout" | "data-display" | "action" | "other";
11
+ category?: "all" | "layout" | "form" | "navigation" | "feedback" | "data-display" | "action" | "other";
12
12
  }, {
13
- category?: "all" | "form" | "navigation" | "feedback" | "layout" | "data-display" | "action" | "other";
13
+ category?: "all" | "layout" | "form" | "navigation" | "feedback" | "data-display" | "action" | "other";
14
14
  }>;
15
15
  export type ListFreemarkerInput = z.infer<typeof _ListFreemarkerInputSchema>;
16
16
  export declare function handleListFreemarker(db: Database.Database, input: ListFreemarkerInput): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozaic-mcp-server",
3
- "version": "2.5.5",
3
+ "version": "2.7.0",
4
4
  "description": "Self-contained Claude Code skills for Mozaic Design System by ADEO",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",