# From merged PR to launch post, without leaving Codex

[All AI connectors](https://margin.design/agents) · [Agent setup playbook](https://margin.design/get-started.md)

Add Margin to Codex with one command and sign in once in your browser. Codex reads the release you just tagged, designs the cover card, thread or carousel on your Margin canvas with your brand board, and saves drafts or scheduled posts. Posting right away always waits for your yes.

## Things you can just ask

- **Changelog carousel:** "Turn this PR's changelog into a 5-slide LinkedIn carousel with one feature per slide." — Reads the PR, designs five editable slides from your brand board and leaves them on your canvas to review.
- **Demo video:** "Upload demo.mp4 from the repo and schedule it as a YouTube Short and an Instagram reel for Wednesday at noon." — Brings the finished video into Margin, checks which accounts take it and schedules both posts in your calendar.
- **What worked:** "Which of our last 10 launch posts did best, and on which network? Draft the next one in that format." — Reads your real per-network numbers and puts a new draft on the canvas in the format that performed.

## How it works

One command and one browser sign-in, with no keys to paste.

01. **Add Margin as a Codex MCP server:** Run codex mcp add margin --url https://margin.design/mcp. Codex keeps it in your own config, so it's there in every project.
02. **Sign in once:** If the browser doesn't open by itself, run codex mcp login margin. Sign in to Margin, pick the organizations Codex may open and press Allow.
03. **Point it at the release:** Give Codex the tag, the diff or the notes. It designs on your Margin canvas, and you can edit any frame before the post is scheduled.


## Why teams use Margin

- **From the release to the post:** Codex reads the tag, diff or release notes in your repo and turns them into a cover card, a thread or a carousel sized for each network.
- **Edit what Codex made:** Every design is HTML on a shared Margin canvas. Teammates comment and change copy directly; nothing is a flattened export.
- **One setup for the CLI, the IDE and the app:** The Codex CLI, its IDE extension and the ChatGPT desktop app read the same MCP configuration, so Margin added once from the terminal is there in all three.
- **You decide what goes live:** Posting right away always shows you what each account gets and waits for your yes. Scheduled posts and drafts wait in the calendar, where you can edit or cancel them.

## Add Margin to Codex in one command

Codex saves it for you, across projects. If the browser doesn't open on its own, run codex mcp login margin, sign in to Margin and press Allow.

```sh
codex mcp add margin --url https://margin.design/mcp
```

## Frequently asked questions

### Does Margin work in the Codex IDE extension and the desktop app?

Yes, the one setup covers both. In the app or the extension, select Authenticate when Margin asks you to sign in.

### Is this the same connection as Margin in ChatGPT on the web?

No. ChatGPT on the web doesn't read Codex's local configuration, so connect Margin there separately in ChatGPT's own settings. Both can open the same Margin organization.

### What if the sign-in page doesn't open?

Run codex mcp login margin. On a machine without a browser, add --no-browser, open the link it prints anywhere, and paste the address you land on back into the terminal.

## Next steps

- Get started: https://margin.design/signin
- Full agent setup playbook: https://margin.design/get-started.md
- MCP endpoint: https://margin.design/mcp

## Sources

Checked on 26 Nov 2026.

- [Codex docs: MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
- [Codex docs: CLI commands](https://learn.chatgpt.com/docs/developer-commands?surface=cli)

