How to post to Instagram from Claude Code in 60 seconds
You ask Claude Code to write the launch post and it's done in seconds. Then you have to copy it, open Instagram, upload the image and paste the text. That last stretch can be automated: if Claude Code has a tool to publish, the post goes out from the same conversation.
In this article we connect Claude Code to Instagram with an MCP server, publish a test post and see how it would look in the feed. No Meta app, and no sign-up to try it.
What an MCP server is (in one line)
MCP (Model Context Protocol) is the standard way to give an agent tools. You add an MCP server and the agent gains new tools, like wyro_publicar, that it can use when you ask.
1. Create a test key
curl -X POST https://wyroapi.com/v1/sandbox
The response includes an api_key (it starts with wyro_sk_). No sign-up or credit card, and it lasts 72 hours. With this key everything is simulated: nothing gets published to your account.
2. Add the MCP server to Claude Code
claude mcp add --transport http wyro https://wyroapi.com/mcp \
--header "Authorization: Bearer wyro_sk_..."
Restart Claude Code. With /mcp you should see wyro connected with 5 tools.
3. Ask it to publish
Post "Hello from my agent" to Instagram with this image: https://picsum.photos/seed/wyro/1080/1080 and show me the preview.
Claude Code calls wyro_publicar and returns something like this:
Published (simulated) · post_7O7Tob…
Preview: https://wyroapi.com/p/k3x9a1Qz7B
Open the link: it's a preview of the post in an Instagram feed, with your text and your image.
4. Publish for real
When you want it to go out on your account, ask it: "Connect my real Instagram". It gives you a link where you sign in with Google or your email and authorize Instagram. From then on, the same key publishes for real: no need to change your Claude Code configuration.
Two details:
- Instagram requires a professional account (Business or Creator).
- Before publishing to a real account, the agent asks you for confirmation.
What if my agent isn't Claude Code?
The same server works with Codex and Cursor. If you'd rather write code, it's a single call:
curl -X POST https://wyroapi.com/v1/posts \
-H "Authorization: Bearer wyro_sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"Hello from my code","platforms":["instagram"],"media":[{"url":"https://picsum.photos/seed/wyro/1080/1080"}]}'
Ideas for what's next
- A
CLAUDE.mdwith your brand's tone, so the agent writes like you. How to set it up: https://wyroapi.com/en/docs/mcp. - Schedule posts with
programar_para("publish it Monday at 10 a.m."). - Publish the same content to LinkedIn and X in the same call.
Full guide for agents: https://wyroapi.com/AGENTS.md