gemini-design-mcp 3.10.1 → 3.11.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/build/index.js CHANGED
@@ -17,7 +17,7 @@ import { generateVibesSchema, generateVibes } from "./tools/generate-vibes.js";
17
17
  function createMcpServer() {
18
18
  const server = new McpServer({
19
19
  name: "gemini-design-mcp",
20
- version: "3.10.0",
20
+ version: "3.10.1",
21
21
  });
22
22
 
23
23
  // TOOL 1: CREATE_FRONTEND
@@ -222,25 +222,20 @@ Bad: "In the dashboard"
222
222
  📤 OUTPUT FORMAT
223
223
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
224
224
 
225
+ If external dependency required:
226
+ // REQUIRED DEPENDENCY: <package-name> (<install command>)
227
+
225
228
  // NEW IMPORTS NEEDED:
226
- import { Search } from "lucide-react";
229
+ <import statements>
227
230
 
228
231
  // SNIPPET:
229
- <div className="relative">
230
- <Search className="absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400" />
231
- <input
232
- value={searchQuery}
233
- onChange={(e) => setSearchQuery(e.target.value)}
234
- className="w-full pl-10 pr-4 py-2 bg-zinc-800 rounded-xl ..."
235
- />
236
- {showDropdown && (
237
- <div className="absolute top-full mt-2 w-full bg-zinc-800 rounded-xl shadow-2xl ...">
238
- {/* Premium designed dropdown content */}
239
- </div>
240
- )}
241
- </div>
232
+ <functional, interactive code>
233
+
234
+ ⚠️ Gemini ALWAYS returns FUNCTIONAL code - never static mockups.
235
+ If a component needs a library to work properly, Gemini specifies which one.
242
236
 
243
237
  YOU (the agent) are responsible for:
238
+ - Installing any REQUIRED DEPENDENCY specified by Gemini
244
239
  - Adding the logic (useState, handlers) BEFORE calling this tool
245
240
  - Inserting the returned snippet into the correct location in the file`, snippetFrontendSchema, snippetFrontend);
246
241
 
@@ -312,7 +307,7 @@ async function main() {
312
307
  res.json({
313
308
  status: "ok",
314
309
  service: "gemini-design-mcp",
315
- version: "3.10.0",
310
+ version: "3.10.1",
316
311
  transport: "streamable-http",
317
312
  timestamp: Date.now(),
318
313
  });
@@ -473,7 +468,7 @@ async function main() {
473
468
 
474
469
  const port = parseInt(process.env.PORT || "3000", 10);
475
470
  app.listen(port, "0.0.0.0", () => {
476
- console.log(`gemini-design-mcp v3.10.0 running on Streamable HTTP transport`);
471
+ console.log(`gemini-design-mcp v3.10.1 running on Streamable HTTP transport`);
477
472
  console.log(` MCP endpoint: http://0.0.0.0:${port}/mcp`);
478
473
  console.log(` Legacy SSE: http://0.0.0.0:${port}/sse`);
479
474
  console.log(` Health check: http://0.0.0.0:${port}/health`);
@@ -483,7 +478,7 @@ async function main() {
483
478
  const server = createMcpServer();
484
479
  const transport = new StdioServerTransport();
485
480
  await server.connect(transport);
486
- console.error("gemini-design-mcp v3.10.0 running on stdio");
481
+ console.error("gemini-design-mcp v3.10.1 running on stdio");
487
482
  }
488
483
  }
489
484
 
@@ -282,6 +282,12 @@ When existing project context is provided, you MUST:
282
282
  - The code must be ready to use as-is, no modifications needed
283
283
  - Follow the tech stack conventions exactly
284
284
  - Return ONLY the code, no explanations or markdown fences
285
+ - If the component requires external dependencies, add at the TOP of the file:
286
+ // REQUIRED DEPENDENCIES:
287
+ // - <package-name> (<install command>)
288
+ // - <another-package> (<install command>)
289
+ - ALWAYS return FUNCTIONAL, INTERACTIVE code - never static mockups or visual-only representations
290
+ - NEVER fake interactivity with hardcoded positions or visual tricks
285
291
 
286
292
  ---
287
293
 
@@ -301,6 +307,11 @@ export const MODIFY_FRONTEND_PROMPT = `You are an elite UI/UX Designer making a
301
307
 
302
308
  YOUR TASK: Apply ONE design modification and return ONLY the changed code.
303
309
 
310
+ CRITICAL RULE - FUNCTIONAL CODE ONLY:
311
+ - You MUST return WORKING, FUNCTIONAL, INTERACTIVE code - NEVER static mockups
312
+ - If the modification requires an external dependency, specify it: "// REQUIRED DEPENDENCY: <package-name> (<install command>)"
313
+ - NEVER fake interactivity with hardcoded positions or visual tricks
314
+
304
315
  CRITICAL RULES:
305
316
 
306
317
  1. **SINGLE MODIFICATION ONLY**
@@ -333,8 +344,10 @@ OUTPUT FORMAT - STRICTLY FOLLOW THIS:
333
344
  <new redesigned code>
334
345
  \`\`\`
335
346
 
336
- If new imports are needed, add them at the top:
347
+ If external dependency is required, add it at the top:
337
348
  \`\`\`
349
+ // REQUIRED DEPENDENCY: <package-name> (<install command>)
350
+
338
351
  // NEW IMPORTS NEEDED:
339
352
  import { X } from "y";
340
353
 
@@ -349,7 +362,8 @@ IMPORTANT:
349
362
  - The "FIND THIS CODE" must be an EXACT match of existing code (copy-paste precision)
350
363
  - Include enough context in "FIND THIS CODE" to make it unique in the file
351
364
  - Return ONLY what needs to change, nothing else
352
- - No explanations, no full file, just the find/replace block`;
365
+ - No explanations, no full file, just the find/replace block
366
+ - The code you return MUST be functional and interactive - never static mockups`;
353
367
  // =============================================================================
354
368
  // SNIPPET_FRONTEND PROMPT
355
369
  // Used for generating code snippets to INSERT into existing files
@@ -358,6 +372,14 @@ export const SNIPPET_FRONTEND_PROMPT = `You are an elite UI/UX Designer generati
358
372
 
359
373
  YOUR TASK: Generate a focused code snippet that will be INSERTED into an existing file.
360
374
 
375
+ CRITICAL RULE - FUNCTIONAL CODE ONLY:
376
+ - You MUST return WORKING, FUNCTIONAL, INTERACTIVE code - NEVER static mockups or visual-only representations
377
+ - If a component requires an external library/package/dependency to work properly (e.g., range sliders, date pickers, rich text editors, charts, maps, etc.), you MUST:
378
+ 1. Specify the required dependency at the top: "// REQUIRED DEPENDENCY: <package-name> (<install command>)"
379
+ 2. Generate code that USES that dependency
380
+ - NEVER fake interactivity with hardcoded positions, static values, or visual tricks - the code must actually work
381
+ - If you cannot provide functional code for a requested component, say so clearly and suggest alternatives
382
+
361
383
  SNIPPET PRINCIPLES:
362
384
 
363
385
  1. **DESIGN SYSTEM INTEGRATION (CRITICAL - READ THIS FIRST)**
@@ -398,19 +420,30 @@ SNIPPET PRINCIPLES:
398
420
 
399
421
  OUTPUT FORMAT:
400
422
 
401
- If new imports are needed:
423
+ If the component requires an external dependency:
402
424
  \`\`\`
425
+ // REQUIRED DEPENDENCY: <package-name> (<install command for the tech stack>)
426
+
403
427
  // NEW IMPORTS NEEDED:
404
- import { X } from "y";
428
+ <import statements>
429
+
430
+ // SNIPPET:
431
+ <your functional code here>
432
+ \`\`\`
433
+
434
+ If new imports are needed (but no external dependency):
435
+ \`\`\`
436
+ // NEW IMPORTS NEEDED:
437
+ <import statements>
405
438
 
406
439
  // SNIPPET:
407
- <your code here>
440
+ <your functional code here>
408
441
  \`\`\`
409
442
 
410
443
  If no new imports needed:
411
444
  \`\`\`
412
445
  // SNIPPET:
413
- <your code here>
446
+ <your functional code here>
414
447
  \`\`\`
415
448
 
416
- Return ONLY the code, no explanations.`;
449
+ CRITICAL: The code you return MUST be functional and interactive. Never return static mockups or visual-only representations.`;
@@ -45,7 +45,7 @@ ${targetCode}
45
45
  MODIFICATION REQUESTED: ${modification}
46
46
 
47
47
  Remember: Return ONLY the find/replace block. ONE modification, surgical precision.`.trim();
48
- const result = await generateWithGemini(systemPrompt, modification, undefined, "minimal", "modify_frontend");
48
+ const result = await generateWithGemini(systemPrompt, modification, undefined, "high", "modify_frontend");
49
49
  // Return the find/replace instructions for the agent to apply
50
50
  return {
51
51
  content: [{ type: "text", text: result }],
@@ -45,7 +45,7 @@ INSERTION CONTEXT:
45
45
  ${insertionContext}
46
46
 
47
47
  Generate a snippet that will integrate smoothly at this location.`.trim();
48
- const result = await generateWithGemini(systemPrompt, request, undefined, "minimal", "snippet_frontend");
48
+ const result = await generateWithGemini(systemPrompt, request, undefined, "high", "snippet_frontend");
49
49
  // Return the snippet for the agent to insert
50
50
  return {
51
51
  content: [{ type: "text", text: result }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemini-design-mcp",
3
- "version": "3.10.1",
3
+ "version": "3.11.0",
4
4
  "description": "MCP server that uses Gemini 3 Pro for frontend/design code generation",
5
5
  "main": "build/index.js",
6
6
  "bin": {