# Build Stripe checkouts with Codex

> Connect Swipefast to OpenAI's Codex as an MCP server. Ask about sales from the terminal or have Codex build a checkout and its sales page as a draft.

Canonical: https://swipefast.io/codex

Give Codex your checkout, not your dashboard login. Add Swipefast to Codex once. It can read your sales, build a checkout as a draft and design the sales page, using a key you can switch off any time.

MCP server: https://swipefast.io/api/mcp

## Steps

1. **Copy your key** In Swipefast, open Settings and copy Your connection key.
2. **Keep the key in your shell** Add export SWIPEFAST_API_KEY=your key to your shell profile (~/.zshrc or ~/.bashrc), then open a new terminal.
3. **Add the server** Add the config to ~/.codex/config.toml. Codex reads the key from SWIPEFAST_API_KEY, so it never sits in the file.
4. **Ask** Start Codex and ask about your sales, or have it build a checkout. It's a draft until you publish it in Swipefast.

~/.codex/config.toml

```
[mcp_servers.swipefast]
url = "https://swipefast.io/api/mcp"
bearer_token_env_var = "SWIPEFAST_API_KEY"
```

## Codex or ChatGPT, and running it from a script

- **codex exec** codex exec runs Codex from a script and loads ~/.codex/config.toml, so Swipefast's tools come with it. Try the command by hand before you schedule it.
- **Your key stays out of the file** Codex reads it from SWIPEFAST_API_KEY in your shell, so a scheduled job needs that variable set too.
- **ChatGPT** For ChatGPT on the web, add Swipefast as a custom MCP server instead. [Swipefast for ChatGPT](https://swipefast.io/chatgpt)

Ask from a script

```
codex exec "Summarise last week's Swipefast sales, checkout by checkout"
```

## What to ask

- “How many sales did I make yesterday, and from where?”
- “Build a checkout for my $79 workshop with a $29 recording as an order bump.”
- “Write a sales page for it and put it above the checkout.”
- “List coupons that expire this week.”

## Questions

### My Codex version doesn't connect. What now?

Remote MCP servers need a recent Codex. Update it, and check Codex's own MCP docs, since the config format has changed between versions.

### Can it change a checkout people are buying from?

It can. Changes to a draft happen straight away. On a live checkout, words and design go live straight away too, and you can roll any of them back. A change that touches money, like a new price or a new upsell, waits on the Approvals page until you approve it, and you get an email.

### Can it refund orders or move money?

No. The tools read your numbers, make coupons and build or change checkouts. Refunds and payouts stay with you in the dashboard, and it can only ask to publish: a checkout goes live when you confirm it in Swipefast.

### Does connecting an AI cost extra?

No. The MCP server is included in every Swipefast plan. Your AI app's own plan is separate.

### How do I disconnect it?

Apps you signed in to are listed in Settings, under Connected apps, each with its own Disconnect button. If you used your API key, rotate it in Settings and every connection using the old one stops at once.

## Docs

- [learn.chatgpt.com/docs/extend/mcp?surface=cli](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) (checked 2026-10-20)
- [learn.chatgpt.com/docs/build-skills](https://learn.chatgpt.com/docs/build-skills) (checked 2026-10-20)

## Related

- [Swipefast for AI agents: checkout data over MCP](https://swipefast.io/agents)
- [MCP server docs](https://swipefast.io/developers/mcp)
