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

# MCP Server

> Use the Genlook virtual try-on from Claude, ChatGPT, Cursor, or any MCP-compatible assistant.

Genlook ships a remote [MCP](https://modelcontextprotocol.io) server that exposes the Virtual Try-On API as tools your AI assistant can call directly: upload a photo, generate a try-on, and see the result right in the conversation.

```
https://mcp.genlook.app
```

No API key needed — the connector authenticates with OAuth. Sign in (or create an account) when your assistant prompts you; new accounts start with **5 free credits**, and each generation costs 1 credit. Top up anytime at [platform.genlook.app/topup](https://platform.genlook.app/topup).

## Setup

<Tabs>
  <Tab title="Claude">
    1. Open [claude.ai](https://claude.ai) → **Settings → Connectors**
    2. Click **Add custom connector** and paste `https://mcp.genlook.app`
    3. Sign in with your Genlook account when prompted
  </Tab>

  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http genlook https://mcp.genlook.app
    ```

    Then run `/mcp` inside Claude Code to complete the OAuth sign-in.
  </Tab>

  <Tab title="ChatGPT">
    1. **Settings → Apps & Connectors** → enable **Developer mode**
    2. Create a connector with `https://mcp.genlook.app` (OAuth)
    3. Sign in with your Genlook account when prompted
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (or via **Settings → MCP → Add new MCP server**):

    ```json theme={null}
    {
      "mcpServers": {
        "genlook": {
          "url": "https://mcp.genlook.app"
        }
      }
    }
    ```

    Cursor handles the OAuth flow on first use.
  </Tab>
</Tabs>

## Tools

The tools mirror the REST API:

| Tool                 | REST equivalent                                                  | What it does                                                                                                                                                                                                                                                      |
| -------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `upload_photo`       | [`POST /images/upload`](/tryon-api/endpoints/upload-image)       | Upload a person photo (publicly accessible URL or base64). Returns an `imageId` to pass to `generate_try_on`; photos expire after the retention window.                                                                                                           |
| `get_uploaded_photo` | —                                                                | Return the most recent non-expired upload (`imageId`, expiry, a preview link, and an inline preview when available) — reuse it across conversations without re-uploading.                                                                                         |
| `generate_try_on`    | [`POST /try-on`](/tryon-api/endpoints/create-try-on)             | Generate a try-on. A person photo is **required** — pass exactly one of `person_image_id` or `person_image_url`. The garment goes in `garments` (an array; exactly one for now, mirroring the REST API's `products`). Waits for the result and returns the image. |
| `get_generation`     | [`GET /generations/:id`](/tryon-api/endpoints/generation-status) | Poll a generation by id; returns the image once `COMPLETED`.                                                                                                                                                                                                      |
| `get_account`        | [`GET /account/credits`](/tryon-api/endpoints/check-credits)     | Remaining credits and the top-up URL.                                                                                                                                                                                                                             |

All image URLs passed to the tools must be **publicly accessible** — no login-gated, signed-for-someone-else, or private links.

## Example prompts

* *"Here's a dress I like: \<image URL> — show me wearing it."*
* *"Use this photo of me from now on: \<image URL>."*
* *"Try these sneakers on me, then compare with the previous pair."*
* *"How many try-on credits do I have left?"*

## Privacy & retention

Uploaded photos and generated images follow the account retention window (7 days by default), then are deleted automatically. The full-resolution result links returned by the tools stay valid for 7 days.
