instagram-mcp
About
Instagram Graph API server for Business/Creator accounts — 24 tools for posting, comments, DMs, and insights.
Details
- Author
- aleemhaider
- Categories
- Marketing, Other, Communication
Jump to
Setup
Install instagram-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/aleemhaider/instagram-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
24 tools across five capability areas — profile/media, publishing, comments, DMs, and insights — built on FastMCP + httpx.
- Go tohttps://developers.facebook.com/apps→Create app→ use caseOther→ typeBusiness.
- In the app dashboard, add theInstagramproduct (Add Product → Instagram → Set up).
2. Link an Instagram Business/Creator account
You need an Instagram account switched toBusinessorCreator, linked to a FacebookPage. In the app dashboard, walk throughInstagram → API setup with Facebook login → Step 1: Generate access tokensand link your account.
Generate a token with these scopes (in Graph API Explorer or the Instagram API setup page):
- instagram_basic
- instagram_content_publish
- instagram_manage_comments
- instagram_manage_messages
- instagram_manage_insights
- pages_show_list
- pages_read_engagement
- business_management
While your app is inDevelopment mode, only accounts in your app's Roles list (admins/developers/testers) can authenticate. That's fine for personal use. For other users, you needApp Reviewwith Advanced Access.
The fastest way: run the bundled helper.
It will ask for your short-lived user token + app ID/secret, exchange it for a long-lived user token, list your linked IG accounts, and write.envfor you.
# Exchange short-lived user token → long-lived (~60 days) curl -G "https://graph.facebook.com/v21.0/oauth/access_token" \ --data-urlencode "grant_type=fb_exchange_token" \ --data-urlencode "client_id=YOUR_APP_ID" \ --data-urlencode "client_secret=YOUR_APP_SECRET" \ --data-urlencode "fb_exchange_token=SHORT_LIVED_TOKEN" # Find your Pages and their IG accounts curl -G "https://graph.facebook.com/v21.0/me/accounts" \ --data-urlencode "fields=name,instagram_business_account,access_token" \ --data-urlencode "access_token=LONG_LIVED_USER_TOKEN"
Use thePage'saccess_token(never expires) and theinstagram_business_account.idof the linked IG account.
IG_USER_ID=17841446575432302 IG_ACCESS_TOKEN=EAAxxxxxxxxxxxxxxxxxxx IG_GRAPH_VERSION=v21.0 IG_GRAPH_HOST=graph.facebook.com
SetIG_GRAPH_HOST=graph.instagram.comif your token came from theInstagram Loginpath instead of Facebook Login.
Edit~/.config/Claude/claude_desktop_config.json(Linux) or~/Library/Application Support/Claude/claude_desktop_config.json(macOS):
{ "mcpServers": { "instagram": { "command": "instagram-mcp", "env": { "IG_USER_ID": "17841446575432302", "IG_ACCESS_TOKEN": "EAAxxxxxxxxxxxxxxxxxxx" } } } }
Restart Claude Desktop. You should see 24 tools under theinstagramserver.
- Publishing requires public HTTPS URLs.Meta fetches media server-side. Host your images/videos on a publicly accessible URL first.
- Publish quota is 100 posts per 24h rolling windowon most Business accounts.
- send_dmis response-only by default— it only works inside the 24h user-initiated window. Pass amessage_tag(e.g.HUMAN_AGENT) to send outside that window. Tags require Meta approval.
- Some insight metrics needmetric_type='total_value'(Meta tightened this in 2024):views,accounts_engaged,total_interactions,profile_views,likes,comments,shares,saves.reachandfollower_countdon't.
- Errors return a structured dict, not exceptions. Look forerror: truealong withstatus,message,code,subcode, andfbtrace_idin the response — that's the Graph API error, not a Python traceback.
git clone https://github.com/AleemHaider/instagram-mcp cd instagram-mcp python -m venv .venv && source .venv/bin/activate pip install -e ".[dev]" pytest
Free MCP that drives an audit of your marketing. Your AI connects, adsOS digs through your ads, email and site, and hands back a growth plan you can run today.
Publish, schedule, moderate your social inbox, and pull analytics across every major network directly from any AI assistant, via Eclincher.
Live TikTok creator intelligence MCP — 7 tools (analyze creators, score hooks, remix scripts, predict virality) that chain automatically via a recommended_chain that pre-fills the next 3 tool calls.
Connect Claude or ChatGPT to your LinkedIn account to see who engaged on your posts, track performance and profile viewers, spot warm outreach signals, and publish content — built for B2B marketers and creators.
A hosted MCP server for planning, scheduling, media, analytics, and social publishing.
Turn short-video comments into ranked customer leads, keyword ideas, and outreach scripts.
Generates professional LinkedIn post drafts from YouTube videos by summarizing their content.
Threads tools for AI agents — generate viral posts, download videos, and export profile data from Meta Threads.
Accurately count Twitter/X post characters and optimize posts.
An automation toolkit for Xiaohongshu, enabling content creation, publishing, and creator data analysis.
Manage Meta, Google & TikTok ads — launch campaigns, track performance, spy on competitors, generate AI creatives.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




