How to generate PowerPoint slides from Codex CLI (MCP setup guide, 2026)
Updated 2026-08-23 · ~6 min read · Guide
One command connects Codex CLI to slideforge.dev and gives your terminal agent a real PowerPoint engine: codex mcp add slideforge --url https://api.slideforge.dev/mcp/. Codex detects the OAuth support, opens the sign-in, and you are done — the download URL for each editable .pptx comes back right in the response, with a per-field fidelity report. This guide covers setup, the config.toml details, scripted codex exec use, and the one log line that looks like an error but is not.
TL;DR
- One command, OAuth included.
codex mcp addregisters the server and runs the sign-in in the same step. - No key on disk. OAuth 2.1 by default; API keys only for headless runs, via an environment variable — never in the URL.
- Download link in the response. The
.pptxURL comes back visibly in the tool result — right for a terminal agent. - Sub-second renders. Typed intents render deterministically — no model in the render path, so nothing to wait for.
- $0.05 a slide, no quota. 60 free slides on signup, no card. Defective slides are not billed.
What you need first
- Codex CLI installed and working in a terminal.
- A browser on the same machine, for the one-time OAuth sign-in. (Headless? Skip to CI and headless.)
- No SlideForge account needed up front — the sign-in creates one, and it starts with 60 free slides.
- Using VS Code, Cursor, or Claude Code instead? Each has its own guide: VS Code, Cursor, Claude Code.
Method 1 — connect with OAuth (recommended)
codex mcp add slideforge --url https://api.slideforge.dev/mcp/Codex answers “Detected OAuth support. Starting OAuth flow…”, opens the browser, and finishes with “Successfully logged in.” There is no separate login step. If the flow did not start (or you signed out later), run it explicitly:
codex mcp login slideforgeThe entry lands in ~/.codex/config.toml as:
[mcp_servers.slideforge]
url = "https://api.slideforge.dev/mcp/"Leave it that bare. Do not add bearer_token_env_var to an entry you want on OAuth — when that field is present, Codex uses the bearer token and skips OAuth entirely, even after a successful login. One entry, one auth method.
Method 2 — API key for CI and headless runs
When there is no browser to sign in with, use a key from the console. Put it in an environment variable and point the entry at it:
[mcp_servers.slideforge]
url = "https://api.slideforge.dev/mcp/"
bearer_token_env_var = "SLIDEFORGE_API_KEY"Codex sends the variable's value as an Authorization: Bearer header. The key stays in your secret store; nothing lands in config.toml or the URL.
Verify the connection
codex mcp listYou should see slideforge with OAuth authentication. If the entry shows Auth: Bearer token when you expected OAuth, a bearer_token_env_var is set on it — remove the field and log in again.
Generate your first slide
Interactively, ask in plain language with real values — or script it:
codex exec "Make a KPI dashboard slide with slideforge:
ARR \$4.2M, up 18% QoQ. Net revenue retention 112%.
Logo churn 1.4%. Cash runway 19 months.
Give me the download URL."Codex picks the form, calls create_slide, and — because it is a headless client — the .pptx download URL comes back visibly in the tool response, along with the fidelity report. Open the file and click on $4.2M — the cursor lands in an editable text box, because it is one.
Every response reports, field by field, whether your content was bound verbatim or model-completed. A slide with a blocking defect is not billed, and re-sending an identical input is free and byte-identical — which is what makes the scripted loop below safe to re-run.
Where Codex + a slide compiler shines
The weekly report that builds itself
A scheduled codex execjob queries last week's numbers and calls create_deck with typed fields. Five slides, a few seconds, about $0.25 — and the only thing that changes between runs is the data.
One deck per customer, forty times a month
Per-entity fan-out is where per-slide pricing stops being a detail. Forty decks a month is a hard wall under a download quota and a rounding error at $0.05 a slide — and none of them needs a human to check the numbers, because the fidelity report already did.
Decks from things only your terminal can see
Test results, a release diff, a migration plan, a cost breakdown from your cloud CLI. Codex already has the context; the MCP server just turns it into something you can present.
Common mistakes and troubleshooting
An rmcp “AuthRequired … invalid_token” line in the logs
Benign. Codex's transport probes the server once before attaching the token, logs the probe as an error, then succeeds on the authenticated call right after. If the tool call completed, ignore the line — do not spend an hour on it.
OAuth login succeeded but calls still fail as unauthenticated
Check config.toml for a bearer_token_env_var on the entry — its presence makes Codex skip OAuth. Remove it (or point it at a valid key) and retry.
The trailing slash
The endpoint is https://api.slideforge.dev/mcp/ — with the trailing slash. Without it you may get a redirect that some clients do not follow on POST.
Starting over
codex mcp logout slideforgeclears the server's token; codex mcp remove slideforge drops the entry entirely. Re-add and the OAuth flow runs fresh.
Pricing
- Create a slide: $0.05
- Translate a slide (32 languages): $0.02
- Check, plan, browse the catalog: free
- A slide with a blocking defect: not billed
- An identical repeat input: free
60 free slides on signup, no credit card. No subscription, no seats, and no download quota.
Frequently asked questions
Does Codex CLI support remote MCP servers natively?
Yes. Codex speaks MCP over Streamable HTTP directly — codex mcp add with a URL registers the server, and Codex runs the OAuth sign-in itself. Servers live in ~/.codex/config.toml under [mcp_servers.<name>]. SlideForge is a hosted remote server, so there is nothing to install or update locally.
Do I need an API key to use SlideForge with Codex?
No. codex mcp add detects that the server supports OAuth and starts the browser sign-in on the spot — no key is written to config.toml. If the flow doesn't start automatically, run codex mcp login slideforge. API keys (sf_live_...) exist for headless and CI use, where a browser flow isn't possible — set bearer_token_env_var in the server's config.toml entry.
Can I use both OAuth and an API key on the same server entry?
No — and this is the gotcha worth knowing. If bearer_token_env_var is set on a server entry, Codex uses the bearer token and skips OAuth entirely, even if you logged in before. Pick one per entry: OAuth for your interactive terminal, a separate entry (or machine) with bearer_token_env_var for CI.
Is the .pptx really editable, or is it images?
Real, editable PowerPoint objects. Text is text, tables are tables, charts are native chart shapes — open the file and change a number. Several slide tools export a screenshot inside a .pptx wrapper, which looks identical until someone tries to edit it. Open the file and click a value; if the cursor lands in a text box, it is native.
I see an rmcp "AuthRequired ... invalid_token" error in the logs — is the setup broken?
Almost certainly not. Codex's MCP transport probes the server once before attaching the token, logs that probe as an error, and then succeeds on the authenticated call immediately after. If the tool call right after that line completed and you got a .pptx URL, the setup is fine. Only investigate if the calls themselves fail.
Can I use this in CI or a scripted run?
Yes — codex exec is the natural fit. Register the server with an API key via bearer_token_env_var (no browser in CI), then have the scripted run call create_slide or create_deck with typed fields from whatever produced them — a query result, a test report, a build summary. Renders are deterministic, so the same input produces the same deck, which makes the output diffable and the job re-runnable.
What does it cost?
$0.05 per slide created, $0.02 per slide translated; planning and browsing the catalog are free. No subscription and no download quota. Signup includes 60 free slides with no credit card, a slide that comes back with a blocking defect is not billed, and an identical repeat input is free.
How is this different from having Codex write python-pptx code?
Codex can write python-pptx, but then you own the layout code, the environment it runs in, and the review of every generated deck. SlideForge gives the agent 200+ finished layouts as typed forms: it sends fields, the engine composes and validates the slide deterministically, and the response reports per field whether your content was bound verbatim. The render path has no LLM in it, so the same input always produces the same deck.
One command. Then check the fidelity report.
60 free slides. No credit card. No subscription.
Canonical: slideforge.dev/guides/codex-powerpoint-mcp. SlideForge is published by Smart Data Brokers GmbH, Zurich. Codex is a product of OpenAI; SlideForge is an independent MCP server and is not affiliated with OpenAI.