Codex for marketing: running ad work from OpenAI Codex
Codex is OpenAI's coding agent, and it suits marketing jobs that end in files: a folder of resized ads, a weekly report, a batch of variants. Connect an ad MCP (Model Context Protocol) server and it makes and launches the ads as well.
By Grace Kong·Updated ·4 min read
Remake your winning ads in every size
TL;DR
Codex comes with ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise; run it on an API key instead and it bills at API rates (OpenAI, Nov 2026).
Two commands connect a server, codex mcp add with a URL and codex mcp login, and the ChatGPT desktop app, Codex CLI and IDE extension share that one config.
By default Codex waits 60 seconds per tool call and 10 seconds for a server to start, so raise tool_timeout_sec before a video job.
Jobs that suit it: remaking winners in every placement size, a weekly results file, hook variants saved to a folder, and breakdowns of ads you link to.
Set up Hypesonic in Codex
One command to add the server, one to sign in.
codex mcp add hypesonic --url https://www.hypesonic.com/mcp codex mcp login hypesonic
Or add it to ~/.codex/config.toml:
[mcp_servers.hypesonic] url = "https://www.hypesonic.com/mcp" tool_timeout_sec = 600
authdefaults to OAuth. In the desktop app or IDE extension, click Authenticate when asked.- On a machine without a browser, run
codex mcp login hypesonic --no-browser, open the printed URL and paste the redirect URL back. - A project can have its own
.codex/config.toml, but Codex only reads it in trusted projects. - ChatGPT on the web does not read this file; it uses its own plugins.
Setup for every other agent: connect the Hypesonic MCP.
Sources: OpenAI Codex docs, MCP.
Timeouts for creative jobs
Codex waits 60 seconds for a tool by default, and video can take longer.
Raise tool_timeout_sec for servers that render video or long reports, as in the config above. startup_timeout_sec (10 seconds by default) controls how long Codex waits for a server to start. If a run still times out, ask the agent to start the job and check back on it rather than wait in one call.
Sources: OpenAI Codex docs, MCP.
Marketing jobs that suit Codex
Anything that touches a folder, a spreadsheet or many steps in a row.
| Job | Example request | What the agent uses |
|---|---|---|
| Placement sizes | "Remake the ads in ./winners for every Meta and TikTok placement and save them by channel." | Image edit models such as bytedance/seedream-5-pro and google/nano-banana-pro, one run per size. |
| Weekly report | "Pull last week's spend and results for our Hypesonic campaigns and write report.md with what to scale and cut." | Spend and results from every channel the agent runs. |
| Ad breakdowns | "Break down these 5 TikToks and save each hook to hooks.md: [links]." | hypesonic/media-fetch to bring in each public post, and an understanding model such as google/gemini-4-neon to watch it. |
| Creative testing | "Make 6 variants of our best ad that test new hooks and save them to ./tests." | The meta-static-ads or meta-video-ads playbook. |
| A launched test | "Launch the 6 variants on Meta at $20 a day each and name the winner after a week." | Hypesonic launches the campaign, sets the budget and reports results. |
Other ad MCP servers in Codex
Codex speaks Streamable HTTP, so hosted ad servers connect the same way.
- Google Ads MCP (official): the README shows
codex mcp add google_ads --url http://localhost:8080/mcpandcodex mcp login google_adswhen the server runs in HTTP mode with its OAuth proxy. It reads data and creates assets but cannot change campaigns. - Meta Ads MCP (official): a remote server for any MCP-compatible agent; servers that need a pre-registered client can use
--oauth-client-id. - Third-party ad servers: several hosted servers for Meta and Google list Codex as a supported client (Pipeboard, Adspirer, Madgicx).
Sources: GitHub, googleads/google-ads-mcp README, Meta for Developers, ads MCP server overview, OpenAI Codex docs, MCP.
Billing: ChatGPT plan or API key
You can run Codex on your ChatGPT plan or on an API key.
Codex is included in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. With an API key in the CLI, SDK or IDE extension, usage bills at API rates and some cloud features are not included (OpenAI). Hypesonic bills separately from one balance: creative at the model's price plus a 10% markup, quoted before each run, with no subscription or seats.
Questions
Is Codex only for developers?
No. Marketers use it for jobs that involve files and many steps, such as resizing a folder of ads or writing a weekly report, and it is included in every ChatGPT plan.
How do I add an MCP server to Codex?
Run codex mcp add with a name and --url, then codex mcp login with the same name. Or add an [mcp_servers.name] table with a url to ~/.codex/config.toml.
Why does my video job time out in Codex?
Codex waits 60 seconds per tool call by default. Set tool_timeout_sec higher for that server in config.toml.
Does an MCP server added in Codex work in ChatGPT?
In the ChatGPT desktop app, yes, because it shares the Codex config. ChatGPT on the web uses its own plugins and does not read the Codex file.
Can Codex launch ads?
With an MCP server that launches, yes. Hypesonic launches on Meta, TikTok, Pinterest, Reddit and LinkedIn and buys streaming TV and billboards, after showing you the price.
Sources
- 1OpenAI Codex docs, MCP · accessed Nov 30, 2026
- 2OpenAI Codex docs, pricing and plans · accessed Nov 30, 2026
- 3GitHub, googleads/google-ads-mcp README · accessed Nov 30, 2026
- 4Meta for Developers, ads MCP server overview · accessed Nov 30, 2026
- 5Pipeboard · accessed Nov 30, 2026
- 6Adspirer pricing · accessed Nov 30, 2026
- 7Madgicx MCP · accessed Nov 30, 2026
Remake your winning ads in every size
Keep reading
- IntegrationsHow to connect the Hypesonic MCP to your AI agentRead
- IntegrationsChatGPT for advertising: running ads from ChatGPT, and ads in ChatGPTRead
- IntegrationsCursor for marketing: what marketers do in Cursor, and how to add ad toolsRead
- IntegrationsThe Hypesonic APIRead
- IntegrationsMCP vs API: what's the difference?Read
- AI adsAI ads: what they are, what they cost and where they fall shortRead