@dynamic-mockups/mcp 1.1.1 → 1.2.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/README.md CHANGED
@@ -71,6 +71,7 @@ If you want to connect via HTTP instead of NPX, use:
71
71
  | `get_mockups` | Get list of available mockups with optional filters |
72
72
  | `get_mockup_by_uuid` | Retrieve a specific mockup by UUID |
73
73
  | `search_products` | Search the POD product catalog used to ground MockAnything AI generations |
74
+ | `get_styles` | List visual styles available for MockAnything AI generation (optionally filtered by model) |
74
75
  | `create_mockup` | Create a new AI mockup template from a prompt or image URL |
75
76
  | `get_mockup_creation_status` | Poll the status of a mockup creation task |
76
77
  | `create_render` | Create a single mockup render with design assets (1 credit) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-mockups/mcp",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Official Dynamic Mockups MCP Server - Generate product mockups with AI assistants",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -542,9 +542,10 @@ function getApiKey(extra) {
542
542
  //
543
543
  // WORKFLOW FOR CREATING NEW MOCKUPS WITH AI (MockAnything):
544
544
  // 1. (Optional) Call search_products to find a POD product UUID for grounding
545
- // 2. Call create_mockup with prompt or image_url -> returns task_id
546
- // 3. Poll get_mockup_creation_status with task_id until state=SUCCESS -> returns mockup payload
547
- // 4. Use mockup.uuid as mockup_uuid in create_render (works exactly like classic mockups)
545
+ // 2. (Optional, prompt flow only) Call get_styles to list visual styles for a model, then pass the style id in create_mockup
546
+ // 3. Call create_mockup with prompt or image_url -> returns task_id
547
+ // 4. Poll get_mockup_creation_status with task_id until state=SUCCESS -> returns mockup payload
548
+ // 5. Use mockup.uuid as mockup_uuid in create_render (works exactly like classic mockups)
548
549
  //
549
550
  // WHEN TO USE EACH TOOL:
550
551
  // - get_api_info: First call when user asks about limits, pricing, or capabilities
@@ -554,6 +555,7 @@ function getApiKey(extra) {
554
555
  // - get_mockups: PRIMARY tool - lists templates WITH smart_object UUIDs ready for rendering
555
556
  // - get_mockup_by_uuid: Only when user needs ONE specific template (already has UUID)
556
557
  // - search_products: Find a POD product UUID to ground MockAnything AI generations
558
+ // - get_styles: List visual styles available for a MockAnything AI model (e.g. polaroid-etsy, ugc, fashion)
557
559
  // - create_mockup: Create a brand-new mockup on the fly via AI prompt or image URL
558
560
  // - get_mockup_creation_status: Poll a MockAnything task until the mockup is ready for rendering
559
561
  // - create_render: For generating 1 mockup image
@@ -829,6 +831,36 @@ RETURNS: Array of {name, uuid} POD product entries matching the query.`,
829
831
  required: ["query"],
830
832
  },
831
833
  },
834
+ {
835
+ name: "get_styles",
836
+ description: `List visual styles that can be applied to a MockAnything AI generation (e.g. polaroid-etsy, ugc, fashion, urban).
837
+
838
+ API: GET /mock-anything/styles
839
+
840
+ WHEN TO USE: When user wants the AI output to land in a specific aesthetic (warm Polaroid, editorial flash, casual UGC, etc.) instead of the default photographic look. Call this BEFORE create_mockup to discover which styles are valid for the chosen model - not every model supports every style.
841
+
842
+ WORKFLOW:
843
+ 1. Call this tool with the model you intend to pass to create_mockup
844
+ 2. Read each style's description to pick the look you want
845
+ 3. Pass the chosen style id as 'style' in create_mockup (along with the same model)
846
+
847
+ NOTES:
848
+ - Style only applies to the prompt flow (ignored for image_url).
849
+ - When style is provided to create_mockup, model is REQUIRED.
850
+ - Omit the model param here to list every known style across all models (broadest set).
851
+
852
+ RETURNS: Array of {id, description, available_with} style entries.`,
853
+ inputSchema: {
854
+ type: "object",
855
+ properties: {
856
+ model: {
857
+ type: "string",
858
+ enum: ["seedream_4_0", "seedream_4_5", "nano_banana_2"],
859
+ description: "Optional. Filter styles to those supported by this model. Omit to list every style across all models.",
860
+ },
861
+ },
862
+ },
863
+ },
832
864
  {
833
865
  name: "create_mockup",
834
866
  description: `Create a new MockAnything AI mockup template on the fly. The resulting mockup behaves exactly like one returned by get_mockups - pass its uuid to create_render to print artwork on it.
@@ -849,9 +881,10 @@ EXACTLY ONE of these must be provided:
849
881
 
850
882
  WORKFLOW:
851
883
  1. (Optional) Call search_products to find a product UUID for grounding the AI
852
- 2. Call this tool with prompt OR image_url
853
- 3. Use the returned task_id with get_mockup_creation_status, polling every ~2 seconds until state=SUCCESS
854
- 4. Use the returned mockup.uuid as mockup_uuid in create_render
884
+ 2. (Optional, prompt flow only) Call get_styles to pick a visual style for a given model
885
+ 3. Call this tool with prompt OR image_url
886
+ 4. Use the returned task_id with get_mockup_creation_status, polling every ~2 seconds until state=SUCCESS
887
+ 5. Use the returned mockup.uuid as mockup_uuid in create_render
855
888
 
856
889
  MODELS (only apply to the prompt flow):
857
890
  - seedream_4_0 (default, 5 credits, ~20s, medium quality) - quick iterations
@@ -859,7 +892,8 @@ MODELS (only apply to the prompt flow):
859
892
  - nano_banana_2 (14 credits, ~30s, high quality) - production-ready final mockups
860
893
 
861
894
  NOTES:
862
- - product.uuid, model, and enhance_prompt only apply to the prompt flow (ignored otherwise).
895
+ - product.uuid, model, style, and enhance_prompt only apply to the prompt flow (ignored otherwise).
896
+ - style applies a visual aesthetic (e.g. polaroid-etsy, ugc, fashion). Discover valid values via get_styles. When style is set, model is REQUIRED — not every model supports every style.
863
897
  - collections accepts existing collections (by uuid) or new ones (by name, find-or-create).
864
898
  - Rate limit: 50 requests/minute on this endpoint.
865
899
  - File uploads (multipart image_file) are not supported via MCP - host the image and pass image_url.
@@ -893,7 +927,11 @@ RETURNS: {task_id, status} - the task_id will also be the mockup.uuid once the t
893
927
  model: {
894
928
  type: "string",
895
929
  enum: ["seedream_4_0", "seedream_4_5", "nano_banana_2"],
896
- description: "Optional. AI model used for generation. Default: seedream_4_0. Only applies to the prompt flow.",
930
+ description: "Optional. AI model used for generation. Default: seedream_4_0. Only applies to the prompt flow. REQUIRED when style is provided.",
931
+ },
932
+ style: {
933
+ type: "string",
934
+ description: "Optional. Visual style applied to the AI generation (e.g. 'polaroid-etsy', 'ugc', 'fashion'). Discover valid ids via get_styles. Only applies to the prompt flow. When set, model is REQUIRED and must support this style (use get_styles?model=... to verify).",
897
935
  },
898
936
  name: {
899
937
  type: "string",
@@ -1149,7 +1187,7 @@ Use cases:
1149
1187
 
1150
1188
  PREREQUISITES: Call get_mockups first - it returns both mockup_uuid AND smart_object uuids for all templates.
1151
1189
 
1152
- RETURNS: {total_renders, successful_renders, failed_renders, renders[]} where each render has {status, export_path, export_label, mockup_uuid}.`,
1190
+ RETURNS: {total_renders, successful_renders, failed_renders, renders[]} where each render has {status, export_path, export_label, mockup_uuid, mockup_type}.`,
1153
1191
  inputSchema: {
1154
1192
  type: "object",
1155
1193
  properties: {
@@ -1644,6 +1682,7 @@ async function handleCreateRender(args, extra) {
1644
1682
  if (args.text_layers) payload.text_layers = args.text_layers;
1645
1683
 
1646
1684
  const response = await createApiClient(apiKey, "create_render").post("/renders", payload);
1685
+ if (response.data?.data) response.data = response.data.data;
1647
1686
  return ResponseFormatter.fromApiResponse(response, "Render created (1 credit used)");
1648
1687
  } catch (err) {
1649
1688
  return ResponseFormatter.fromError(err, "Failed to create render");
@@ -1660,6 +1699,7 @@ async function handleCreateBatchRender(args, extra) {
1660
1699
  if (args.export_options) payload.export_options = args.export_options;
1661
1700
 
1662
1701
  const response = await createApiClient(apiKey, "create_batch_render").post("/renders/batch", payload);
1702
+ if (response.data?.data) response.data = response.data.data;
1663
1703
  const count = args.renders?.length || 0;
1664
1704
  return ResponseFormatter.fromApiResponse(response, `Batch render complete (${count} credits used)`);
1665
1705
  } catch (err) {
@@ -1800,6 +1840,7 @@ async function handleCreateMockanythingMockup(args, extra) {
1800
1840
  if (args.enhance_prompt !== undefined) payload.enhance_prompt = args.enhance_prompt;
1801
1841
  if (args.product) payload.product = args.product;
1802
1842
  if (args.model) payload.model = args.model;
1843
+ if (args.style) payload.style = args.style;
1803
1844
  if (args.name) payload.name = args.name;
1804
1845
  if (args.collections) payload.collections = args.collections;
1805
1846
  if (args.catalog_uuid) payload.catalog_uuid = args.catalog_uuid;
@@ -1816,6 +1857,25 @@ async function handleCreateMockanythingMockup(args, extra) {
1816
1857
  }
1817
1858
  }
1818
1859
 
1860
+ async function handleGetMockanythingStyles(args, extra) {
1861
+ const apiKey = getApiKey(extra);
1862
+ const error = validateApiKey(apiKey);
1863
+ if (error) return error;
1864
+
1865
+ try {
1866
+ const params = new URLSearchParams();
1867
+ if (args && args.model) params.append("model", args.model);
1868
+
1869
+ const qs = params.toString();
1870
+ const url = qs ? `/mock-anything/styles?${qs}` : "/mock-anything/styles";
1871
+
1872
+ const response = await createApiClient(apiKey, "get_styles").get(url);
1873
+ return ResponseFormatter.fromApiResponse(response);
1874
+ } catch (err) {
1875
+ return ResponseFormatter.fromError(err, "Failed to fetch MockAnything styles");
1876
+ }
1877
+ }
1878
+
1819
1879
  async function handleGetMockanythingStatus(args, extra) {
1820
1880
  const apiKey = getApiKey(extra);
1821
1881
  const error = validateApiKey(apiKey);
@@ -1849,6 +1909,7 @@ const toolHandlers = {
1849
1909
  get_mockups: handleGetMockups,
1850
1910
  get_mockup_by_uuid: handleGetMockupByUuid,
1851
1911
  search_products: handleSearchMockanythingProducts,
1912
+ get_styles: handleGetMockanythingStyles,
1852
1913
  create_mockup: handleCreateMockanythingMockup,
1853
1914
  get_mockup_creation_status: handleGetMockanythingStatus,
1854
1915
  create_render: handleCreateRender,