How to post to Instagram with Claude Code
Let Claude Code plan Instagram Reels and carousels through MCP, approve each draft, and let your own computer post them on time.
· 5 min read
Diesen Artikel auf Deutsch lesenClaude Code can write your Instagram captions, pick the next video from your backlog and put it on a free posting slot. With Publit.Si it does that through MCP tools on your own computer. You approve each draft, and your computer posts it at the planned time through Instagram's official API.
This guide shows the whole path: what you need, how to connect Claude Code, the prompts that work, and where the limits are.
What you need
- Publit.Si installed on your Mac, Windows PC or Linux machine (installation).
- Claude Code, signed in with your own Anthropic plan. Codex, Cursor and OpenCode work the same way.
- An Instagram Professional account (Creator or Business). Meta doesn't let apps post to personal accounts.
- Your own small Meta app in Development mode. Only you use it, so Meta doesn't need to review it. The Instagram guide walks you through it.
- A tunnel: Cloudflare Tunnel on your own domain, or Tailscale Funnel without a domain. Instagram downloads your media from a public HTTPS address, and the tunnel makes only Publit.Si's small gateway reachable, never the app itself (tunnel guide).
Why Claude Code doesn't post directly
You could ask Claude Code to call Instagram's API itself. But then the agent holds your access token, uploads at whatever moment it runs, and nothing stops it from posting the same Reel twice.
Publit.Si splits the work. Claude Code plans: it reads your backlog, your posting slots and your numbers, and creates drafts. Publit.Si posts: it waits for your approval, checks Meta's daily quota before every post and publishes at the planned time. Claude Code can create, change and delete its own drafts, but it can't schedule or publish.
Step 1: Connect Claude Code to Publit.Si
Run this once in the publitsi folder (Mac and Linux):
claude mcp add --scope user publitsi -- pnpm --silent --dir "$(pwd)" mcp
On Windows, in PowerShell:
claude mcp add --scope user publitsi -- cmd /c pnpm --silent --dir "$PWD" mcp
To check it, ask Claude Code: "List my Publit.Si projects." It calls list_projects and names your projects. In Publit.Si, Settings › MCP for Claude Code, Codex, Cursor & OpenCode shows the same commands with your real path.
Step 2: Put finished videos into the backlog
Every project has a folder content/<project>/. Put each finished post into the inbox eingang/ as its own folder: the video (or images for a carousel) and, if you like, a caption.txt and alt_text.txt. About a minute later Publit.Si moves it to the backlog.
Your render scripts, or Claude Code itself, can write into eingang/ too. That's how a daily Short gets from "rendered" to "planned" without you dragging files around.
Step 3: Ask for drafts in plain words
You don't need to name tools. Claude Code picks them. Prompts that work well:
| You ask | Claude Code does |
|---|---|
| "Create drafts for the next two backlog videos that are not on Instagram yet." | list_backlog with missingOn, reads the captions, checks get_platform_rules, then create_draft. |
| "Fill my Instagram account's free slots for the next seven days." | get_posting_slots, then one backlog folder and one draft per free slot. |
| "Rewrite the captions in the style of my strongest Reels." | get_post_performance sorted by score, then new texts for the drafts. |
create_draft refuses a platform where the folder already has a draft or is already scheduled or published. The same video never goes out twice, even if you ask twice.
Step 4: Approve, and let your computer post
Drafts with a time land under Queue › Review. Check the caption and the preview, then click Approve. From then on it's your computer's job: at the planned time Publit.Si sends the post to Instagram through the official API. Your computer needs to be on at that time. Publit.Si can wake a sleeping Mac or Windows PC a few minutes before each planned post.
If Meta's daily quota is used up (Instagram allows about 50 to 100 posts a day per account), the queue waits and tries again an hour later.
What Instagram allows
- Reels: one video, 3 seconds to 15 minutes, shown in 9:16.
- Feed posts: one image or a carousel of 2 to 20.
- Stories: one image or a video up to 60 seconds.
- Numbers: views, reach and comments come back into Publit.Si, each after one extra permission. Claude Code can then read them with
get_post_performanceand write the next captions with them.
What it costs
Claude Code runs on your own Anthropic plan. Instagram's API is free with your own Meta app. Publit.Si is a one-time purchase with the full source code, no subscription. See pricing.
Next steps
- Connect Instagram with the Instagram guide.
- Connect the MCP server with the commands in AI agents.
- Read the full list of MCP tools to see what else Claude Code can do: comments, growth numbers, learnings and blog posts.
This blog is planned, written with Claude Code and measured in Publit.Si, like any other channel.