Codex + YouTube
Post to YouTube from Codex
Through iHatePosting, Codex can upload videos with a title, a visibility, a thumbnail and tags. Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login, then ask it for the post you want.
Setup takes about a minute. A post must have one video attachment; it cannot be empty.
Posting to YouTube from Codex
Add iHatePosting to Codex once, connect YouTube, and then describe the post. Setup takes about a minute.
Add iHatePosting to Codex once
Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login. Then connect YouTube in iHatePosting if you have not already.
Add to the end of ~/.codex/config.toml, then run the login command.
[mcp_servers.ihateposting]
url = "https://app.ihateposting.com/mcp/oauth"
# then, in a terminal:
codex mcp login ihatepostingAsk for the YouTube post
Describe the post in plain language. Codex writes it, applies the settings and schedules it.
> Upload tutorial.mp4 to YouTube as public, titled Getting started in five minutes, with thumbnail.png, on Friday at 9:00.
Codex: Done. Scheduled on YouTube.What Codex can do on YouTube
On YouTube, Codex can upload videos with a title, a visibility, a thumbnail and tags.
Video uploads
Upload one video per post from your media library.
Visibility
Publish as public, unlisted or private.
Thumbnails
Attach a custom thumbnail picture.
Tags
Add tags so the video is easier to find.
Made for kids
Say whether the video is meant for children, as YouTube asks.
How Codex gets a post onto YouTube
You say what you want and Codex makes the calls. A typical conversation goes like this.
Find your YouTube channel
Which YouTube accounts do I have in iHatePosting?
What happens
- Codex lists your channels and finds YouTube
- It also reads the channel's rules and settings
Compose your content
Upload demo.mp4 to YouTube as private with the title Internal demo, tonight at 22:00.
What happens
- Codex drafts the text for YouTube
- It uploads any media you mention
Schedule and publish
Yes, schedule it for tomorrow at 9:00.
What happens
- Codex schedules the post in iHatePosting
- iHatePosting publishes it to YouTube at that time
YouTube settings reference
Say the option in your own words and Codex fills in the matching field. This is every YouTube setting it can use.
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | The video's title, 1 to 100 characters |
| type | string | Yes | public, private or unlisted |
| selfDeclaredMadeForKids | string | No | yes or no |
| thumbnail | object | No | A thumbnail picture from your media library |
| tags | array | No | Tags, each with a value and a label |
Common configurations
Each case below is a request Codex understands, followed by the YouTube options it sets.
A public video
Publish it as public with the title Launch walkthrough
- Applies: title: Launch walkthrough, type: public
A private upload
Keep it private for now
- Applies: type: private
Tagged video
Tag it social media and scheduling
- Applies: tags: social media, scheduling
What is Codex?
Codex is OpenAI's coding agent. The command line, the IDE extension and the ChatGPT desktop app all read the same config.toml, so one entry connects every one of them.
It can read a repository, write the announcement for a change and schedule it in iHatePosting.
How iHatePosting works with Codex
Once connected, iHatePosting hands Codex its tools: your channels, posts, media and each channel's settings (14 tools in all). Codex calls them while you describe what you want.
- iHatePosting MCP server (sign in): Entry in
~/.codex/config.toml, thencodex mcp login - iHatePosting MCP server (API key): Entry in
~/.codex/config.tomlthat names the variable holding your key - iHatePosting skill (command line): npx skills add
iHatePostingOrg/iHatePosting-Agent
# iHatePosting MCP server (sign in)
[mcp_servers.ihateposting]
url = "https://app.ihateposting.com/mcp/oauth"
# then, in a terminal:
codex mcp login ihatepostingYouTube and the other platforms Codex reaches
Ask for YouTube and other channels in a single message; every channel still applies its own settings.
YouTube requests to try in Codex
Publish a tutorial
Upload tutorial.mp4 to YouTube as public, titled Getting started in five minutes, with thumbnail.png, on Friday at 9:00.
A private draft
Upload demo.mp4 to YouTube as private with the title Internal demo, tonight at 22:00.
Add tags
Upload recap.mp4 to YouTube as unlisted with the tags recap and webinar.
YouTube limits and gotchas to know
A few of YouTube's rules shape how Codex writes your request, so it helps to know them.
- A post must have one video attachment; it cannot be empty.
- A description can hold up to 5,000 characters.
- The title is required and can be up to 100 characters; the visibility is required too.
- All tags together can hold up to 500 characters.
Frequently asked questions
Start free for 30 daysAdd the iHatePosting entry to Codex's config.toml and sign in with codex mcp login, connect YouTube in iHatePosting, then ask Codex for the post in plain language. It schedules the post and iHatePosting publishes it at the time you set.
A description can hold up to 5,000 characters.
Codex can set title, type, selfDeclaredMadeForKids, thumbnail, tags. The settings reference on this page lists what each one does.
No. The first route opens an iHatePosting sign-in in your browser, and no key changes hands. The route that takes a key uses one from Settings → Agents / Dev in iHatePosting. The command line signs in with ihateposting auth:login.
Yes. Name a day and a time and iHatePosting publishes the post then, whether or not Codex is still open.