@dynamic-mockups/mcp 1.0.4 → 1.0.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +49 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-mockups/mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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
@@ -36,6 +36,39 @@ const SERVER_VERSION = "1.0.0";
36
36
  const API_KNOWLEDGE_BASE = {
37
37
  overview: "Dynamic Mockups API allows you to generate product mockups programmatically.",
38
38
 
39
+ integration: {
40
+ base_url: "https://app.dynamicmockups.com/api/v1",
41
+ required_headers: {
42
+ "Accept": "application/json",
43
+ "x-api-key": "<YOUR_DYNAMIC_MOCKUPS_API_KEY>"
44
+ },
45
+ get_api_key_at: "https://app.dynamicmockups.com/dashboard-api",
46
+ example_endpoints: {
47
+ "GET /catalogs": "List all catalogs",
48
+ "GET /collections": "List collections",
49
+ "POST /collections": "Create a collection",
50
+ "GET /mockups": "List mockup templates",
51
+ "GET /mockup/{uuid}": "Get mockup by UUID",
52
+ "POST /renders": "Create a single render",
53
+ "POST /renders/batch": "Create batch renders",
54
+ "POST /renders/print-files": "Export print files",
55
+ "POST /psd/upload": "Upload a PSD file",
56
+ "POST /psd/delete": "Delete a PSD file"
57
+ },
58
+ code_examples: {
59
+ javascript_fetch: `fetch('https://app.dynamicmockups.com/api/v1/mockups', {
60
+ headers: { 'Accept': 'application/json', 'x-api-key': 'YOUR_API_KEY' }
61
+ })`,
62
+ javascript_axios: `axios.create({
63
+ baseURL: 'https://app.dynamicmockups.com/api/v1',
64
+ headers: { 'Accept': 'application/json', 'x-api-key': 'YOUR_API_KEY' }
65
+ })`,
66
+ python: `requests.get('https://app.dynamicmockups.com/api/v1/mockups',
67
+ headers={'Accept': 'application/json', 'x-api-key': 'YOUR_API_KEY'})`,
68
+ curl: `curl -H "Accept: application/json" -H "x-api-key: YOUR_API_KEY" https://app.dynamicmockups.com/api/v1/mockups`
69
+ }
70
+ },
71
+
39
72
  billing: {
40
73
  credits_per_image: 1,
41
74
  free_credits: 50,
@@ -64,8 +97,10 @@ const API_KNOWLEDGE_BASE = {
64
97
 
65
98
  best_practices: [
66
99
  "Use create_batch_render for multiple images (more efficient than single renders)",
67
- "Always include Accept: application/json header (handled automatically by this MCP)",
100
+ "Always include Accept: application/json header",
101
+ "Always include x-api-key header with your API key",
68
102
  "Store rendered image URLs promptly as they expire in 24 hours",
103
+ "Base URL for all API calls: https://app.dynamicmockups.com/api/v1",
69
104
  ],
70
105
 
71
106
  support: {
@@ -187,23 +222,31 @@ const tools = [
187
222
  // ─────────────────────────────────────────────────────────────────────────────
188
223
  {
189
224
  name: "get_api_info",
190
- description: `Get Dynamic Mockups API knowledge base including billing, rate limits, supported formats, and best practices.
225
+ description: `Get Dynamic Mockups API knowledge base including integration details, billing, rate limits, supported formats, and best practices.
191
226
 
192
227
  WHEN TO USE: Call this FIRST when user asks about:
228
+ - How to integrate the API directly (base URL, headers, code examples)
193
229
  - Pricing, credits, or billing
194
230
  - Rate limits or API constraints
195
231
  - Supported file formats (input/output)
196
232
  - Best practices for rendering
197
233
  - How to contact support
198
234
 
235
+ IMPORTANT FOR DIRECT API INTEGRATION:
236
+ When users want to integrate the Dynamic Mockups API into their own systems (not using MCP tools), use topic="integration" to get:
237
+ - Base URL: https://app.dynamicmockups.com/api/v1
238
+ - Required headers (Accept, x-api-key)
239
+ - Code examples for JavaScript, Python, cURL
240
+ - List of all available endpoints
241
+
199
242
  This tool does NOT require an API call - returns cached knowledge instantly.`,
200
243
  inputSchema: {
201
244
  type: "object",
202
245
  properties: {
203
246
  topic: {
204
247
  type: "string",
205
- enum: ["all", "billing", "rate_limits", "formats", "best_practices", "support"],
206
- description: "Specific topic to retrieve. Use 'all' for complete knowledge base, or select specific topic for focused information.",
248
+ enum: ["all", "integration", "billing", "rate_limits", "formats", "best_practices", "support"],
249
+ description: "Specific topic to retrieve. Use 'integration' for API integration details (base URL, headers, code examples). Use 'all' for complete knowledge base.",
207
250
  },
208
251
  },
209
252
  },
@@ -808,7 +851,7 @@ RETURNS: {uuid, name} of the uploaded PSD file.`,
808
851
 
809
852
  API: POST /psd/delete
810
853
 
811
- WHEN TO USE: When user wants to:
854
+ WHEN TO USE: When user wants to:
812
855
  - Remove an uploaded PSD file
813
856
  - Clean up unused PSD files
814
857
  - Optionally remove all mockups derived from the PSD
@@ -841,6 +884,7 @@ async function handleGetApiInfo(args) {
841
884
  const topic = args?.topic || "all";
842
885
 
843
886
  const topicMap = {
887
+ integration: { integration: API_KNOWLEDGE_BASE.integration },
844
888
  billing: { billing: API_KNOWLEDGE_BASE.billing },
845
889
  rate_limits: { rate_limits: API_KNOWLEDGE_BASE.rate_limits },
846
890
  formats: { supported_formats: API_KNOWLEDGE_BASE.supported_formats, asset_upload: API_KNOWLEDGE_BASE.asset_upload },