Instagram MCP Server
v1.0.0Instagram via Meta's official Graph API: publishing, comments, DMs, insights and discovery.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
instagram_get_account Get Account
Get the authenticated Instagram professional account's profile, and the server's active capabilities. Returns username, account type, follower/following/media counts, bio and website, plus which Meta auth mode this server is running in and what that mode cannot do. Call this first in a new session: it tells you the account ID to pass to other tools and whether hashtag search and business discovery are available at all.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the account the access token belongs to, which is the normal case. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_publishing_limit Get Publishing Limit
Check how much of the 100-post / 24-hour API publishing quota the account has used. Meta counts a carousel as one post. Call this before a bulk publish run, and after a publish failure that might be quota exhaustion rather than a bad request.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the account the access token belongs to, which is the normal case. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_token_info Get Token Info
Inspect the configured access token: its type, scopes, and expiry. On the facebook_login path this calls debug_token and needs IG_APP_ID and IG_APP_SECRET. On the instagram_login path Meta exposes no debug endpoint, so this verifies the token by reading the account and reports what it can. Use it to diagnose a permission error before assuming a tool is broken.
| Parameter | Type | Description |
|---|---|---|
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_refresh_token Refresh Access Token
Extend the configured long-lived access token and return the new one. instagram_login: refreshes an Instagram long-lived token for another 60 days. The token must be at least 24 hours old and not yet expired. facebook_login: exchanges the token for a fresh long-lived one; needs IG_APP_ID and IG_APP_SECRET. This does NOT write the new token anywhere. Save the returned value into IG_ACCESS_TOKEN yourself, or the next restart uses the old one.
instagram_publish_image Publish Image
Publish a single image to the Instagram feed. The image must be a JPEG served from a public HTTPS URL that returns the file directly — no redirects, no authentication, no HTML wrapper. Meta fetches it server-side, so a local path or a signed URL that expires will fail. For two or more images in one post use instagram_publish_carousel. For video use instagram_publish_reel. Example: "post this photo with the caption 'new drop'" -> image_url="https://cdn.example.com/a.jpg", caption="new drop"
| Parameter | Type | Description |
|---|---|---|
image_url * | string | Public HTTPS URL of a JPEG image |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
alt_text | string | Accessibility alt text. Supported on image posts only, not reels or stories. |
caption | string | Caption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags. |
collaborators | array | Up to 3 public usernames invited as collaborators |
is_ai_generated | boolean | Mark the content as AI-generated. Set it when the image was AI-created. |
location_id | string | Facebook Page ID of a location to tag |
user_tags | array | People to tag. Images need x and y coordinates; videos and reels take username only. The tagged account must be public. |
instagram_publish_reel Publish Reel
Publish a video as a Reel. Reels are the only way to publish video to the feed — Instagram converted standalone feed video to Reels. The video must be at a public HTTPS URL; Meta downloads and transcodes it, which takes time, so this tool waits for processing before publishing. If processing outlasts wait_seconds the tool returns the container ID instead of failing; finish with instagram_get_container_status then instagram_publish_container. Specs: MOV or MP4, 3s-15min, aspect ratio 0.01:1 to 10:1, up to 1GB.
| Parameter | Type | Description |
|---|---|---|
video_url * | string | Public HTTPS URL of an MP4 or MOV video |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
audio_name | string | Name for the audio track attributed to this reel |
caption | string | Caption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags. |
collaborators | array | Up to 3 public usernames invited as collaborators |
cover_url | string | Public HTTPS URL of a custom cover image. Overrides thumb_offset. |
is_ai_generated | boolean | Mark the content as AI-generated |
location_id | string | Facebook Page ID of a location to tag |
share_to_feed | boolean | Whether the reel also appears in the main feed grid. Defaults to Instagram's setting. |
thumb_offset | integer | Milliseconds into the video to use as the thumbnail |
user_tags | array | People to tag. Images need x and y coordinates; videos and reels take username only. The tagged account must be public. |
wait_seconds | integer | Seconds to wait for video processing before giving up and returning the container ID. 0 publishes immediately (images only). Default 60. |
instagram_publish_story Publish Story
Publish an image or video story. Stories expire after 24 hours. Supply exactly one of image_url or video_url. Stickers, polls, links and music cannot be added through the API — Meta exposes none of those on the publishing endpoint.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
image_url | string | Public HTTPS URL of a JPEG for an image story |
video_url | string | Public HTTPS URL of an MP4/MOV for a video story |
wait_seconds | integer | Seconds to wait for video processing before giving up and returning the container ID. 0 publishes immediately (images only). Default 60. |
instagram_publish_carousel Publish Carousel
Publish a carousel of 2-20 images and/or videos as one post. This creates a child container per item, waits for any video children to process, then creates and publishes the carousel container. The whole carousel counts as a single post against the publishing quota. Example: "post these three photos as one post" -> items=[{image_url:"..."},{image_url:"..."},{image_url:"..."}]
| Parameter | Type | Description |
|---|---|---|
items * | array | Ordered carousel items, 2-20 of them |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
caption | string | Caption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags. |
collaborators | array | Up to 3 collaborator usernames |
is_ai_generated | boolean | Mark the carousel as AI-generated |
location_id | string | Facebook Page ID of a location to tag |
wait_seconds | integer | Seconds to wait for video processing before giving up and returning the container ID. 0 publishes immediately (images only). Default 60. |
instagram_create_container Create Media Container
Low-level escape hatch: create a media container with arbitrary parameters, without publishing it. Prefer instagram_publish_image / _reel / _story / _carousel, which run the whole flow. Use this when you need a parameter those tools do not expose, or when assembling a carousel from children that were created earlier. Returns the container ID. Publish it with instagram_publish_container.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
caption | string | Caption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags. |
children | array | Child container IDs, for media_type=CAROUSEL |
extra_params | object | Any other documented container parameter, passed through verbatim (e.g. cover_url, thumb_offset, share_to_feed, alt_text, product_tags, upload_type). |
image_url | string | |
is_carousel_item | boolean | True when this container is a carousel child |
media_type | string | Omit for a single image; Instagram infers IMAGE |
video_url | string |
instagram_get_container_status Get Container Status
Check whether a media container is ready to publish. status_code is one of: EXPIRED — not published within 24 hours of creation ERROR — processing failed FINISHED — ready to publish IN_PROGRESS — still processing PUBLISHED — already published Meta advises polling about once a minute for no more than five minutes.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | Container ID returned when the container was created |
instagram_publish_container Publish Container
Publish a media container that is already FINISHED. Use this to complete a publish that was interrupted, or after assembling a carousel with instagram_create_container. Publishing a container that is still IN_PROGRESS fails; check instagram_get_container_status first.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | Container ID to publish |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
instagram_list_media List Media
List the account's published media, newest first. Returns one page with a cursor. Covers feed posts, reels and carousels; stories are separate (instagram_list_stories) because they expire. Use this to find media IDs for instagram_get_media_insights, instagram_list_comments, or instagram_get_media. Example: "what did we post recently" -> limit=10
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
after | string | Pagination cursor from a previous call's next_cursor. Omit for the first page. |
fields | array | Specific fields to request. Omit for a sensible default set: id, caption, media_type, media_product_type, media_url, permalink, thumbnail_url, timestamp, … |
limit | integer | Maximum items to return in this page. Default 25, max 100. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_media Get Media
Get one media object by ID, with caption, type, engagement counts and permalink. Use instagram_list_media to find IDs. For a carousel, instagram_get_media_children lists the individual photos and videos inside it.
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Instagram media ID |
fields | array | Specific fields to request. Omit for a sensible default set: id, caption, media_type, media_product_type, media_url, permalink, thumbnail_url, timestamp, … |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_media_children Get Carousel Children
List the individual images and videos inside a carousel post. Only meaningful for media whose media_type is CAROUSEL_ALBUM. Note that Meta serves no per-child insights — insights exist only for the carousel as a whole.
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Carousel media ID |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_list_stories List Active Stories
List the account's currently live stories. Stories expire 24 hours after posting, so this returns only what is live right now. Story insights come from instagram_get_media_insights with media_product_type="STORY".
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_list_tagged_media List Tagged Media
List media published by other accounts in which this account was tagged. Different from mentions: this is the photo-tag edge, not @mentions in captions or comments. Use instagram_list_mentions for those.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
after | string | Pagination cursor from a previous call's next_cursor. Omit for the first page. |
limit | integer | Maximum items to return in this page. Default 25, max 100. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_list_comments List Comments
List top-level comments on one of the account's media objects. Replies are nested one level deeper — use instagram_list_comment_replies for a specific thread. Hidden comments are included with hidden=true. Example: "what are people saying on our latest post" -> first instagram_list_media, then this with that media_id
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Media ID whose comments to read |
after | string | Pagination cursor from a previous call's next_cursor. |
limit | integer | Maximum comments per page. Max 100. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_comment Get Comment
Get one comment by ID, including its text, author, like count and hidden state.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_list_comment_replies List Comment Replies
List the replies to one top-level comment. Instagram supports exactly one level of nesting, so replies have no replies of their own.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Top-level comment ID |
after | string | Pagination cursor from a previous call's next_cursor. |
limit | integer | Maximum comments per page. Max 100. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_create_comment Comment on Media
Post a new top-level comment on one of the account's own media objects. To answer someone else's comment use instagram_reply_to_comment instead — a reply threads under theirs and notifies them.
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Media ID to comment on |
message * | string | Comment text. Instagram rejects repeated identical text as spam. |
instagram_reply_to_comment Reply to Comment
Reply to a comment, threaded underneath it. Only top-level comments accept replies — Instagram allows a single level of nesting. Replying to a reply fails; reply to its parent_id instead.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Top-level comment ID to reply to |
message * | string | Comment text. Instagram rejects repeated identical text as spam. |
instagram_hide_comment Hide or Unhide Comment
Hide a comment from public view, or unhide one. Hiding is reversible and leaves the comment visible to its author — prefer it to deletion for borderline content. Use instagram_delete_comment only for comments on the account's own media that should be gone for good.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID |
hide | boolean | true hides the comment, false unhides it |
instagram_delete_comment Delete Comment
Permanently delete a comment. Works on comments the account authored, and on comments by others on the account's own media. This cannot be undone — instagram_hide_comment is the reversible alternative.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID to delete permanently |
instagram_toggle_media_comments Enable or Disable Comments
Turn commenting on or off for one of the account's media objects. Disabling hides the whole comment thread and blocks new comments. Existing comments return when it is re-enabled.
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean | true allows comments, false disables them |
media_id * | string | Media ID |
instagram_list_conversations List Conversations
List Instagram Direct conversations in the account's inbox, most recently updated first. Each entry carries the participant IGSIDs needed to send a message. Requires the messaging permission with Advanced Access. Example: "any new DMs?" -> limit=10, then instagram_get_conversation on the ones with unread_count > 0
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
after | string | Pagination cursor from a previous call |
limit | integer | Maximum conversations per page |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_conversation Get Conversation
Read the messages in one conversation, newest first. Note the 24-hour rule before replying: a standard reply is only allowed within 24 hours of the user's most recent message. Check the newest created_time to see whether the window is still open.
| Parameter | Type | Description |
|---|---|---|
conversation_id * | string | Conversation ID from instagram_list_conversations |
limit | integer | Maximum messages to return |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_send_message Send Direct Message
Send a text message to an Instagram user. Meta allows this only within 24 hours of that user's last message to the account. Outside the window, set tag="HUMAN_AGENT" to use the 7-day human-agent allowance; unsolicited messages are not possible at all. Requires the messaging permission with Advanced Access. Get the recipient IGSID from instagram_list_conversations — a public username will not work.
| Parameter | Type | Description |
|---|---|---|
recipient_id * | string | Instagram-scoped user ID (IGSID) of the recipient. Get it from instagram_list_conversations participants or from a messaging webhook — a public @username will not work. |
text * | string | Message text, up to 1000 characters |
account_id | string | Sending account ID; omit for the token's own |
tag | string | Set HUMAN_AGENT to reply up to 7 days out, when a human is handling the thread |
instagram_send_media_message Send Media Message
Send an image, video, or audio attachment as a direct message. The URL must be public HTTPS; Meta fetches it server-side. The same 24-hour window applies as for text messages.
| Parameter | Type | Description |
|---|---|---|
media_url * | string | Public HTTPS URL of the file to send |
recipient_id * | string | Instagram-scoped user ID (IGSID) of the recipient. Get it from instagram_list_conversations participants or from a messaging webhook — a public @username will not work. |
account_id | string | Sending account ID; omit for the token's own |
media_type | string | Attachment type Meta should treat the URL as |
instagram_mark_seen Mark Conversation Seen
Mark the conversation with a user as read, which clears its unread badge. Use it after processing an inbox so the same messages are not reprocessed as new.
| Parameter | Type | Description |
|---|---|---|
recipient_id * | string | Instagram-scoped user ID (IGSID) of the recipient. Get it from instagram_list_conversations participants or from a messaging webhook — a public @username will not work. |
account_id | string | Account ID; omit for the token's own |
instagram_list_metric_catalog List Metric Catalog
List every insight metric this server can request, which surface it applies to, and which breakdowns each one accepts. Makes no API call. Read this before calling instagram_get_account_insights or instagram_get_media_insights with custom metrics — an unsupported metric or an invalid metric/breakdown pair is a hard API error, not an empty result.
| Parameter | Type | Description |
|---|---|---|
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_account_insights Get Account Insights
Get account-level insights: reach, views, interactions, likes, comments, shares, saves, follows and profile link taps. Defaults to the full interaction metric set for the last 7 days as totals. Narrow with metrics, or split a metric with breakdown (one metric at a time when using a breakdown). For audience age/city/country/gender use instagram_get_audience_demographics instead. Examples: - "how did we do last week" -> defaults - "reach split by followers vs non-followers" -> metrics=["reach"], breakdown="follow_type"
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
breakdown | string | Split the result along a dimension. Only valid with metric_type=total_value and only for metrics that support it — check instagram_list_metric_catalog. |
metric_type | string | 'total_value' returns one total per metric and supports breakdowns; 'time_series' returns a daily series and ignores breakdowns. |
metrics | array | Metric names. Omit for the default set: reach, views, total_interactions, likes, comments, shares, saves, replies, follows_and_unfollows, profile_links_taps, accounts_engaged. See instagram_list_metri… |
response_format | string | 'markdown' for readable text, 'json' for structured data |
since | string | Start date, YYYY-MM-DD. Defaults to 7 days ago. Meta allows at most 30 days per call. |
until | string | End date, YYYY-MM-DD. Defaults to today. |
instagram_get_media_insights Get Media Insights
Get per-post insights for one media object. The valid metric set depends on the media type, so pass media_product_type and the right defaults are used: FEED for posts and carousels, REELS for reels, STORY for stories. Carousel albums report only whole-post figures — Meta serves no per-child insights. Example: "how did the latest reel do" -> media_id from instagram_list_media, media_product_type="REELS"
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Media ID to read insights for |
media_product_type | string | Which metric set to request. Check the media's media_product_type with instagram_get_media. |
metrics | array | Override the default metric set for this media type. See instagram_list_metric_catalog. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_audience_demographics Get Audience Demographics
Get the follower or engaged-audience breakdown by age, city, country or gender. These are lifetime metrics and a breakdown is mandatory. Meta withholds demographics for accounts under roughly 100 followers, which comes back as an empty result rather than an error. Example: "where are our followers" -> metric="follower_demographics", breakdown="country"
| Parameter | Type | Description |
|---|---|---|
breakdown * | string | Dimension to break the audience down by |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
metric | string | 'follower_demographics' profiles everyone who follows the account; 'engaged_audience_demographics' profiles only accounts that engaged. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
timeframe | string | Window Meta computes the demographic over. Only this_week and this_month are supported for engaged_audience_demographics since v20.0. |
instagram_get_story_insights Get Insights for All Live Stories
Read insights for every story currently live on the account, in one call. Stories vanish after 24 hours and their insights go with them, so this is the tool for catching a day's story performance before it is lost. Equivalent to instagram_list_stories followed by instagram_get_media_insights on each result.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_mentioned_comment Get Mentioned Comment
Read a comment in which the account was @mentioned, by comment ID. Meta provides no endpoint that lists mentions — they are delivered to your app through the "mentions" webhook field, and this tool reads one once you have its ID. If you have no webhook configured, you cannot discover mentions through the API at all. Reply with instagram_reply_to_mention.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID from a mentions webhook payload |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_get_mentioned_media Get Mentioned Media
Read a media object whose caption @mentions the account, by media ID. As with mentioned comments, Meta delivers these through the "mentions" webhook rather than a list endpoint. Photo tags are a different edge — use instagram_list_tagged_media for those, which does support listing.
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Media ID from a mentions webhook payload |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
response_format | string | 'markdown' for readable text, 'json' for structured data |
instagram_reply_to_mention Reply to Mention
Reply to a mention of the account on someone else's media. Pass comment_id to reply to the specific comment that mentioned you; omit it to leave a new top-level comment on the media instead. The media's owner must allow comments.
| Parameter | Type | Description |
|---|---|---|
media_id * | string | Media ID the mention appears on |
message * | string | Reply text |
account_id | string | Instagram professional account ID. Omit to use the token's own account. |
comment_id | string | Comment ID to thread the reply under. Omit to comment on the media itself. |