ig-write
Enables AI agents to publish Instagram content—posts, reels, stories, and carousels—as well as manage media by deleting, liking, and unliking through the official Instagram Graph API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ig-writePost this image to Instagram with caption 'hello': https://example.com/pic.jpg"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Instagram_agent_mcp
Official-API Instagram writer for humans and AI agents. No API key — it reuses
ig-agent's stored long-lived token.
Two entry points, one logic core:
File | What |
| Zero-dependency Python CLI (stdlib only). Post / reel / story / carousel / delete / like |
| MCP stdio server wrapping |
Prereqs
Python 3.10+
An Instagram Business/Creator account connected via
ig-agent:npm install -g ig-agent ig-agent auth login # or: ig-agent auth exchange --redirect-uri ... --code ... ig-agent auth status # check granted scopesFor MCP mode:
pip install -r requirements.txt
Related MCP server: Instagram Complete MCP Server
Scopes
Action | Scope |
post / reel / story / carousel |
|
like / unlike |
|
delete |
|
ig-write me + ig-write <cmd> surface a clear re-auth hint when a scope is missing.
Like/delete/unlike fail fast without an API call when ig-agent's recorded
grant lacks the scope. Notes has no official Meta API and is intentionally
not included.
Known limitations (Instagram Login path)
instagram_manage_engagement(like) andinstagram_manage_contents(delete) were observed not granted via Instagram Login OAuth (Apr/Dec 2026 APIs) — Meta's docs place Like under the Facebook-Login app path, and Delete may need one too and/or app review. The tool tells you this instead of a rawsubcode=33.Stories: no stickers/polls/links/music via API; expire after 24 h.
Reels: original audio only;
media_typereads back asVIDEO(media_product_typesaysREEL/STORY).Media must be a public https URL — Meta cURLs it. Local files need hosting first (e.g.
catbox.moe). Story images: JPEG, 9:16 (1080×1920) best.No scheduling, no caption edit after publish, no Notes/Likes-bulk endpoints.
CLI usage
./ig-write me
./ig-write post --image-url https://example.com/pic.jpg --caption "hello"
./ig-write reel --video-url https://example.com/clip.mp4 --caption "hi"
./ig-write story --image-url https://example.com/pic.jpg
./ig-write story --video-url https://example.com/clip.mp4
./ig-write carousel-item --image-url https://example.com/a.jpg # -> container id
./ig-write carousel --children CID1,CID2 --caption "swipe"
./ig-write publish --creation-id <container_id>
./ig-write status --container-id <container_id>
./ig-write delete --media-id <media_id>
./ig-write like --media-id <id>
./ig-write unlike --comment-id <id>Media must be on a public https URL. Flow per command:
create container → poll status_code=FINISHED → media_publish.
--container-only stops after step 1 (container expires in 24 h).
Limits: ~100 API publishes / rolling 24 h.
MCP (agentic mode)
pip install -r requirements.txtClient config (stdio):
{
"mcpServers": {
"ig-write": {
"command": "python3",
"args": ["/path/to/Instagram_agent_mcp/ig-mcp-server.py"]
}
}
}Tools: ig_me, ig_post, ig_reel, ig_story, ig_carousel_item, ig_carousel, ig_publish, ig_container_status, ig_delete, ig_like, ig_unlike.
The token is read from your local ig-agent config — no extra login.
Layout
Instagram_agent_mcp/
├── ig-write # CLI (stdlib only, executable)
├── ig-mcp-server.py # MCP server (needs: pip install mcp)
├── test_ig_write.py # stdlib unit tests (no network)
├── requirements.txt
├── README.md
└── LICENSETroubleshooting
Symptom | Fix |
|
|
| Re-auth with that scope; see Known limitations |
| Media URL not fetchable or wrong spec — check public URL + format |
| Large video still processing — rerun |
MCP |
|
Disclaimer
Uses Meta's official Instagram Graph API only. Media URLs must be public;
respect Meta's rate limits and ToS — this is for your own accounts, not for
serving end-user generation. Tested against graph.instagram.com v26.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Create, review, publish and schedule Instagram images, carousels and Reels with AI assistants.
Publish to Instagram from chat — official Graph API, OAuth 2.1, free for your own posts.
Instagram data for AI agents: profiles, posts, reels, followers. Influencer + brand research.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to interact with Instagram Business accounts through the Graph API, supporting profile management, media publishing, insights retrieval, and direct messaging capabilities.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Instagram Business accounts by automating content publishing, scheduling posts, and analyzing performance metrics. Supports posts, stories, reels, and carousels with detailed audience insights and hashtag discovery.-
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.5926 npm12MIT
- FlicenseBqualityDmaintenanceEnables AI agents to control Instagram accounts programmatically, supporting profile management, media interaction, direct messaging, and follower management.132-