Post, schedule and run ads from Codex

One command installs Hermoso’s plugin in Codex. It can then research competitor ads, render finished video and image ads, and publish them to eleven social channels, interactively or from codex exec.

What is Codex?

Codex is OpenAI’s coding agent, driven from the terminal, the IDE extension or the ChatGPT desktop app. It runs non-interactively as well as interactively, which makes it the client people reach for when a marketing job should happen on a schedule rather than in a conversation.

Codex or ChatGPT? Codex is OpenAI’s coding agent, and it takes Hermoso as a plugin or an MCP server. The ChatGPT chat app adds Hermoso from its app directory instead.

Hermoso is marketing on autopilot: 922+ tools over one MCP endpoint covering competitor ad research, finished image and video ads across 100+ models, publishing and scheduling to eleven social channels, and campaign management on Meta, Google Ads, Microsoft Advertising, Reddit Ads, LinkedIn, Pinterest, X Ads, TikTok Ads, Snapchat Ads, ChatGPT Ads, Apple Search Ads and AppLovin Ads. One connection, and Codex has all of it.

Connect Hermoso to Codex

  1. One command, and no key.
    codex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermoso
    Codex reads the marketplace file in Hermoso’s public repository and installs its five skills (research, ad-from-brand, generate, product-photoshoot and marketing). The skills run the hermoso command through npx, so no tool list is loaded into your sessions and nothing costs context until a command runs.
  2. Sign in once.
    npx -y hermoso auth login
    It opens a browser sign-in and stores an owner-only credential in ~/.hermoso/config.json. No browser on that machine, say CI or a container? Create a key under MCP & CLI → Terminal & API keys and run npx -y hermoso auth login --token hmk_…. A key carries real spend authority, so treat it like a password.
  3. Optional: the MCP server as well.
    codex mcp add hermoso -- npx -y hermoso mcp
    That writes the server into ~/.codex/config.toml and reads the same stored credential, so no key goes in the file. Prefer the hosted endpoint? codex mcp add hermoso --url https://app.hermoso.ai/mcp, then codex mcp login hermoso for the OAuth sign-in. The skills reach every tool without either.
  4. Ask Codex for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

Codex keeps MCP servers in ~/.codex/config.toml, or .codex/config.toml in a trusted project, and that file is TOML, not JSON: a copied mcpServers block will not load, and a hand-written entry is [mcp_servers.hermoso] with command = "npx" and args = ["-y", "hermoso", "mcp"]. The trailing mcp is load-bearing: npx -y hermoso with no subcommand prints help and exits. Codex reads plugin marketplaces in the same .claude-plugin layout Claude Code uses, which is why one repository installs in both.

Every channel Codex can publish to

Each of these has its own page with that channel’s real caption cap, its real visibility options, what it refuses and why, and a worked example phrased for Codex.

ChannelCarouselText limit
Facebook2+ photos, our cap of 3063,206 chars
Instagram2–10, images + video2,200 chars
Threads2–20, images + video500 chars
TikTokUp to 35 images2,200 / 4,000 chars
YouTubeRefused (the unit is a video)100-char title
XRefused (4 media render as a grid)280, or 25,000 on Premium
LinkedIn2–20 images, company Page only3,000 chars
Pinterest2–5 images (blocked on Trial)800-char description
Bluesky2 to 4 images300 chars and 3,000 bytes
Telegram2 to 10, photos and video4,096, or 1,024 with media

Every one of them queues through one schedule_post calendar with per-channel captions, and list_scheduled reports per-channel outcomes rather than a single green tick, because “the job succeeded” and “the post went out” are different questions. A scheduled post lives in Hermoso, so it goes out on time whether or not Codex is still running.

Google Business Profile is the newest channel: Posts with a photo and a button on your Google Search and Maps listing, replies to your reviews, listing edits and the calls, website clicks and direction requests the listing earns. Codex reaches it through the same tools, and schedule_post queues it on the same calendar.

One channel that is built but not offered

Being straight about this is worth more than a longer list. One publishing surface exists in the codebase and is held back, waiting on the platform rather than on us:

  • Reddit: organic posting and post stats are built, but Reddit’s Responsible Builder Policy requires explicit written approval before an app may use the Data API, and that ticket has not been granted. The connector is held back rather than offered as an OAuth screen leading to a dead API. Reddit Ads is a different connection and it is live: the full campaign tree, forecasting, targeting search, pixels and lead forms.

A connector that would hand you a successful OAuth and a dead API is worse than one that is not offered yet, so it is not listed as available.

Three things to type once it is connected

  1. Research. “Who are my three closest competitors, and what are their longest-running Meta ads? Tell me which hook keeps repeating.” It runs find_competitors → pull_competitor_ads → mine_angles.
  2. Create. “Make me a 9:16 UGC video ad using that hook, with my real product photo and captions burned in.” It runs get_brand → plan_ad → render_ad, and hands back a finished mp4 URL.
  3. Ship. “Schedule it to Instagram and TikTok for Tuesday 9am, and build a paused Meta campaign around it targeting the US at $30 a day.” It runs schedule_post → create_meta_campaign → create_meta_ad.

What Codex cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first (hermoso_capabilities publishes each model’s exact credit cost before anything spends). Credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately yours: linking each account, once. Most channels link through the platform’s own OAuth consent screen in a browser; Bluesky takes an app password and Telegram a bot token, pasted in Hermoso. Everything after that is a tool call.

Interactively Codex shows the call before it runs it. Non-interactively there is nobody to ask, which is worth designing around on any step that publishes or spends.

What it costs

Adding Hermoso to Codex costs nothing extra: there is one credit meter, and it does not care which client called. A free account starts with 30 credits at signup and 250+ more to earn. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free on every channel except X, which bills per call because X charges per API request. Paid plans are $29, $69 and $149 a month for 1,200, 3,000 and 7,000 credits, and every feature is on every plan. hermoso_capabilities gives the exact credit price of any render before it runs.

Troubleshooting

  • A local server prints help and exits. The arguments are missing the trailing mcp. npx -y hermoso on its own prints help; npx -y hermoso mcp starts the server.
  • There is no browser on that machine. Create a key under MCP & CLI → Terminal & API keys and run npx -y hermoso auth login --token hmk_… instead.
  • A channel is missing. Connect it in Hermoso under Settings → Connectors, then ask Codex to run list_connectors again.
  • Codex answers without using Hermoso. Name it in the request: “use Hermoso to …”. That leaves no doubt about which tools should do the job.

Beyond publishing

Publishing is the last step, and it is the smallest one. The same connection gives Codex the Meta, Google and LinkedIn ad libraries plus organic TikTok, Instagram, YouTube, Reddit and Threads for research; 100+ image, video, voice and writing models on a single credit meter, with UGC avatars, dubbing, upscaling and native HTML ad formats; and the full campaign tree on twelve paid platforms. There are no per-vendor API keys to hold and no separate app to learn.

See the full tool list, every agent Hermoso works in, or what a marketing MCP is. For the longer story on this client specifically, see Ads from the command line.

Hermoso in other agents

The same Hermoso account works in every agent below, so your brand, library, schedule and credits follow you between them.

AgentHow Hermoso connects
ClaudeConnects with OAuth, nothing to paste
ChatGPTConnects with OAuth, nothing to paste
Claude CodeSigns in from the terminal with hermoso auth login, nothing to paste
CursorSigns in from the terminal with hermoso auth login, nothing to paste
ClineTakes an API key in an Authorization header
OpenClawSigns in from the terminal with hermoso auth login, nothing to paste
Grok BotAdds the Hermoso Marketing Bot template and takes an API key in the chat, or signs in from the Bot’s own terminal
HermesSigns in from the terminal with hermoso auth login, nothing to paste
Gemini CLISigns in from the terminal with hermoso auth login, nothing to paste
PerplexityConnects with OAuth, nothing to paste
Le ChatConnects with OAuth, nothing to paste
Claude CoworkConnects with OAuth, nothing to paste
Perplexity ComputerConnects with OAuth, nothing to paste
PaperclipConnects with OAuth, nothing to paste
GeminiConnects with OAuth, nothing to paste
Grok BuildSigns in from the terminal with hermoso auth login, nothing to paste
Kimi CodeAdds the hosted URL to mcp.json and signs in with /mcp-config login, nothing to paste
DeepSeek HarnessSigns in from the terminal with hermoso auth login and runs Hermoso as a local server, nothing to paste
ManusTakes an API key in an Authorization header
MuseOne chat message, then an OAuth sign-in
Any MCP clientThe hosted URL with OAuth, or a local server over stdio

Frequently asked questions

Can Codex post to social media?

Yes, once you install Hermoso. Codex can then publish to Facebook, Instagram, Threads, TikTok, YouTube, X, LinkedIn, Pinterest, Bluesky, Telegram and Google Business Profile, and schedule to all eleven from one queue with per-channel captions.

How do I add Hermoso to Codex?

Run codex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermoso, which installs Hermoso's skills, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. For the MCP server as well, run codex mcp add hermoso -- npx -y hermoso mcp. Codex keeps MCP servers in ~/.codex/config.toml, or .codex/config.toml in a trusted project, and that file is TOML, not JSON: a copied mcpServers block will not load, and a hand-written entry is [mcp_servers.hermoso] with command = "npx" and args = ["-y", "hermoso", "mcp"]. The trailing mcp is load-bearing: npx -y hermoso with no subcommand prints help and exits. Codex reads plugin marketplaces in the same .claude-plugin layout Claude Code uses, which is why one repository installs in both.

Can Codex research my competitors' ads?

Yes. From Codex the Meta, Google and LinkedIn ad libraries are searchable alongside organic TikTok, Instagram, YouTube, Reddit and Threads, ranked by run length, because an ad still running after months is an ad that is paying for itself. It will also tear a competitor down and return a video's voiceover, on-screen text and beat list with timestamps.

Do I need a separate account to use Hermoso in Codex?

No. One Hermoso account is enough, and Codex authenticates against it. The sign-in step stores the credential itself, so there is nothing to paste. The web studio at app.hermoso.ai is the same engine and the same credits.

Is it safe to let Codex post and run ads for me?

Hermoso keeps the steps that cost money or cannot be undone behind gates on its own server, whatever Codex is set to do: every campaign is created paused, spend switches and deletes need an explicit confirmation, and a post only reaches an account you connected and ticked in Hermoso. Interactively Codex shows the call before it runs it. Non-interactively there is nobody to ask, which is worth designing around on any step that publishes or spends.

Does Codex share its Hermoso setup between the CLI and the desktop app?

Yes, for MCP servers. OpenAI documents one config file, ~/.codex/config.toml, shared by the Codex CLI, the IDE extension and Codex in the ChatGPT desktop app, so a server added with codex mcp add shows up in all three.

Start free with 30 credits at signup and 250+ more to earn. Every feature is on every plan. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free.

Start free →   See pricing