← All guides marginal.sh

Back in Stock Subject Line Tests with OpenAI Codex and marginal

Updated June 2026 · Hosted email MCP server

Restock emails are some of the highest-intent messages you'll ever send — but a flat subject line buries them in a crowded inbox. With marginal's email MCP server connected to OpenAI Codex, you can generate, launch, and measure back in stock subject lines without leaving your coding environment.

Why test back in stock subject lines from your editor

Back-in-stock notifications convert because the recipient already signaled interest. The variable that decides whether they open is the subject line. Treating it as a guess wastes that intent; treating it as a subject line test turns it into repeatable revenue.

Because marginal runs as an MCP server, OpenAI Codex can call its tools directly. You describe the restocked product and audience in plain language, and the agent handles variant generation, the send, and the results — all inside your normal Codex workflow.

The marginal tools Codex will use

marginal exposes four MCP tools. For a back in stock campaign, OpenAI Codex typically calls them in sequence to move from idea to measured result.

A back in stock workflow in OpenAI Codex

Once marginal is connected, the AI agent email marketing loop is conversational. A practical sequence for a restocked item looks like this:

Getting connected

marginal is hosted — there's nothing to deploy. Point OpenAI Codex at the endpoint at https://marginal.sh/mcp and authenticate with your Bearer API key (marg_live_...). The free tier covers 100 experiments per month, which is plenty for ongoing restock testing.

Full setup steps and tool references live in the docs at https://marginal.sh/docs/. Add the MCP config to OpenAI Codex, then ask the agent to draft and launch your next back in stock subject line test.

Get started with marginal

marginal is a hosted email marketing MCP server at marginal.sh. Sign up free, create an API key, and connect https://marginal.sh/mcp from Cursor, Codex, or Claude Desktop.

Documentation · Sign up · FAQ