Hermoso is a marketing MCP server: 906+ tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Codex reaches all of it through one connection. This page covers one slice of that: what Codex can actually do on Telegram, and what Telegram will not let it do.
Connect Hermoso to Codex
- One command, and no key.
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 thecodex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermosohermosocommand throughnpx, so no tool list is loaded into your sessions and nothing costs context until a command runs. - Sign in once.
It opens a browser sign-in and stores an owner-only credential innpx -y hermoso auth login~/.hermoso/config.json. No browser on that machine, say CI or a container? Create a key under MCP & CLI → Terminal & API keys and runnpx -y hermoso auth login --token hmk_…. A key carries real spend authority, so treat it like a password. - Optional: the MCP server as well.
That writes the server intocodex mcp add hermoso -- npx -y hermoso mcp~/.codex/config.tomland 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, thencodex mcp login hermosofor the OAuth sign-in. The skills reach every tool without either. - 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.
Then connect Telegram itself, once, under Settings → Connectors in Hermoso by pasting a bot token from @BotFather, and add that bot to your channel as an administrator. There is no consent screen: the token is the credential, and the bot is who posts.
The Telegram tools Codex gets
post_to_telegram: sends a message as your bot to the chat you name: text up to 4,096 characters, or one photo, one video, or an album of 2 to 10 with photos and video mixed.schedule_post: queues it with itschatIdon the same calendar as every other channel.list_telegram_chats: the chats that messaged the bot in the last 24 hours. It helps find an id, and it is not a list of every chat the bot is in.edit_telegram_message / pin_telegram_message: fix a message’s text or caption without losing its views, and pin or unpin the call to action.create_telegram_invite_link: a named invite link per campaign, with an optional expiry, member cap or join approval, so you can see who joined from where.telegram_account: the chat’s subscriber or member count, title, description and invite link.list_telegram_dms: what people sent the bot in the last 24 hours, newest first, to answer withpost_to_telegram.delete_telegram_message: removes a message the bot sent, within Telegram’s 48-hour window, after a confirm step.
Telegram connects with a bot token, not a sign-in screen. Make a bot with @BotFather in Telegram, paste its token under Settings → Connectors, then add the bot to your channel as an administrator with Post Messages, or to a group as a member who can post. Hermoso posts as that bot, never as you. Two limits are Telegram’s and worth planning around: a bot gets no per-post views and no post history, so the subscriber count and named invite links are the numbers you have; and messages sent to the bot are kept for 24 hours, then gone. Publishing costs no credits.
Telegram limits worth knowing before you automate anything
| Text | A Telegram message runs to 4,096 characters, but only 1,024 once a photo or video is attached, because the text becomes a caption. It is enforced when the post is created or queued, so an overlong post is refused while you are still there to fix it instead of being silently cut on the way out. |
|---|---|
| Visibility | Sent or not sent, with no draft, unlisted or private form. Who sees it is decided by the chat: “post to a private group or channel and only its members see it.” silent delivers without a notification sound and changes nothing about who can see the message. |
| Carousel | 2 to 10 items as an album, and photos and video may be mixed. Both bounds are Telegram’s own, from the Bot API’s sendMediaGroup (“must include 2-10 items”), and so is the mixing. The album shows one caption, on its first item. Hermoso uploads the files instead of passing links, which raises Telegram’s ceilings to 10MB per photo and 50MB per video. |
| Which account | chatId, required on every post: a public channel’s @username or the numeric id (a supergroup or channel starts with -100). The Bot API has no method that lists the chats a bot is in, so Hermoso cannot know them and never guesses. |
Try it in Codex
Ask for it in ordinary language. These are plain sentences, not a DSL:
“Non-interactive: every weekday at 8am, post the day’s deal to @ourdeals with the product image, silently, and print the message id as JSON.”
That walks render_ad → post_to_telegram → pin_telegram_message → create_telegram_invite_link. 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.
Codex on Telegram: the part that bites
Put chatId in the config, not in the prompt’s guesswork. schedule_post carries it per post the way it carries a Pinterest board, and a queued Telegram post without one is refused at enqueue. silent delivers without a notification sound, which suits a daily post in a channel people keep open. It changes nothing about who sees the message; the chat decides that.
For unattended runs, prefer the hermoso CLI with --json over the full tool manifest. It is far cheaper in context and easier to assert on.
Research Telegram before you post
There is no Telegram ad library and no channel search in Hermoso, so it claims no competitor research on Telegram. Research the creative where it is public (the Meta, Google and LinkedIn ad libraries plus organic TikTok, Instagram, YouTube, Reddit and Threads) and post the finished ad here.
The paid half
There are no Telegram ads in Hermoso, and we do not imply any. Telegram here is a channel you own and run through your bot: post, pin, edit, count subscribers and track invites. The paid tools cover Meta, Google Ads, Microsoft Advertising, Reddit Ads, LinkedIn, Pinterest, X Ads, TikTok Ads, Snapchat Ads, ChatGPT Ads, Apple Search Ads and AppLovin Ads.
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: creating the bot with @BotFather and adding it to your channel. Everything after that is a tool call.
The rest of the matrix
From Codex, post to: Facebook · Instagram · Threads · TikTok · YouTube · X · LinkedIn · Pinterest · Bluesky. Or see everything Codex can publish to.
Post to Telegram from: Claude · ChatGPT · Claude Code · Cursor · Cline · OpenClaw · Grok Bot · Hermes · Gemini CLI · Perplexity · Le Chat · Claude Cowork · Perplexity Computer · Paperclip · Ads from the command line
Frequently asked questions
Can Codex post to Telegram?
Yes, with Hermoso's Codex plugin. 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 then has 906+ tools, including the ones that publish to Telegram, plus the ones that research the ads already running in your market and render the creative in the first place.
How do I connect Telegram to Codex?
Two steps, once each. 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. Then make a bot with @BotFather in Telegram, paste its token under Settings → Connectors in Hermoso, and add the bot to your channel as an administrator with Post Messages. After that Codex publishes to Telegram as an ordinary tool call, naming the chat each time.
Can Codex post a carousel to Telegram?
Yes, as an album of 2 to 10 items with photos and video mixed, which is Telegram’s own rule for sendMediaGroup. The album carries one caption, on its first item. Codex calls the same publish tool either way, and a channel that cannot carry a carousel is refused with the real reason attached.
What does it cost to post to Telegram from Codex?
Posting to Telegram costs no credits; Telegram charges nothing per call. Credits are spent on generating the creative. Plans are $19, $49 and $149 a month for 1,000, 3,000 and 10,000 credits, and every feature is on every plan including Free. The only exception is enterprise SSO.
Does Codex need my Telegram password?
No. Telegram connects through a bot you create with @BotFather, and Hermoso holds only that bot's token, so Codex posts as the bot and never as your personal Telegram account. The token can be revoked in @BotFather whenever you like, and it is never handed to the model.
Can Codex schedule a Telegram post for later?
Yes. schedule_post queues it on one calendar shared with every other channel, with a per-channel caption if the copy should differ, and list_scheduled and cancel_scheduled read and pull it back. Telegram is one of the ten channels that queue.
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