gemini-design-mcp 3.10.0 → 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.
|
|
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
|
|
229
|
+
<import statements>
|
|
227
230
|
|
|
228
231
|
// SNIPPET:
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
481
|
+
console.error("gemini-design-mcp v3.10.1 running on stdio");
|
|
487
482
|
}
|
|
488
483
|
}
|
|
489
484
|
|
package/build/prompts/system.js
CHANGED
|
@@ -271,6 +271,7 @@ When existing project context is provided, you MUST:
|
|
|
271
271
|
- The new file must look like it belongs to the same project, not a "foreign" design
|
|
272
272
|
- Reuse existing component patterns, class naming conventions, and styling architecture
|
|
273
273
|
- Adapt to whatever styling system the project uses (analyze the context)
|
|
274
|
+
- DONT use fake "SYSTEM STATUS : OPERATIONAL" or something like that
|
|
274
275
|
|
|
275
276
|
---
|
|
276
277
|
|
|
@@ -281,6 +282,12 @@ When existing project context is provided, you MUST:
|
|
|
281
282
|
- The code must be ready to use as-is, no modifications needed
|
|
282
283
|
- Follow the tech stack conventions exactly
|
|
283
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
|
|
284
291
|
|
|
285
292
|
---
|
|
286
293
|
|
|
@@ -300,6 +307,11 @@ export const MODIFY_FRONTEND_PROMPT = `You are an elite UI/UX Designer making a
|
|
|
300
307
|
|
|
301
308
|
YOUR TASK: Apply ONE design modification and return ONLY the changed code.
|
|
302
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
|
+
|
|
303
315
|
CRITICAL RULES:
|
|
304
316
|
|
|
305
317
|
1. **SINGLE MODIFICATION ONLY**
|
|
@@ -332,8 +344,10 @@ OUTPUT FORMAT - STRICTLY FOLLOW THIS:
|
|
|
332
344
|
<new redesigned code>
|
|
333
345
|
\`\`\`
|
|
334
346
|
|
|
335
|
-
If
|
|
347
|
+
If external dependency is required, add it at the top:
|
|
336
348
|
\`\`\`
|
|
349
|
+
// REQUIRED DEPENDENCY: <package-name> (<install command>)
|
|
350
|
+
|
|
337
351
|
// NEW IMPORTS NEEDED:
|
|
338
352
|
import { X } from "y";
|
|
339
353
|
|
|
@@ -348,7 +362,8 @@ IMPORTANT:
|
|
|
348
362
|
- The "FIND THIS CODE" must be an EXACT match of existing code (copy-paste precision)
|
|
349
363
|
- Include enough context in "FIND THIS CODE" to make it unique in the file
|
|
350
364
|
- Return ONLY what needs to change, nothing else
|
|
351
|
-
- 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`;
|
|
352
367
|
// =============================================================================
|
|
353
368
|
// SNIPPET_FRONTEND PROMPT
|
|
354
369
|
// Used for generating code snippets to INSERT into existing files
|
|
@@ -357,6 +372,14 @@ export const SNIPPET_FRONTEND_PROMPT = `You are an elite UI/UX Designer generati
|
|
|
357
372
|
|
|
358
373
|
YOUR TASK: Generate a focused code snippet that will be INSERTED into an existing file.
|
|
359
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
|
+
|
|
360
383
|
SNIPPET PRINCIPLES:
|
|
361
384
|
|
|
362
385
|
1. **DESIGN SYSTEM INTEGRATION (CRITICAL - READ THIS FIRST)**
|
|
@@ -397,19 +420,30 @@ SNIPPET PRINCIPLES:
|
|
|
397
420
|
|
|
398
421
|
OUTPUT FORMAT:
|
|
399
422
|
|
|
400
|
-
If
|
|
423
|
+
If the component requires an external dependency:
|
|
401
424
|
\`\`\`
|
|
425
|
+
// REQUIRED DEPENDENCY: <package-name> (<install command for the tech stack>)
|
|
426
|
+
|
|
402
427
|
// NEW IMPORTS NEEDED:
|
|
403
|
-
import
|
|
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>
|
|
404
438
|
|
|
405
439
|
// SNIPPET:
|
|
406
|
-
<your code here>
|
|
440
|
+
<your functional code here>
|
|
407
441
|
\`\`\`
|
|
408
442
|
|
|
409
443
|
If no new imports needed:
|
|
410
444
|
\`\`\`
|
|
411
445
|
// SNIPPET:
|
|
412
|
-
<your code here>
|
|
446
|
+
<your functional code here>
|
|
413
447
|
\`\`\`
|
|
414
448
|
|
|
415
|
-
|
|
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, "
|
|
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, "
|
|
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 }],
|