SudoMock
NEW

SudoMock MCP Server

Connect Claude, Cursor, VS Code, Windsurf, and ChatGPT to your SudoMock account. Render photorealistic product mockups directly from your AI assistant.

The Model Context Protocol (MCP) lets AI assistants call external tools. SudoMock's MCP server gives your AI assistant direct access to mockup rendering, template management, and account info, so you can generate mockups with natural language instead of writing API calls.

Two Connection Methods

Remote (OAuth) connects directly to mcp.sudomock.com with browser-based auth. No API key needed.
Local (npx) runs a local MCP process using your API key. Both connection methods require network access to SudoMock. Local mode can also be used in CI/CD pipelines.
MCP Server URL:https://mcp.sudomock.com

Quick Start

Paste this prompt into Codex, Claude Code, or another coding assistant. It connects your account and checks that the tools are available before you start rendering.

Copy setup prompt
Fetch the SudoMock setup instructions from https://sudomock.com/agent-setup/prompt.md and help me connect this client. Keep my current task and existing configuration. Verify the connection before continuing my task.

Remote (OAuth)

The fastest way to connect. Your AI client opens a browser window for authentication. No API key required.

One-liner for Claude Code
1claude mcp add --transport http sudomock https://mcp.sudomock.com

Local (npx)

Runs a local MCP process that communicates over stdio. Requires an API key.

Local with API key
1claude mcp add sudomock \
2 -e SUDOMOCK_API_KEY=sm_your_key \
3 -- npx -y @sudomock/mcp

Get Your API Key

Create an API key at sudomock.com/dashboard/api-keys. You get 500 one-time API credits to start.

Supported Clients

SudoMock MCP works with all major AI coding assistants. Click a client below to jump to its setup instructions.

Platform Setup

Each section below shows both remote (OAuth) and local (API key) options. Pick one method per platform.

Codex

Codex CLI with browser sign-in
1codex mcp add sudomock --url https://mcp.sudomock.com
2codex mcp login sudomock

Complete sign-in in your browser. Then ask Codex to check your SudoMock account with get_account. A successful connection confirms access; it does not create a mockup.

Claude Code

Claude Code
1# Remote (OAuth) - no API key needed
2claude mcp add --transport http sudomock https://mcp.sudomock.com
3
4# Local (npx) - requires API key
5claude mcp add sudomock \
6 -e SUDOMOCK_API_KEY=sm_your_key \
7 -- npx -y @sudomock/mcp

Claude Desktop

Add to your Claude Desktop config file (claude_desktop_config.json):

claude_desktop_config.json
1{
2 "mcpServers": {
3 "sudomock-remote": {
4 "type": "http",
5 "url": "https://mcp.sudomock.com"
6 },
7 "sudomock-local": {
8 "command": "npx",
9 "args": ["-y", "@sudomock/mcp"],
10 "env": {
11 "SUDOMOCK_API_KEY": "sm_your_key"
12 }
13 }
14 }
15}

Cursor

CursorInstall in Cursor

Or add manually to .cursor/mcp.json in your project root:

.cursor/mcp.json
1{
2 "mcpServers": {
3 "sudomock-remote": {
4 "type": "http",
5 "url": "https://mcp.sudomock.com"
6 },
7 "sudomock-local": {
8 "command": "npx",
9 "args": ["-y", "@sudomock/mcp"],
10 "env": {
11 "SUDOMOCK_API_KEY": "sm_your_key"
12 }
13 }
14 }
15}

VS Code

VS CodeInstall in VS Code

Or add manually to .vscode/mcp.json in your workspace:

.vscode/mcp.json
1{
2 "servers": {
3 "sudomock-remote": {
4 "type": "http",
5 "url": "https://mcp.sudomock.com"
6 },
7 "sudomock-local": {
8 "command": "npx",
9 "args": ["-y", "@sudomock/mcp"],
10 "env": {
11 "SUDOMOCK_API_KEY": "sm_your_key"
12 }
13 }
14 }
15}

ChatGPT

In ChatGPT settings, add the MCP server URL. ChatGPT handles OAuth automatically.

ChatGPT
1# In ChatGPT settings, add this URL as an MCP server:
2https://mcp.sudomock.com
3
4# ChatGPT handles OAuth automatically.
5# No API key needed.

Windsurf

Add to your Windsurf MCP configuration file (~/.codeium/windsurf/mcp_config.json):

mcp_config.json
1{
2 "mcpServers": {
3 "sudomock-remote": {
4 "type": "http",
5 "url": "https://mcp.sudomock.com"
6 },
7 "sudomock-local": {
8 "command": "npx",
9 "args": ["-y", "@sudomock/mcp"],
10 "env": {
11 "SUDOMOCK_API_KEY": "sm_your_key"
12 }
13 }
14 }
15}

Which method to choose?

Use Remote (OAuth) if you want zero-config setup with browser login. Use Local (npx) if you need offline access, CI/CD automation, or prefer API key auth.

Available Tools

The MCP server exposes 27 tools in 6 categories. Each tool links to its full API documentation. Credit costs are the same as calling the REST API directly: management and read operations are free, and video is priced from the model and duration rather than at a flat rate.

Rendering

Generate product mockups from templates or product photos.

ToolDescriptionCredits
render_mockupRender a PSD mockup with required artwork and one Smart Object, plus an optional text-layer override. Returns one rendered image URL.1
render_2d_mockupRender one image from a saved photo mockup. Provide mockup_uuid, artwork_url, and exactly one surface_uuid or print_area_uuid from get_2d_mockup_details. The maximum output dimension is image_size.5
render_videoTurn a mockup or a public image URL into a short product video. Always async: returns a job_id.varies
remove_backgroundTurn any image into a transparent PNG cutout. The returned URL stays valid for 7 days and can be used as artwork.25

PSD Templates and Files

Upload, browse, rename, and delete your PSD mockup templates.

ToolDescriptionCredits
create_upload_urlGet a single-file upload URL for a local PSD or artwork. PUT the file bytes to upload_url, then pass file_url to the relevant tool.0
list_fontsList the system fonts and your uploaded fonts for editable text layers, with family and scope filters.0
upload_psdUpload a PSD or PSB file as a new mockup template. Requires at least one visible Smart Object or text layer; hosted render_mockup still requires a Smart Object.0
list_mockupsList your uploaded templates with UUIDs, names, and thumbnails.0
get_mockup_detailsGet full details: smart object UUIDs, layer names, dimensions, positions, blend modes.0
update_mockupRename a mockup template.0
delete_mockupPermanently delete a mockup template. Cannot be undone.0

Photo Mockups

Build reusable mockups from a product photo, then render any design onto them.

ToolDescriptionCredits
create_2d_mockupCreate a reusable photo mockup from a public image URL. Charged once per mockup, not per render, and refunded if the image is unsuitable.25
list_2d_mockupsList your saved photo mockups with id, name, status, thumbnail, dimensions, and print areas.0
get_2d_mockup_detailsGet one photo mockup in full, including every printable product surface and the print areas saved on them.0
update_2d_print_areasReplace a mockup's print areas with up to 8 four-point quads and return the updated geometry.0
delete_2d_mockupPermanently delete a photo mockup and all of its data. Cannot be undone.0

Jobs

Track async renders, videos, uploads, and 2D work.

ToolDescriptionCredits
get_jobGet the current status of any async job by job_id, with results and credits charged once it finishes.0
list_jobsList your async jobs newest first. Use the returned next_cursor to page.0

Webhooks

Register endpoints for job completion events, then debug and replay deliveries.

ToolDescriptionCredits
create_webhook_endpointRegister an endpoint SudoMock calls when async jobs finish. The signing secret is returned in full exactly once.0
list_webhook_endpointsList your endpoints with id, url, subscribed event types, and enabled state. Secrets are never returned here.0
delete_webhook_endpointPermanently delete an endpoint. Deliveries stop. Cannot be undone.0
rotate_webhook_secretRotate an endpoint's signing secret. The new secret is returned in full exactly once and the old one stops working.0
send_webhook_test_eventSend a signed webhook.test event to verify reachability and signature handling.0
list_webhook_deliveriesList delivery attempts with status, event type, response code, and timestamps.0
replay_failed_webhook_deliveriesRequeue failed or dead webhook deliveries for one endpoint. Check delivery records for the outcome.0
replay_webhook_deliveryReplay a single delivery while preserving its event identity, for example after fixing your endpoint.0

Account

Check your plan, credit balance, and usage.

ToolDescriptionCredits
get_accountGet your account info: plan, credit balance, usage stats, billing period, API key details.0

Use Cases

Here are common workflows you can accomplish with the MCP server. Just type these prompts into your AI assistant.

Use CaseExample Prompt
E-commerce product launchRender my logo on all t-shirt mockups in WebP format
Print-on-demand automationUpload this PSD and render with my design at 2x size
Brand asset generationPut my new branding on every hoodie and mug mockup
Quick product photoUse Photo Mockups to place my artwork on this product photo
Template managementShow me all my mockups and delete the ones named "Old Template"
Credit monitoringHow many credits do I have left? What plan am I on?

Example Prompts

Once connected, talk to your AI assistant naturally. Here are some things you can say:

>Show me my mockup templates
>Render this design on my t-shirt mockup: https://example.com/design.png
>Upload this PSD as a new template: https://cdn.sudomock.com/mockup-assets/2d-mockups/demo/sudomock-demo-tshirt-57a97b46.psd
>How many credits do I have left?
>Render my logo on all my mockups in WebP format at 2x size
>Use Photo Mockups to put my artwork on this product photo
>Delete the mockup called "Old Template"
>Show me the smart object layers in my mug mockup

Repeated renders

For multiple outputs, your AI makes one render_mockup tool call per output and can repeat those calls in one conversation. The MCP server has no native batch render tool. For example: “Put my design on all t-shirt and hoodie mockups and give me the URLs.”

Built-in Resources & Prompts

The MCP server includes built-in documentation and guided workflows that your AI assistant can read automatically.

Resources (Documentation)

URIDescription
docs://quickstartQuick start guide for the SudoMock API and MCP tools
docs://pricingPricing and credit information supplied by the MCP server
docs://formatsSupported output formats, input requirements, and blend modes
docs://errorsError codes, permanent and transient failures, and retry guidance

Prompts (Guided Workflows)

PromptDescription
render_product_mockupsCreate a PSD mockup using artwork and a template with a Smart Object.
create_2d_mockupCreate a mockup from a product photo, then place artwork on it.
troubleshoot_renderCheck inputs, credits and the current job when diagnosing a render issue.

Authentication

The remote server at mcp.sudomock.com supports two authentication methods:

1
OAuth 2.1 (Recommended)
Browser-based login via your SudoMock account. The AI client handles the OAuth flow automatically. No API key to manage.
2
API Key
Pass your sm_ API key via the x-api-key header or Authorization: Bearer header. Used by the local npx transport.

Security Best Practices

API Key Storage
Never commit API keys to source control. Store them in environment variables or a secrets manager. Use .env files locally and add them to .gitignore.
OAuth Token Expiry
OAuth tokens auto-expire and are refreshed automatically by the MCP client. You can revoke active sessions from your dashboard.
Credit Awareness
Each render costs credits (render_mockup = 1 credit, render_2d_mockup = 5 credits). Check your balance anytime with get_account before repeated render calls.
Permissions
API keys currently have full access to your account (all tools and templates). Granular permission scopes are on the roadmap. Use separate API keys for different environments (development vs production).

MCP server vs REST SDKs

This page covers the MCP server, published as @sudomock/mcp on npm and run with npx. It is a different package from the REST SDKs: the sudomock npm package (npmjs.com/package/sudomock) and the sudomock PyPI package (pypi.org/project/sudomock), which cover renders, async, video, jobs, and webhooks directly from your code.