Codex setup

Connect Codex to Variant over MCP

Codex uses the same MCP endpoint as Claude Code. One command, one OAuth sign-in, and the agent has direct access to deck and slide tools — read the current state, apply a precise change, render the result, repeat.

#Quick setup

Add the server once. The first MCP request opens a browser to sign in.

Terminal
codex mcp add variant --url https://mcp.variant.art/mcp

#What Codex can do after setup

Once connected, Codex has the same 20 tools as any other MCP client:

  • Create or duplicate a deck
  • Add, move, replace, or edit individual slides
  • Apply batched changes across multiple slides in one call
  • Render slide previews to inspect layout
  • Upload images and reference them with asset:// URLs
  • Read the brand kit so generated drafts land on-brand
  • Export the deck as HTML, PDF, PPTX, or JSON

#Verify it

Quick sanity check before a longer task.

Terminal
codex mcp get variant

#OAuth vs bearer tokens

OAuth is the default. The first MCP request opens a browser to sign in, and tokens refresh automatically — no config files to rotate.

If your Codex setup can't open a browser (CI, a remote sandbox), generate a bearer token in Settings → MCP and pass it through Codex's MCP config as an Authorization header.

#A good first prompt

Codex is good at structured edits, so start small and exercise create, preview, and edit in one session.

Prompt
Create a three-slide product update deck.
After creating it, render a preview of slide 2
and tighten the headline if it looks too long.

#Why HTML slides suit Codex

Slide source is HTML and CSS. Codex can change a heading, restyle one element, or swap a color without redrafting the whole slide. That keeps both the agent's runs and your manual edits cheap — and it means the third or fourth iteration on a deck doesn't get more expensive than the first.

#Common questions

How do I connect Codex to Variant?

Run codex mcp add variant --url https://mcp.variant.art/mcp. The first request opens a browser to sign in with OAuth, after which Codex can call any of the MCP tools.

Can Codex create presentations?

Yes. Codex can use Variant's MCP tools to create decks, add and edit slides, render previews, upload assets, and export to HTML, PDF, PPTX, or JSON.

Does Codex use the same MCP URL as Claude Code?

Yes. https://mcp.variant.art/mcp works for any MCP client that supports HTTP transport.

What should I ask Codex to do first?

Ask for a short three-slide deck and a preview. That exercises read, write, and preview in one session and is easy to inspect.

Why HTML slides instead of PPTX?

Codex makes precise edits to text. HTML slides stay as text the whole way through — every change is a typed diff. PPTX would force a round-trip through a binary document model and re-render whole slides for small fixes.