New MCP server: let ChatGPTClaudeClaude CodeCodexCursorOpenClaw or any AI agent schedule your posts See how it works

Codex + Instagram

Post to Instagram from Codex

Through iHatePosting, Codex can put pictures and carousels on your feed, share stories and reels, and add collaborators to a post. 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 caption can hold up to 2,200 characters.

InstagramCodex15 networks

Posting to Instagram from Codex

Add iHatePosting to Codex once, connect Instagram, and then describe the post. Setup takes about a minute.

Step 1

Add iHatePosting to Codex once

Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login. Then connect Instagram in iHatePosting if you have not already.

Add to the end of ~/.codex/config.toml, then run the login command.

~/.codex/config.toml
[mcp_servers.ihateposting] url = "https://app.ihateposting.com/mcp/oauth" # then, in a terminal: codex mcp login ihateposting
Step 2

Ask for the Instagram post

Describe the post in plain language. Codex writes it, applies the settings and schedules it.

Codex
> Share menu.jpg on Instagram tomorrow at 11:00 with a short caption that introduces our autumn dishes. Codex: Done. Scheduled on Instagram.

What Codex can do on Instagram

On Instagram, Codex can put pictures and carousels on your feed, share stories and reels, and add collaborators to a post.

Feed posts

Publish a picture or a carousel with a caption.

Stories

Publish stories: each picture or video you attach becomes a story of its own.

Reels

Publish a video as a reel, including a trial reel that is shown to non-followers first.

Collaborators

Invite other accounts as collaborators on a post.

Scheduling

Choose the time, and iHatePosting publishes it for you.

How Codex gets a post onto Instagram

You say what you want and Codex makes the calls. A typical conversation goes like this.

Find your Instagram channel

Which Instagram accounts do I have in iHatePosting?

What happens

  • Codex lists your channels and finds Instagram
  • It also reads the channel's rules and settings

Compose your content

Post sale.png as an Instagram story today at 17:00.

What happens

  • Codex drafts the text for Instagram
  • 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 Instagram at that time

Instagram settings reference

Say the option in your own words and Codex fills in the matching field. This is every Instagram setting it can use.

FieldTypeRequiredDescription
post_typestringYespost or story
is_trial_reelbooleanNoPublish the reel as a trial reel
graduation_strategystringNoHow a trial reel graduates to followers: MANUAL or SS_PERFORMANCE
collaboratorsarrayNoAccounts to invite as collaborators, each as a label

Common configurations

Each case below is a request Codex understands, followed by the Instagram options it sets.

A story

Post it as a story

  • Applies: post_type: story

A feed post

Post it to my feed

  • Applies: post_type: post

A trial reel

Publish the video as a trial reel that I will graduate by hand

  • Applies: is_trial_reel: true, graduation_strategy: MANUAL

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, then codex mcp login
  • iHatePosting MCP server (API key): Entry in ~/.codex/config.toml that names the variable holding your key
  • iHatePosting skill (command line): npx skills add iHatePostingOrg/iHatePosting-Agent
Set up Codex
# iHatePosting MCP server (sign in) [mcp_servers.ihateposting] url = "https://app.ihateposting.com/mcp/oauth" # then, in a terminal: codex mcp login ihateposting

Instagram and the other platforms Codex reaches

Ask for Instagram and other channels in a single message; every channel still applies its own settings.

Instagram requests to try in Codex

A feed post

Share menu.jpg on Instagram tomorrow at 11:00 with a short caption that introduces our autumn dishes.

A story

Post sale.png as an Instagram story today at 17:00.

A reel

Publish demo.mp4 as an Instagram reel on Friday at 18:00 and invite @studio as a collaborator.

Instagram limits and gotchas to know

A few of Instagram's rules shape how Codex writes your request, so it helps to know them.

  • A caption can hold up to 2,200 characters.
  • Instagram takes no post without a picture or a video.
  • Each file of a story becomes its own story, and a story takes no collaborators.
  • A trial reel is a single video, and Instagram offers trial reels only to eligible accounts.
  • Alt text on a picture can hold up to 1,000 characters.
  • post_type is required on every post; the agent uses post unless you ask for a story.

Frequently asked questions

Start free for 30 days

Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login, connect Instagram in iHatePosting, then ask Codex for the post in plain language. It schedules the post and iHatePosting publishes it at the time you set.

Hand your Instagram posts to Codex

Start free for 30 days.