@sudomock/mcp 3.0.0 → 3.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 +71 -65
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +717 -181
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Generate photorealistic product mockups from Claude, Cursor, Windsurf, and VS Code.
|
|
4
4
|
|
|
5
|
-
[Model Context Protocol](https://modelcontextprotocol.io/introduction) server for the [SudoMock](https://sudomock.com) mockup generation API. Upload PSD templates, place artwork onto smart objects, edit supported text layers,
|
|
5
|
+
[Model Context Protocol](https://modelcontextprotocol.io/introduction) server for the [SudoMock](https://sudomock.com) mockup generation API. Upload PSD templates, place artwork onto smart objects, edit supported text layers, and get rendered image URLs -- all through natural language.
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
@@ -36,37 +36,34 @@ Get your API key at [sudomock.com/dashboard/api-keys](https://sudomock.com/dashb
|
|
|
36
36
|
|
|
37
37
|
</details>
|
|
38
38
|
|
|
39
|
-
> **Note:**
|
|
40
|
-
>
|
|
41
|
-
> [sudomock.com/docs/mcp](https://sudomock.com/docs/mcp). From 3.0 of this
|
|
42
|
-
> package and 2.0 of the hosted server the two transports use the same tool
|
|
43
|
-
> names.
|
|
39
|
+
> **Note:** A hosted remote (HTTP/OAuth) transport is not available yet. This
|
|
40
|
+
> package only ships the local stdio server shown above.
|
|
44
41
|
|
|
45
42
|
## Tools
|
|
46
43
|
|
|
47
|
-
Tools are named after the mockup family they act on: **PSD mockups** are
|
|
48
|
-
uploaded Photoshop templates, **photo mockups** are made from a product photo.
|
|
49
|
-
|
|
50
44
|
| Tool | Description | Credits |
|
|
51
45
|
|------|-------------|---------|
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `update_psd_mockup` | Rename a PSD mockup template | 0 |
|
|
56
|
-
| `delete_psd_mockup` | Delete a PSD mockup template | 0 |
|
|
57
|
-
| `render_psd_mockup` | Render a PSD mockup with artwork and/or editable text | 1 |
|
|
58
|
-
| `create_photo_mockup` | Create a photo mockup from a product photo and detect printable surfaces automatically | 25 |
|
|
59
|
-
| `list_photo_mockups` | List saved photo mockups; use `customizable_only` for shopper-ready items | 0 |
|
|
60
|
-
| `get_photo_mockup` | Get one photo mockup's saved print areas and its product surfaces | 0 |
|
|
61
|
-
| `update_photo_mockup_print_areas` | Replace a photo mockup's print-area geometry | 0 |
|
|
62
|
-
| `delete_photo_mockup` | Delete a photo mockup | 0 |
|
|
63
|
-
| `render_photo_mockup` | Print artwork into one saved print area, or across a whole product surface | 5 |
|
|
46
|
+
| `list_mockups` | List your uploaded mockup templates | 0 |
|
|
47
|
+
| `get_mockup_details` | Get smart object UUIDs, dimensions, blend modes | 0 |
|
|
48
|
+
| `render_mockup` | Render a mockup with artwork and/or editable text | 1 |
|
|
64
49
|
| `remove_background` | Get a transparent-PNG cutout through a 7-day signed URL | 25 |
|
|
65
|
-
| `
|
|
50
|
+
| `list_fonts` | List the fonts available for text layers, including your uploads | 0 |
|
|
51
|
+
| `create_upload_url` | Get an upload URL for a local file and the file URL it will have | 0 |
|
|
52
|
+
| `create_2d_mockup` | Create a photo mockup and detect printable surfaces automatically | 25 |
|
|
53
|
+
| `render_2d_surface` | Print artwork across a whole product surface (all-over) | 5 |
|
|
54
|
+
| `render_2d_print_area` | Print artwork into one saved print area (a drawn zone) | 5 |
|
|
55
|
+
| `render_video` | Animate a mockup into a video clip (always async) | cost-based (one per account at no charge, then cost-based) |
|
|
56
|
+
| `upload_psd` | Upload a Photoshop PSD/PSB template (sync or async) | 0 |
|
|
57
|
+
| `list_2d_mockups` | List saved photo mockup templates; use `customizable_only` for shopper-ready items | 0 |
|
|
58
|
+
| `get_2d_mockup` | Get one photo mockup's saved print areas and its product surfaces | 0 |
|
|
59
|
+
| `update_2d_print_areas` | Replace a photo mockup's print-area geometry | 0 |
|
|
60
|
+
| `delete_2d_mockup` | Delete a photo mockup template | 0 |
|
|
66
61
|
| `get_job` | Check the status of an async job by job_id | 0 |
|
|
67
|
-
| `wait_for_job` | Poll an async job until it succeeds
|
|
62
|
+
| `wait_for_job` | Poll an async job until it succeeds or fails | 0 |
|
|
68
63
|
| `list_jobs` | List async render, video, upload, and photo mockup jobs | 0 |
|
|
69
64
|
| `get_account` | Check plan, credits, prepaid balance, and usage | 0 |
|
|
65
|
+
| `update_mockup` | Rename a mockup template | 0 |
|
|
66
|
+
| `delete_mockup` | Delete a mockup template | 0 |
|
|
70
67
|
| `create_webhook_endpoint` | Register a webhook for async job completion, pinned to an event naming | 0 |
|
|
71
68
|
| `list_webhook_endpoints` | List your webhook endpoints | 0 |
|
|
72
69
|
| `update_webhook_endpoint` | Edit or enable/disable a webhook endpoint | 0 |
|
|
@@ -75,15 +72,17 @@ uploaded Photoshop templates, **photo mockups** are made from a product photo.
|
|
|
75
72
|
| `test_webhook_endpoint` | Send a signed `webhook.test` event | 0 |
|
|
76
73
|
| `list_webhook_deliveries` | List delivery attempts for an endpoint | 0 |
|
|
77
74
|
| `replay_webhook_delivery` | Replay a single failed delivery | 0 |
|
|
75
|
+
| `replay_failed_webhook_deliveries` | Replay every failed delivery for an endpoint | 0 |
|
|
78
76
|
|
|
79
|
-
###
|
|
77
|
+
### Both spellings work
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
The product calls its two kinds of template PSD mockups and photo mockups, and
|
|
80
|
+
the tools answer to those names too. Nothing above was renamed: every name in
|
|
81
|
+
the table keeps working exactly as it always has, and the spelling beside it is
|
|
82
|
+
the same tool with the same arguments. Reach for either.
|
|
84
83
|
|
|
85
|
-
|
|
|
86
|
-
|
|
84
|
+
| Name in the table | Also answers to |
|
|
85
|
+
|------|------|
|
|
87
86
|
| `list_mockups` | `list_psd_mockups` |
|
|
88
87
|
| `get_mockup_details` | `get_psd_mockup` |
|
|
89
88
|
| `update_mockup` | `update_psd_mockup` |
|
|
@@ -95,30 +94,38 @@ being redirected to a tool whose arguments have changed.
|
|
|
95
94
|
| `update_2d_print_areas` | `update_photo_mockup_print_areas` |
|
|
96
95
|
| `delete_2d_mockup` | `delete_photo_mockup` |
|
|
97
96
|
| `render_2d_surface`, `render_2d_print_area` | `render_photo_mockup` |
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`
|
|
97
|
+
| `get_2d_mockup` | `get_2d_mockup_details` |
|
|
98
|
+
| `test_webhook_endpoint` | `send_webhook_test_event` |
|
|
99
|
+
| `render_photo_mockup` | `render_2d_mockup` |
|
|
100
|
+
|
|
101
|
+
`render_photo_mockup` is the one that is not simply a second name for a single
|
|
102
|
+
tool. It renders either kind of target from one tool: pass the mockup as
|
|
103
|
+
`mockup_id` and name exactly one of `surface_uuid` (sized by `coverage` or an
|
|
104
|
+
explicit `width` + `height`) or `print_area_uuid` (sized by `fit` or an
|
|
105
|
+
explicit `width` + `height`). Picking the target by picking a tool, with
|
|
106
|
+
`mockup_uuid`, is what `render_2d_surface` and `render_2d_print_area` still do.
|
|
107
|
+
`render_2d_mockup` is `render_photo_mockup` under a second name, with the
|
|
108
|
+
mockup passed as `mockup_uuid`.
|
|
101
109
|
|
|
102
110
|
### Async jobs
|
|
103
111
|
|
|
104
|
-
`
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
`
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Every printable product in the photo is a surface with its own
|
|
115
|
-
|
|
116
|
-
or an explicit `width` + `height`. A print area
|
|
117
|
-
on a product, such as a chest logo:
|
|
118
|
-
`
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
print area) is refused by name rather than dropped.
|
|
112
|
+
`render_mockup`, `upload_psd`, `create_2d_mockup`, and both photo mockup render tools
|
|
113
|
+
accept `is_async: true`, and `render_video` is always async. These return a
|
|
114
|
+
`job_id` immediately (HTTP 202) instead of a final result. (`create_2d_mockup`
|
|
115
|
+
and the photo mockup render tools are synchronous by default and return the mockup /
|
|
116
|
+
render directly.) Poll it with `get_job`, or let `wait_for_job` block until the job
|
|
117
|
+
reaches a terminal status and hands back `result_url`, `mockup_uuid`,
|
|
118
|
+
`credits_charged`, and `payg` (`{credits, unit_price, cost}` for pay-as-you-go
|
|
119
|
+
jobs, otherwise `null`).
|
|
120
|
+
|
|
121
|
+
For a photo mockup render, pick the tool that matches the target you read from
|
|
122
|
+
`get_2d_mockup`. Every printable product in the photo is a surface with its own
|
|
123
|
+
`surface_uuid`: `render_2d_surface` prints across the whole of one, and takes
|
|
124
|
+
either a `coverage` percentage or an explicit `width` + `height`. A print area
|
|
125
|
+
is a bounded zone somebody drew on a product, such as a chest logo:
|
|
126
|
+
`render_2d_print_area` takes its `print_area_uuid`, and either a `fit` or an
|
|
127
|
+
explicit `width` + `height`. A product can have both, and they are separate
|
|
128
|
+
targets -- a saved print area does not close off the surface it sits on.
|
|
122
129
|
|
|
123
130
|
Sizing has one answer per render: send the relative option or the exact box,
|
|
124
131
|
never both, and send `width` and `height` together. `position`, `offset_x`,
|
|
@@ -131,8 +138,8 @@ applies rather than a copy of it kept here.
|
|
|
131
138
|
`remove_background` returns a transparent-PNG URL valid for 7 days. You can
|
|
132
139
|
pass that URL straight back as `artwork_url` during that window. To clean
|
|
133
140
|
artwork inline during a single render instead, pass
|
|
134
|
-
`remove_background: true` to `
|
|
135
|
-
|
|
141
|
+
`remove_background: true` to `render_mockup` or either photo mockup render tool. Either way it
|
|
142
|
+
costs 25 credits per artwork, refunded automatically if processing fails.
|
|
136
143
|
|
|
137
144
|
### Webhooks
|
|
138
145
|
|
|
@@ -158,9 +165,11 @@ The five photo mockup events also have a legacy spelling: `2d_mockup.ready`,
|
|
|
158
165
|
`2d_render.failed` (with `kind` `2d_create` / `2d_render` in the payload).
|
|
159
166
|
Which spelling an endpoint receives is its `event_naming` pin, set at
|
|
160
167
|
`create_webhook_endpoint` and returned on every endpoint: `current` (the names
|
|
161
|
-
above
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
above) or `legacy`. A create without a pin takes `current` only when
|
|
169
|
+
`event_types` names photo mockup events by their family names alone, and
|
|
170
|
+
`legacy` otherwise, including an empty list. Endpoints registered before the pin
|
|
171
|
+
existed stay on `legacy`, so a receiver written against the old names keeps
|
|
172
|
+
working unchanged. Once that receiver handles the new names, move it with
|
|
164
173
|
`update_webhook_endpoint` and `event_naming: "current"`; sent on its own, the
|
|
165
174
|
re-pin re-spells the endpoint's stored subscription list to match.
|
|
166
175
|
|
|
@@ -168,20 +177,18 @@ re-pin re-spells the endpoint's stored subscription list to match.
|
|
|
168
177
|
|
|
169
178
|
Each tool call writes one JSON line to stderr, which your MCP host keeps in its
|
|
170
179
|
log file: the tool name, how long the call took, and whether it succeeded, for
|
|
171
|
-
example `{"event":"mcp_tool_call","tool":"
|
|
180
|
+
example `{"event":"mcp_tool_call","tool":"list_mockups","duration_ms":312,"ok":true}`.
|
|
172
181
|
Arguments, API keys, file contents and API responses are never logged. Every
|
|
173
182
|
API request identifies this package as `mcp-stdio/<version>` in its
|
|
174
183
|
`User-Agent` and `X-SudoMock-Client` headers.
|
|
175
184
|
|
|
176
185
|
## Pricing and account limits
|
|
177
186
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
and video are priced by
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Volume plans start at **$25/month** for 5,000 renders. The lowest self-serve rate is
|
|
184
|
-
**$2.42 per 1,000 renders**, on the annual Pro 50K plan.
|
|
187
|
+
Subscriptions from **$0.002** per render. Without one, **$0.05** per render, the same
|
|
188
|
+
rate standalone mockup APIs charge on a paid plan. Funding the balance takes a **$5**
|
|
189
|
+
minimum first payment. Photo mockups and video are priced by
|
|
190
|
+
what they cost to produce rather than at the flat render rate, which is why the
|
|
191
|
+
Credits column above is not uniform.
|
|
185
192
|
|
|
186
193
|
A new account starts with **500 credits, granted once**, and needs no card to spend
|
|
187
194
|
them. Until a card is verified and the $5 minimum is funded, that account is in
|
|
@@ -205,11 +212,10 @@ as `0 / 0`.
|
|
|
205
212
|
|
|
206
213
|
## Example requests
|
|
207
214
|
|
|
208
|
-
- "List my
|
|
215
|
+
- "List my mockup templates"
|
|
209
216
|
- "Render the t-shirt mockup with this design: https://example.com/logo.png"
|
|
210
217
|
- "Replace the editable headline text, then render the mockup"
|
|
211
218
|
- "Cut out the background from this product photo, then render it on the tote bag"
|
|
212
|
-
- "Turn this product photo into a mockup: https://example.com/tote.jpg"
|
|
213
219
|
- "List my photo mockups, then render the first one with this artwork: https://example.com/logo.png"
|
|
214
220
|
- "Render this design asynchronously and wait for it to finish"
|
|
215
221
|
- "Queue that photo mockup render async and give me the job id to track"
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* SudoMock MCP Server
|
|
4
4
|
*
|
|
5
5
|
* Local stdio MCP server for Claude Desktop, Claude Code, Cursor, and VS Code.
|
|
6
|
-
* Renders photorealistic product mockups from Photoshop PSD templates
|
|
7
|
-
* product photos via the SudoMock API.
|
|
6
|
+
* Renders photorealistic product mockups from Photoshop PSD templates via the SudoMock API.
|
|
8
7
|
*
|
|
9
8
|
* Auth: SUDOMOCK_API_KEY environment variable
|
|
10
9
|
* Transport: stdio (local process)
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiLpE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAgBzD;AAED,eAAO,MAAM,qBAAqB,aAAmC,CAAC;AAkhBtE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAGnE;AA+FD,QAAA,MAAM,MAAM,WAGV,CAAC;AA2nDH,QAAA,MAAM,YAAY;;;;;;;;;CAGR,CAAC;AAEX,KAAK,UAAU,GAAG,MAAM,OAAO,YAAY,CAAC;AAE5C,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAsCzF;AAqYD,OAAO,EAAE,MAAM,EAAE,CAAC"}
|