instagram-mcp
Provides tools for managing Instagram Business/Creator accounts, including profile and media retrieval, publishing posts, managing comments, direct messaging, and accessing account insights.
Click on "Install 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., "@instagram-mcppost a photo from my last event to my Instagram feed"
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-mcp

A Model Context Protocol server that wraps the Instagram Graph API so Claude (or any MCP client) can read, publish, comment, DM, and pull insights from an Instagram Business or Creator account.
24 tools across five capability areas — profile/media, publishing, comments, DMs, and insights — built on FastMCP + httpx.
Quick install
pip install instagram-mcpOr with uv:
uv tool install instagram-mcpRelated MCP server: meta-mcp
Setup
1. Create a Meta App
Go to https://developers.facebook.com/apps → Create app → use case Other → type Business.
In the app dashboard, add the Instagram product (Add Product → Instagram → Set up).
2. Link an Instagram Business/Creator account
You need an Instagram account switched to Business or Creator, linked to a Facebook Page. In the app dashboard, walk through Instagram → API setup with Facebook login → Step 1: Generate access tokens and link your account.
3. Get the required permissions
Generate a token with these scopes (in Graph API Explorer or the Instagram API setup page):
instagram_basicinstagram_content_publishinstagram_manage_commentsinstagram_manage_messagesinstagram_manage_insightspages_show_listpages_read_engagementbusiness_management
While your app is in Development mode, only accounts in your app's Roles list (admins/developers/testers) can authenticate. That's fine for personal use. For other users, you need App Review with Advanced Access.
4. Mint a long-lived Page token
The fastest way: run the bundled helper.
instagram-mcp-get-tokenIt 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 .env for you.
Manual alternative:
# 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 the Page's access_token (never expires) and the
instagram_business_account.id of the linked IG account.
5. Configure .env
IG_USER_ID=17841446575432302
IG_ACCESS_TOKEN=EAAxxxxxxxxxxxxxxxxxxx
IG_GRAPH_VERSION=v21.0
IG_GRAPH_HOST=graph.facebook.comSet IG_GRAPH_HOST=graph.instagram.com if your token came from the Instagram
Login path instead of Facebook Login.
Connect to Claude Desktop
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 the instagram server.
Available tools
Profile & media
Tool | What it does |
| Profile info: bio, followers, media count, etc. |
| One page of recent posts |
| Auto-paginate through all media |
| Fetch a single media item |
| Posts the account is tagged in |
| Currently-live stories (24h window) |
Hashtags
Tool | What it does |
| Resolve a |
| Top-ranked posts for a hashtag |
| Recent posts for a hashtag (24h window) |
Publishing
Tool | What it does |
| Single image post from a public URL |
| Reel (waits for container processing) |
| Image or video story |
| 2-10 item carousel |
| Show 24h publish quota usage |
Comments
Tool | What it does |
| Top-level comments + nested replies |
| Replies under a specific comment |
| Post a reply |
| Hide / unhide |
| Delete a comment you own |
Direct messages
Tool | What it does |
| DM conversations |
| Messages in a conversation |
| Send a DM (optionally with a |
Insights
Tool | What it does |
| Account-level metrics with optional |
| Per-media insights |
Notes & gotchas
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 window on 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 need
metric_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 for
error: truealong withstatus,message,code,subcode, andfbtrace_idin the response — that's the Graph API error, not a Python traceback.
Development
git clone https://github.com/AleemHaider/instagram-mcp
cd instagram-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytestLicense
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI applications to interact with Instagram Business accounts through the Graph API, supporting profile management, media publishing, insights retrieval, and direct messaging capabilities.Last updatedMIT
- AlicenseAqualityAmaintenanceEnables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.Last updated594810MIT
- AlicenseAqualityDmaintenanceEnables Instagram and Facebook analytics via the Meta Graph API, offering account insights, media analytics, and post engagement data.Last updated196MIT
- Flicense-qualityCmaintenanceEnables managing multiple Instagram business accounts via a single token using Facebook Graph API and Partners model.Last updated
Related MCP Connectors
Boost posts and launch community growth campaigns from your AI assistant. OAuth, credit-billed.
Access the Notra API for managing posts, brand identities, integrations, and schedules.
Schedule, publish, and analyze social posts on TikTok, Instagram, YouTube, X, Threads, LinkedIn.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AleemHaider/instagram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server