> ## Documentation Index
> Fetch the complete documentation index at: https://sudomock.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# Connect an agent

> Give an MCP client access to your SudoMock account.

MCP is an open protocol that gives an agent tools it can call on your behalf.
SudoMock runs a [remote MCP server](#remote-mcp-server), so a client that speaks
MCP lists your templates and renders them from inside the conversation.

The same account and the same credits sit behind it, so anything you render this
way is billed exactly as an API render is.

## Remote MCP server

SudoMock hosts the server at:

```
https://mcp.sudomock.com
```

Connect any MCP client that supports remote servers over HTTP. There is nothing
to install and no local process to run.

When you connect, the client opens a browser window where you sign in to
SudoMock and approve access.

<Note>
  No client asks you to paste a password, a one time code or an API key into the
  conversation, and no client needs your `sm_` key to use the server.
</Note>

Each tab below is the install for that client.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
    claude mcp add --transport http sudomock https://mcp.sudomock.com
    ```

    Then open `/mcp` in Claude Code and select **sudomock** to complete the
    sign in.
  </Tab>

  <Tab title="Codex CLI">
    ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
    codex mcp add sudomock --url https://mcp.sudomock.com
    codex mcp login sudomock
    ```
  </Tab>

  <Tab title="Any other client">
    Use the client's own remote HTTP MCP configuration with OAuth and point it
    at the same address:

    ```
    https://mcp.sudomock.com
    ```

    If the client cannot be configured from inside a session, add the server
    from its settings instead.
  </Tab>
</Tabs>

Some clients only publish new tools after a reconnect or a restart.

Hand an agent the setup prompt instead and it works out the client it is running
in, adds the server, and stops at the sign in step:

```
https://sudomock.com/agent-setup/prompt.md
```

Call `get_account` once the client is back. An authenticated response means the
connection is live, and discovery lists the tools below. Nothing else needs to
run, and a render, an upload or a webhook call would spend credits to tell you
something you already know. The setup prompt ends on that same read-only check,
so a setup run generates nothing and spends nothing.

SudoMock also publishes a [skill file](https://sudomock.com/docs/skill.md) that
tells an agent what this product can do, what a call needs and what an account
allows, so the agent gets it right on the first try. Install it in a client that
is not connected to the server above.

<Prompt description="Install the SudoMock skill into your agent." actions={["copy", "cursor"]}>
  npx skills add [https://sudomock.com/docs](https://sudomock.com/docs)
</Prompt>

## MCP server tools

The tools are grouped here by the part of the product they touch.

* **PSD mockups**: `upload_psd`, `list_psd_mockups`, `get_psd_mockup`, `render_psd_mockup`, `update_psd_mockup`, `delete_psd_mockup`
* **Photo mockups**: `create_photo_mockup`, `list_photo_mockups`, `get_photo_mockup`, `update_photo_mockup_print_areas`, `render_photo_mockup`, `delete_photo_mockup`
* **Video**: `render_video`
* **Images**: `remove_background`, `upload_local_file`
* **Background work**: `get_job`, `list_jobs`, `wait_for_job`
* **Webhooks**: `create_webhook_endpoint`, `list_webhook_endpoints`, `update_webhook_endpoint`, `delete_webhook_endpoint`, `test_webhook_endpoint`, `rotate_webhook_secret`, `list_webhook_deliveries`, `replay_webhook_delivery`
* **Account**: `get_account`

The server publishes tools only. It exposes no resources and no prompts, so a
client that asks for them gets nothing back. Some tools answer to a second,
older name: use whichever the connection offers and read the schema it gives you
rather than assuming it mirrors the REST endpoint of the same name. There is no
batch render tool, so one call produces one output and several outputs mean
several calls.

Here are some real examples of what your agent can do with these tools:

* [Upload a Photoshop file](/docs/psd-mockups/upload-a-psd) once, then render it again with new artwork, colours and text
* Turn a product photograph into a reusable mockup and place artwork on its [print areas](/docs/photo-mockups/print-areas)
* [Edit the text of a template layer](/docs/text/how-to-edit-psd-text-by-api) without opening Photoshop
* Decide how a design sits in an area with [fit and blend modes](/docs/concepts/fit-and-blend-modes)
* Send wide or high volume work to the background and collect it by job or by [webhook](/docs/webhooks/overview)
* Read the plan and the remaining credits with [the account endpoint](/docs/api-reference/account/retrieve-the-current-account) before promising a size

## Before you promise a result

An account on trial credits renders at a reduced width and its output carries a
watermark. Check the account with `get_account` first, because a request above
the cap answers [`OUTPUT_RESOLUTION_LIMIT`](/docs/errors) rather than a quietly
smaller image.

<CardGroup cols={3}>
  <Card title="Use an API key instead" icon="key" href="/docs/authentication">
    Write the calls yourself from a backend or a job runner.
  </Card>

  <Card title="Errors" icon="triangle-alert" href="/docs/errors">
    Every error code, and which statuses are worth retrying.
  </Card>

  <Card title="Usage limits" icon="gauge" href="/docs/api-reference/usage-limits">
    The request rate, the parallel ceiling, and the headers.
  </Card>
</CardGroup>
