# Set up your website from chat (/docs/mcp/set-up-your-site)

If your assistant is [connected to Swop](/docs/mcp/quickstart), it can do most of the work of putting Swop checkout on a website you host yourself. Either endpoint works: these tools are on `/mcp/commerce` as well as `/mcp`.

## What the assistant does, and what you do [#what-the-assistant-does-and-what-you-do]

| Step | Who | How |
|---|---|---|
| Add what you sell | You or the assistant | Swop app, or `swop_create_product` |
| Allow your website to show your checkout | The assistant | `swop_register_embed_origin` |
| Add a webhook and send a test event | The assistant | `swop_register_webhook`, `swop_test_webhook` |
| List products with SKUs and buy links | The assistant | `swop_list_my_products`, `swop_get_product_link` |
| Create the API key | **You** | Swop web app → **Developer → API keys** |
| Write the server code | The assistant | From these docs |

<Callout type="warn" title="The assistant can't create API keys">
No MCP tool creates, lists or reveals a merchant API key. A key exists only because you made it in the Swop app while signed in. That is what stops a connected assistant, or anyone who gets hold of its connection, from minting a credential of its own.
</Callout>

## The prompt [#the-prompt]

The Swop web app writes this for you, with your site filled in, at **Developer → Your website** ([swopme.app/dashboard/developer?tab=site](https://www.swopme.app/dashboard/developer?tab=site)). Or copy it from here and change the two addresses:

```text
Set up Swop checkout for my website https://your-site.com.
1. Show me which sites can already show my checkout, then allow https://your-site.com.
2. Add a webhook at https://your-site.com/webhooks/swop for paid checkouts and released payouts, send it a test event, and give me the signing secret once.
3. List my products with their SKUs and buy links.
4. Show me the server code to start a checkout from a cart with my Swop merchant key, and how to verify the webhook signature. I will create the key myself in Swop.
Confirm each change with me before you make it.
```

## What to check afterwards [#what-to-check-afterwards]

The same **Developer → Your website** tab shows a four-step checklist read from your account: products, allowed websites, a checkout key and a webhook. Each one turns to **Done** when it exists.

- **Allowed websites** must be exact origins: `https` only (`http://localhost` is allowed for development), no path and no wildcard. `https://acme.com` and `https://www.acme.com` are different. See [Framed checkout](/docs/payments/framed-checkout).
- **The webhook signing secret is shown once**, when the webhook is created. If the assistant created it, the secret is in that chat. Store it on your server and see [Verify signatures](/docs/webhooks/verify-signatures).
- **The key needs the right scope**: `commerce.checkout` to start checkouts from your own cart ([Headless checkout](/docs/payments/headless-checkout)), or `commerce.embed` to show Swop's checkout inside your page ([Framed checkout](/docs/payments/framed-checkout)).

## Related [#related]

<Cards>
  <Card title="Payments quickstart" href="/docs/payments/quickstart" description="Take your first payment from your own server." />
  <Card title="Products & checkout tools" href="/docs/mcp/tool-reference/products-and-checkout" description="Every input for the tools used here." />
  <Card title="Webhooks" href="/docs/webhooks" description="Events, signatures and retries." />
</Cards>
