Instagram MCP Server
Provides 23 tools for the Instagram Graph API, enabling management of Instagram Business/Creator profiles, media posts, carousels, reels, stories, comments, direct messages, hashtags, mentions, business discovery, and account/post analytics.
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., "@Instagram MCP Server post a photo with caption 'Hello from Instagram MCP!' and hashtags #mcp #instagram"
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.
@mcpware/instagram-mcp
Instagram MCP server — 23 tools for the Instagram Graph API via Model Context Protocol.
Manage posts, comments, DMs, stories, hashtags, reels, carousels, and analytics from Claude Code, Cursor, or any MCP client.
Quick Start
npx @mcpware/instagram-mcpClaude Code / Cursor .mcp.json
{
"mcpServers": {
"instagram": {
"command": "npx",
"args": ["-y", "@mcpware/instagram-mcp"],
"env": {
"INSTAGRAM_ACCESS_TOKEN": "your-meta-long-lived-token",
"INSTAGRAM_ACCOUNT_ID": "your-ig-business-account-id"
}
}
}
}Related MCP server: instagram-mcp
Prerequisites
Instagram Business or Creator account (personal accounts are not supported by the Graph API)
Facebook Page connected to your Instagram account
Meta long-lived access token (see setup guide below)
Instagram Business Account ID (obtained during setup)
Setup Guide — Getting Your Access Token
Meta's token setup is a multi-step process. Follow these steps carefully.
Step 1: Connect Instagram to a Facebook Page
Your IG Business/Creator account must be linked to a Facebook Page. Without this, the Graph API won't work.
Open Instagram app → Settings → Account → Sharing to other apps → Facebook
Select the Facebook Page to connect
If you don't have a Page, create one at facebook.com/pages/creation
Step 2: Create a Meta Developer App
Go to developers.facebook.com → Log in
Click "Create App"
App name: anything (e.g. "My IG Tool") — cannot contain "IG", "Instagram", "Facebook", etc.
Use case: "Manage Instagram content and messaging" (under Content Management)
Skip business portfolio for now
Complete creation
Step 3: Add Permissions
Go to your app → Use Cases → Customize → API setup with Facebook login
Click "Add required content permissions" (adds
instagram_basic,instagram_content_publish,pages_read_engagement,business_management,pages_show_list)Click "Add required messaging permissions" (adds
instagram_manage_messages)
Step 4: Generate Access Token
Go to Graph API Explorer
Select your app from the "Meta App" dropdown
Click "Get Token" → "Get User Access Token"
Add permissions:
instagram_basic,pages_show_list,pages_read_engagement,instagram_content_publish,instagram_manage_insights,instagram_manage_commentsClick "Generate Access Token" → Authorize in the popup
Copy the token
Note: The Graph API Explorer may show "No configuration available" if permissions aren't set up yet. Make sure Step 3 is done first.
Step 5: Get Your Instagram Business Account ID
In the Graph API Explorer, run:
GET /me/accounts?fields=id,name,instagram_business_accountFind your Page in the response. The instagram_business_account.id is your INSTAGRAM_ACCOUNT_ID.
Step 6: Exchange for Long-Lived Token (60 days)
The token from Step 4 expires in 1 hour. Exchange it:
curl "https://graph.facebook.com/v19.0/oauth/access_token?\
grant_type=fb_exchange_token&\
client_id=YOUR_APP_ID&\
client_secret=YOUR_APP_SECRET&\
fb_exchange_token=YOUR_SHORT_LIVED_TOKEN"Find your App ID and App Secret in: App Dashboard → Settings → Basic.
The returned access_token is valid for 60 days.
Step 7: Configure and Run
export INSTAGRAM_ACCESS_TOKEN="your-long-lived-token"
export INSTAGRAM_ACCOUNT_ID="your-ig-business-account-id"
npx @mcpware/instagram-mcpTroubleshooting
Problem | Cause | Fix |
| IG not connected to a Facebook Page, or you're not Page admin | Do Step 1 |
Graph API Explorer says "No configuration available" | Permissions not added to app | Do Step 3 |
"Generate Access Token" is disabled | Need to select "Get User Access Token" first | Click "Get Token" dropdown |
App name rejected (contains "IG", "Insta", etc.) | Meta blocks trademarked words | Use a generic name |
Token expired | Short-lived tokens last 1 hour | Do Step 6 for 60-day token |
| IG account is Personal, not Business | Switch to Business/Creator in IG settings |
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Meta long-lived access token |
| Yes | — | Instagram business account ID |
| No |
| Graph API version |
Tools (23)
Profile & Account
Tool | Description |
| Get profile info (bio, followers, media count) |
| List connected Facebook pages |
| Account-level analytics (reach, profile views) |
| Check if token is valid |
Media & Publishing
Tool | Description |
| Get recent posts with engagement metrics |
| Detailed analytics for a specific post |
| Publish image or video |
| Publish carousel (2-10 images/videos) |
| Publish a Reel |
| Check daily publishing quota |
Comments
Tool | Description |
| Get comments on a post |
| Post a comment |
| Reply to a comment |
| Delete a comment |
| Hide/unhide a comment |
Direct Messages
Tool | Description |
| List DM conversations |
| Read messages in a conversation |
| Send a direct message |
Discovery & Content
Tool | Description |
| Search for a hashtag ID |
| Get top/recent media for a hashtag |
| Get current active stories |
| Get posts you're tagged in |
| Look up another business account |
Limitations
These are Instagram Graph API limitations, not this tool's:
Business/Creator accounts only — personal accounts are not supported
Long-lived tokens expire after 60 days — refresh before expiry
200 API calls per hour rate limit
25 posts per day publishing limit
DMs require Advanced Access — Meta app review required
Hashtag search: 30 unique hashtags per 7 days
Credits
TypeScript rewrite of jlbadano/ig-mcp (Python).
License
MIT
Available Tools
23 toolsbusiness_discoveryB
Look up another public Business or Creator account's profile. Returns bio, follower count, media count, etc.
Inputs: target_username (required).
delete_commentA
Delete a comment on your Instagram post. Can only delete comments on your own media.
Inputs: comment_id (required).
get_account_insightsC
Get account-level insights and analytics for Instagram business account
Inputs: period, metrics, account_id.
get_account_pagesB
Get Facebook pages connected to the account and their Instagram business accounts
Inputs: no named parameters.
get_commentsB
Get comments on an Instagram post. Returns comment text, username, timestamp, and like count.
Inputs: media_id (required), limit.
get_content_publishing_limitA
Check how many posts you can still publish today. Instagram limits content publishing per 24-hour period.
Inputs: no named parameters.
get_conversation_messagesA
Get messages from a specific Instagram DM conversation. Requires instagram_manage_messages permission.
Inputs: conversation_id (required), limit.
get_conversationsA
Get Instagram DM conversations. Requires instagram_manage_messages permission.
Inputs: limit, page_id.
get_hashtag_mediaA
Get top or recent media for a hashtag. Use search_hashtag first to get the hashtag ID.
Inputs: hashtag_id (required), limit, media_type.
get_media_insightsC
Get detailed insights and analytics for a specific Instagram post
Inputs: media_id (required), metrics.
get_media_postsC
Get recent media posts from Instagram account with engagement metrics
Inputs: after, limit, account_id.
get_mentionsB
Get posts where your account has been tagged or @mentioned. Useful for tracking UGC.
Inputs: limit.
get_profile_infoC
Get Instagram business profile information including followers, bio, and account details
Inputs: account_id.
get_storiesC
Get current active stories on your Instagram account. Stories expire after 24 hours.
Inputs: account_id.
hide_commentA
Hide or unhide a comment on your Instagram post. Hidden comments are not visible to the public.
Inputs: comment_id (required), hide.
post_commentA
Post a top-level comment on an Instagram post. Requires instagram_manage_comments permission.
Inputs: message (required), media_id (required).
publish_carouselB
Publish a carousel (album) post with 2-10 images or videos. All media must be publicly accessible URLs.
Inputs: image_urls (required), caption.
publish_mediaB
Upload and publish an image or video to Instagram with caption and optional location
Inputs: caption, image_url, video_url, location_id.
publish_reelC
Publish a Reel (short-form video) to Instagram. Video must be publicly accessible URL, MP4 format.
Inputs: video_url (required), caption, share_to_feed.
reply_to_commentA
Reply to a specific comment on an Instagram post. Requires instagram_manage_comments permission.
Inputs: message (required), comment_id (required).
search_hashtagA
Search for an Instagram hashtag and get its ID. Use the returned ID with get_hashtag_media.
Inputs: hashtag_name (required).
send_dmA
Send Instagram direct message. Requires instagram_manage_messages with Advanced Access. Can only reply within 24 hours.
Inputs: message (required), recipient_id (required).
validate_access_tokenB
Validate the Instagram API access token and check permissions
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools map to a distinct resource+action: publishing splits cleanly by post type (media/carousel/reel), comments have separate post/reply/delete/hide operations, and DMs split into list/messages/send. A few boundaries are soft — get_media_posts vs get_media_insights vs get_account_insights, and search_hashtag vs get_hashtag_media — but the descriptions explicitly state the chaining and scope differences.
22 of 23 tools follow a predictable verb_noun snake_case pattern (get_*, publish_*, post_*, delete_*, hide_*, search_*, send_*, validate_*). The lone outlier is business_discovery, which lacks a verb prefix and breaks the convention used everywhere else.
23 tools is on the high side, but the server spans genuinely distinct domains — profile, media, publishing, comments, DMs, hashtags, stories, mentions, insights, and token validation — and each tool maps to a real API operation rather than a redundant variant. It is slightly over the ideal scope but not padded.
The surface covers the Instagram Graph API lifecycle well: publishing, reading media and insights, full comment moderation, DM reply flow, stories, mentions, hashtag lookup, and business discovery. Minor gaps remain — no story-level insights, no carousel child-media retrieval, and no way to initiate (only reply to) DMs, though the tool description flags the 24-hour constraint.
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Schedule Instagram reels, posts and stories, run comment-to-DM automations, and read analytics.
Publish to Instagram from chat — official Graph API, OAuth 2.1, free for your own posts.
Instagram MCP for DM and comment automation, AI Agent and content publishing via Meta's official API
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading, publishing, commenting, direct messaging, and pulling insights from Instagram Business or Creator accounts via the Graph API.36 PyPI11MIT
- FlicenseAqualityCmaintenanceEnables posting and managing Instagram content (photos, reels, stories, carousels) and interacting with media and comments via Instagram Graph API.10-
- FlicenseAqualityCmaintenanceEnables publishing photos, reels, and stories to Instagram, reading and moderating comments, fetching performance insights, drafting captions via MCP sampling, and scheduling reels for later.13-
- FlicenseNot gradedqualityBmaintenanceEnables AI applications to interact with Instagram Business accounts through Instagram's Graph API, including profile and media insights, content publishing, and, with advanced access, direct message management.-