@sudomock/mcp 1.0.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/LICENSE +21 -0
- package/README.md +118 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +297 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SudoMock Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# @sudomock/mcp
|
|
2
|
+
|
|
3
|
+
Official [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for [SudoMock](https://sudomock.com) -- the mockup generation API that renders photorealistic product mockups from Photoshop PSD templates.
|
|
4
|
+
|
|
5
|
+
This is a local **stdio** MCP server. It runs as a subprocess of your AI editor and communicates with the SudoMock API over HTTPS.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 18+
|
|
10
|
+
- A SudoMock API key ([get one here](https://sudomock.com/dashboard/api-keys))
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### Claude Desktop
|
|
15
|
+
|
|
16
|
+
Add to your `claude_desktop_config.json`:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"sudomock": {
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "@sudomock/mcp"],
|
|
24
|
+
"env": {
|
|
25
|
+
"SUDOMOCK_API_KEY": "sm_your_key"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Claude Code
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
claude mcp add sudomock -- npx -y @sudomock/mcp
|
|
36
|
+
|
|
37
|
+
# Then set the environment variable:
|
|
38
|
+
export SUDOMOCK_API_KEY="sm_your_key"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Cursor
|
|
42
|
+
|
|
43
|
+
Add to your Cursor MCP settings (`.cursor/mcp.json`):
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"sudomock": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "@sudomock/mcp"],
|
|
51
|
+
"env": {
|
|
52
|
+
"SUDOMOCK_API_KEY": "sm_your_key"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### VS Code
|
|
60
|
+
|
|
61
|
+
Add to your VS Code MCP settings (`.vscode/mcp.json`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"servers": {
|
|
66
|
+
"sudomock": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "@sudomock/mcp"],
|
|
69
|
+
"env": {
|
|
70
|
+
"SUDOMOCK_API_KEY": "sm_your_key"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Available Tools
|
|
78
|
+
|
|
79
|
+
| Tool | Description | Credits |
|
|
80
|
+
|------|-------------|---------|
|
|
81
|
+
| `list_mockups` | List your uploaded mockup templates | 0 |
|
|
82
|
+
| `get_mockup_details` | Get full details of a mockup (smart object UUIDs, layers, dimensions) | 0 |
|
|
83
|
+
| `update_mockup` | Rename a mockup template | 0 |
|
|
84
|
+
| `delete_mockup` | Permanently delete a mockup template | 0 |
|
|
85
|
+
| `render_mockup` | Render a mockup by placing artwork onto a PSD template | 1 |
|
|
86
|
+
| `ai_render` | AI-powered render without a PSD template | 5 |
|
|
87
|
+
| `upload_psd` | Upload a PSD/PSB file as a new mockup template | 0 |
|
|
88
|
+
| `get_account` | Get account info, credit balance, and usage stats | 0 |
|
|
89
|
+
| `create_studio_session` | Create an embedded studio session for interactive editing | 0 |
|
|
90
|
+
|
|
91
|
+
## Quick Start
|
|
92
|
+
|
|
93
|
+
Once installed, ask your AI assistant:
|
|
94
|
+
|
|
95
|
+
> "List my SudoMock mockups"
|
|
96
|
+
|
|
97
|
+
> "Render my t-shirt mockup with this artwork: https://example.com/design.png"
|
|
98
|
+
|
|
99
|
+
> "Check my SudoMock credit balance"
|
|
100
|
+
|
|
101
|
+
> "Upload this PSD as a new mockup template: https://example.com/mockup.psd"
|
|
102
|
+
|
|
103
|
+
The typical workflow is:
|
|
104
|
+
|
|
105
|
+
1. `list_mockups` - find your mockup template UUID
|
|
106
|
+
2. `get_mockup_details` - find the smart object UUID within the template
|
|
107
|
+
3. `render_mockup` - render with your artwork URL
|
|
108
|
+
4. `get_account` - check remaining credits
|
|
109
|
+
|
|
110
|
+
## API Reference
|
|
111
|
+
|
|
112
|
+
Base URL: `https://api.sudomock.com`
|
|
113
|
+
|
|
114
|
+
Full API documentation: [sudomock.com/docs](https://sudomock.com/docs)
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SudoMock MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Local stdio MCP server for Claude Desktop, Claude Code, Cursor, and VS Code.
|
|
6
|
+
* Renders photorealistic product mockups from Photoshop PSD templates via the SudoMock API.
|
|
7
|
+
*
|
|
8
|
+
* Auth: SUDOMOCK_API_KEY environment variable
|
|
9
|
+
* Transport: stdio (local process)
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SudoMock MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Local stdio MCP server for Claude Desktop, Claude Code, Cursor, and VS Code.
|
|
6
|
+
* Renders photorealistic product mockups from Photoshop PSD templates via the SudoMock API.
|
|
7
|
+
*
|
|
8
|
+
* Auth: SUDOMOCK_API_KEY environment variable
|
|
9
|
+
* Transport: stdio (local process)
|
|
10
|
+
*/
|
|
11
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Configuration
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
const BASE_URL = "https://api.sudomock.com";
|
|
18
|
+
const DEFAULT_TIMEOUT = 30_000;
|
|
19
|
+
const RENDER_TIMEOUT = 120_000;
|
|
20
|
+
const USER_AGENT = "SudoMock-MCP/1.0 (stdio)";
|
|
21
|
+
function getApiKey() {
|
|
22
|
+
const key = process.env.SUDOMOCK_API_KEY;
|
|
23
|
+
if (!key) {
|
|
24
|
+
throw new Error("SUDOMOCK_API_KEY environment variable is not set. " +
|
|
25
|
+
"Get your API key at https://sudomock.com/dashboard/api-keys");
|
|
26
|
+
}
|
|
27
|
+
return key;
|
|
28
|
+
}
|
|
29
|
+
async function apiRequest({ method, path, params, body, timeout = DEFAULT_TIMEOUT }) {
|
|
30
|
+
const apiKey = getApiKey();
|
|
31
|
+
let url = `${BASE_URL}${path}`;
|
|
32
|
+
if (params) {
|
|
33
|
+
const searchParams = new URLSearchParams();
|
|
34
|
+
for (const [k, v] of Object.entries(params)) {
|
|
35
|
+
if (v !== undefined && v !== null) {
|
|
36
|
+
searchParams.set(k, String(v));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const qs = searchParams.toString();
|
|
40
|
+
if (qs)
|
|
41
|
+
url += `?${qs}`;
|
|
42
|
+
}
|
|
43
|
+
const headers = {
|
|
44
|
+
"x-api-key": apiKey,
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
"User-Agent": USER_AGENT,
|
|
47
|
+
};
|
|
48
|
+
const controller = new AbortController();
|
|
49
|
+
const timer = setTimeout(() => controller.abort(), timeout);
|
|
50
|
+
try {
|
|
51
|
+
const resp = await fetch(url, {
|
|
52
|
+
method,
|
|
53
|
+
headers,
|
|
54
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
55
|
+
signal: controller.signal,
|
|
56
|
+
});
|
|
57
|
+
if (!resp.ok) {
|
|
58
|
+
let detail;
|
|
59
|
+
try {
|
|
60
|
+
const json = (await resp.json());
|
|
61
|
+
detail = json.detail ?? resp.statusText;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
detail = resp.statusText;
|
|
65
|
+
}
|
|
66
|
+
const errorMap = {
|
|
67
|
+
401: `Invalid API key. Check your key at https://sudomock.com/dashboard/api-keys`,
|
|
68
|
+
402: `Insufficient credits. ${detail}`,
|
|
69
|
+
403: `Access denied. ${detail}`,
|
|
70
|
+
404: `Not found. ${detail}`,
|
|
71
|
+
409: `Conflict. ${detail}`,
|
|
72
|
+
422: `Invalid parameters: ${detail}`,
|
|
73
|
+
429: `Rate limit exceeded. Wait and retry.`,
|
|
74
|
+
500: `SudoMock server error. Try again in a moment.`,
|
|
75
|
+
};
|
|
76
|
+
throw new Error(errorMap[resp.status] ?? `${method} ${path} failed (${resp.status}): ${detail}`);
|
|
77
|
+
}
|
|
78
|
+
// 204 No Content
|
|
79
|
+
if (resp.status === 204) {
|
|
80
|
+
return { success: true };
|
|
81
|
+
}
|
|
82
|
+
return await resp.json();
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
clearTimeout(timer);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Server
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
const server = new McpServer({
|
|
92
|
+
name: "SudoMock",
|
|
93
|
+
version: "1.0.0",
|
|
94
|
+
});
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// Tool 1: list_mockups
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
server.tool("list_mockups", "List your uploaded mockup templates with UUIDs, names, and thumbnails. Use returned UUIDs with render_mockup or get_mockup_details.", {
|
|
99
|
+
limit: z.number().min(1).max(100).default(20).describe("Results per page (1-100, default 20)"),
|
|
100
|
+
offset: z.number().min(0).default(0).describe("Pagination offset (default 0)"),
|
|
101
|
+
name: z.string().optional().describe("Filter by name (case-insensitive substring match)"),
|
|
102
|
+
sort_by: z.enum(["created_at", "name"]).default("created_at").describe("Sort field"),
|
|
103
|
+
sort_order: z.enum(["asc", "desc"]).default("desc").describe("Sort direction"),
|
|
104
|
+
}, async ({ limit, offset, name, sort_by, sort_order }) => {
|
|
105
|
+
const result = await apiRequest({
|
|
106
|
+
method: "GET",
|
|
107
|
+
path: "/api/v1/mockups",
|
|
108
|
+
params: { limit, offset, name, sort_by, sort_order },
|
|
109
|
+
});
|
|
110
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
111
|
+
});
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// Tool 2: get_mockup_details
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
server.tool("get_mockup_details", "Get full details of a mockup: smart object UUIDs, layer names, dimensions, positions, blend modes, and thumbnail URLs.", {
|
|
116
|
+
mockup_uuid: z.string().describe("The UUID of the mockup to inspect"),
|
|
117
|
+
}, async ({ mockup_uuid }) => {
|
|
118
|
+
const result = await apiRequest({
|
|
119
|
+
method: "GET",
|
|
120
|
+
path: `/api/v1/mockups/${mockup_uuid}`,
|
|
121
|
+
});
|
|
122
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
123
|
+
});
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
// Tool 3: update_mockup
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
server.tool("update_mockup", "Rename a mockup template.", {
|
|
128
|
+
mockup_uuid: z.string().describe("The UUID of the mockup to rename"),
|
|
129
|
+
name: z.string().describe("New display name for the mockup"),
|
|
130
|
+
}, async ({ mockup_uuid, name }) => {
|
|
131
|
+
const result = await apiRequest({
|
|
132
|
+
method: "PATCH",
|
|
133
|
+
path: `/api/v1/mockups/${mockup_uuid}`,
|
|
134
|
+
body: { name },
|
|
135
|
+
});
|
|
136
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
137
|
+
});
|
|
138
|
+
// ---------------------------------------------------------------------------
|
|
139
|
+
// Tool 4: delete_mockup
|
|
140
|
+
// ---------------------------------------------------------------------------
|
|
141
|
+
server.tool("delete_mockup", "Permanently delete a mockup template. Cannot be undone.", {
|
|
142
|
+
mockup_uuid: z.string().describe("The UUID of the mockup to delete"),
|
|
143
|
+
}, async ({ mockup_uuid }) => {
|
|
144
|
+
await apiRequest({
|
|
145
|
+
method: "DELETE",
|
|
146
|
+
path: `/api/v1/mockups/${mockup_uuid}`,
|
|
147
|
+
});
|
|
148
|
+
return { content: [{ type: "text", text: `Mockup ${mockup_uuid} deleted successfully.` }] };
|
|
149
|
+
});
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// Tool 5: render_mockup
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
server.tool("render_mockup", "Render a mockup by placing artwork onto a PSD template's smart object. Returns the CDN URL of the rendered image. Costs 1 credit. Use list_mockups to find mockup_uuid, then get_mockup_details for smart_object_uuid.", {
|
|
154
|
+
mockup_uuid: z.string().describe("UUID of the mockup template (from list_mockups)"),
|
|
155
|
+
smart_object_uuid: z.string().describe("UUID of the smart object layer (from get_mockup_details)"),
|
|
156
|
+
artwork_url: z.string().describe("Public URL of the artwork image (PNG/JPG/WebP) to place on the mockup"),
|
|
157
|
+
fit: z.enum(["fill", "contain", "cover"]).default("fill").describe("How artwork fills the smart object area"),
|
|
158
|
+
image_format: z.enum(["webp", "png", "jpg"]).default("webp").describe("Output format"),
|
|
159
|
+
image_size: z.number().min(100).max(10000).default(1920).describe("Output width in pixels"),
|
|
160
|
+
quality: z.number().min(1).max(100).default(95).describe("Compression quality for webp/jpg"),
|
|
161
|
+
rotate: z.number().min(-360).max(360).default(0).describe("Rotate artwork in degrees"),
|
|
162
|
+
flip_horizontal: z.boolean().default(false).describe("Mirror artwork left-right"),
|
|
163
|
+
flip_vertical: z.boolean().default(false).describe("Mirror artwork top-bottom"),
|
|
164
|
+
color_hex: z.string().optional().describe("Optional color overlay hex code (e.g. '#FF5733')"),
|
|
165
|
+
color_blend_mode: z.string().optional().describe("Blend mode for color overlay (e.g. 'multiply', 'screen', 'overlay')"),
|
|
166
|
+
brightness: z.number().min(-150).max(150).default(0).describe("Brightness adjustment"),
|
|
167
|
+
contrast: z.number().min(-100).max(100).default(0).describe("Contrast adjustment"),
|
|
168
|
+
opacity: z.number().min(0).max(100).default(100).describe("Layer opacity percentage"),
|
|
169
|
+
saturation: z.number().min(-100).max(100).default(0).describe("Saturation adjustment"),
|
|
170
|
+
export_label: z.string().optional().describe("Optional label for file naming"),
|
|
171
|
+
}, async (args) => {
|
|
172
|
+
const smartObject = {
|
|
173
|
+
uuid: args.smart_object_uuid,
|
|
174
|
+
asset: {
|
|
175
|
+
url: args.artwork_url,
|
|
176
|
+
fit: args.fit,
|
|
177
|
+
rotate: args.rotate,
|
|
178
|
+
flip_horizontal: args.flip_horizontal,
|
|
179
|
+
flip_vertical: args.flip_vertical,
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
if (args.color_hex) {
|
|
183
|
+
smartObject.color = {
|
|
184
|
+
hex: args.color_hex,
|
|
185
|
+
blending_mode: args.color_blend_mode ?? "normal",
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (args.brightness || args.contrast || args.opacity !== 100 || args.saturation) {
|
|
189
|
+
smartObject.adjustment_layers = {
|
|
190
|
+
brightness: args.brightness,
|
|
191
|
+
contrast: args.contrast,
|
|
192
|
+
opacity: args.opacity,
|
|
193
|
+
saturation: args.saturation,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const body = {
|
|
197
|
+
mockup_uuid: args.mockup_uuid,
|
|
198
|
+
smart_objects: [smartObject],
|
|
199
|
+
export_options: {
|
|
200
|
+
image_format: args.image_format,
|
|
201
|
+
image_size: args.image_size,
|
|
202
|
+
quality: args.quality,
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
if (args.export_label) {
|
|
206
|
+
body.export_label = args.export_label;
|
|
207
|
+
}
|
|
208
|
+
const result = await apiRequest({
|
|
209
|
+
method: "POST",
|
|
210
|
+
path: "/api/v1/renders",
|
|
211
|
+
body,
|
|
212
|
+
timeout: RENDER_TIMEOUT,
|
|
213
|
+
});
|
|
214
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
215
|
+
});
|
|
216
|
+
// ---------------------------------------------------------------------------
|
|
217
|
+
// Tool 6: ai_render
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
server.tool("ai_render", "AI-powered mockup render without needing a PSD template. Upload any product photo + artwork, AI detects the printable surface and renders with perspective correction. Costs 5 credits.", {
|
|
220
|
+
source_url: z.string().describe("Public URL of the product photo (e.g. a plain t-shirt photo)"),
|
|
221
|
+
artwork_url: z.string().describe("Public URL of the artwork/design to place on the product"),
|
|
222
|
+
product_type: z.string().optional().describe("Optional product category hint (e.g. 'tshirt', 'hoodie', 'mug')"),
|
|
223
|
+
segment_index: z.number().optional().describe("Optional specific segment index (0-based) if the product has multiple printable areas"),
|
|
224
|
+
image_format: z.enum(["webp", "png"]).default("webp").describe("Output format"),
|
|
225
|
+
quality: z.number().min(1).max(100).default(95).describe("Compression quality"),
|
|
226
|
+
}, async ({ source_url, artwork_url, product_type, segment_index, image_format, quality }) => {
|
|
227
|
+
const body = {
|
|
228
|
+
source_url,
|
|
229
|
+
artwork_url,
|
|
230
|
+
export_options: { image_format, quality },
|
|
231
|
+
};
|
|
232
|
+
if (product_type)
|
|
233
|
+
body.product_type = product_type;
|
|
234
|
+
if (segment_index !== undefined)
|
|
235
|
+
body.segment_index = segment_index;
|
|
236
|
+
const result = await apiRequest({
|
|
237
|
+
method: "POST",
|
|
238
|
+
path: "/api/v1/sudoai/render",
|
|
239
|
+
body,
|
|
240
|
+
timeout: RENDER_TIMEOUT,
|
|
241
|
+
});
|
|
242
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
243
|
+
});
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// Tool 7: upload_psd
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
server.tool("upload_psd", "Upload a Photoshop PSD/PSB file as a new mockup template. The PSD must have at least one Smart Object layer. Processing takes 5-30 seconds.", {
|
|
248
|
+
psd_file_url: z.string().describe("Public URL to a .psd or .psb file (max 500MB)"),
|
|
249
|
+
psd_name: z.string().optional().describe("Display name for the template (auto-generated from filename if omitted)"),
|
|
250
|
+
}, async ({ psd_file_url, psd_name }) => {
|
|
251
|
+
const body = { psd_file_url };
|
|
252
|
+
if (psd_name)
|
|
253
|
+
body.psd_name = psd_name;
|
|
254
|
+
const result = await apiRequest({
|
|
255
|
+
method: "POST",
|
|
256
|
+
path: "/api/v1/psd/upload",
|
|
257
|
+
body,
|
|
258
|
+
timeout: RENDER_TIMEOUT,
|
|
259
|
+
});
|
|
260
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
261
|
+
});
|
|
262
|
+
// ---------------------------------------------------------------------------
|
|
263
|
+
// Tool 8: get_account
|
|
264
|
+
// ---------------------------------------------------------------------------
|
|
265
|
+
server.tool("get_account", "Get your account info: subscription plan, credit balance, usage stats, billing period, and API key details.", {}, async () => {
|
|
266
|
+
const result = await apiRequest({
|
|
267
|
+
method: "GET",
|
|
268
|
+
path: "/api/v1/me",
|
|
269
|
+
});
|
|
270
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
271
|
+
});
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// Tool 9: create_studio_session
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
server.tool("create_studio_session", "Create an embedded studio session for interactive mockup editing in a web page. Returns a 15-minute session token for iframe embedding.", {
|
|
276
|
+
mockup_uuid: z.string().describe("UUID of the mockup to edit"),
|
|
277
|
+
smart_object_uuid: z.string().describe("UUID of the smart object to customize"),
|
|
278
|
+
}, async ({ mockup_uuid, smart_object_uuid }) => {
|
|
279
|
+
const result = await apiRequest({
|
|
280
|
+
method: "POST",
|
|
281
|
+
path: "/api/v1/studio/create-session",
|
|
282
|
+
body: { mockup_uuid, smart_object_uuid },
|
|
283
|
+
});
|
|
284
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
285
|
+
});
|
|
286
|
+
// ---------------------------------------------------------------------------
|
|
287
|
+
// Start server
|
|
288
|
+
// ---------------------------------------------------------------------------
|
|
289
|
+
async function main() {
|
|
290
|
+
const transport = new StdioServerTransport();
|
|
291
|
+
await server.connect(transport);
|
|
292
|
+
}
|
|
293
|
+
main().catch((err) => {
|
|
294
|
+
console.error("SudoMock MCP server failed to start:", err);
|
|
295
|
+
process.exit(1);
|
|
296
|
+
});
|
|
297
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAC5C,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAE9C,SAAS,SAAS;IAChB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACzC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,oDAAoD;YAClD,6DAA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;QACrC,IAAI,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACzF,CAAC,CACF,CAAC;AAEF,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sudomock/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "SudoMock MCP server for Claude, Cursor, and VS Code. Generate photorealistic product mockups from Photoshop PSD templates.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"sudomock",
|
|
9
|
+
"mockup",
|
|
10
|
+
"psd",
|
|
11
|
+
"claude",
|
|
12
|
+
"cursor",
|
|
13
|
+
"vscode"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://sudomock.com/docs/mcp",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/sudomock/mcp-server.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/sudomock/mcp-server/issues"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": "SudoMock Labs <hello@sudomock.com>",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"bin": {
|
|
27
|
+
"sudomock-mcp": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc",
|
|
34
|
+
"dev": "tsc --watch",
|
|
35
|
+
"start": "node dist/index.js",
|
|
36
|
+
"prepublishOnly": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@modelcontextprotocol/sdk": "1.27.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "22.15.3",
|
|
43
|
+
"typescript": "5.8.3"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18"
|
|
47
|
+
}
|
|
48
|
+
}
|