Instagram MCP Server

v1.0.0
io.github.qaassimq/instagram-mcp-server Checked 4 days ago Published 25 days ago

Instagram 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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the account the access token belongs to, which is the normal case.
response_formatstring'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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the account the access token belongs to, which is the normal case.
response_formatstring'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.

ParameterTypeDescription
response_formatstring'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"

ParameterTypeDescription
image_url *stringPublic HTTPS URL of a JPEG image
account_idstringInstagram professional account ID. Omit to use the token's own account.
alt_textstringAccessibility alt text. Supported on image posts only, not reels or stories.
captionstringCaption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags.
collaboratorsarrayUp to 3 public usernames invited as collaborators
is_ai_generatedbooleanMark the content as AI-generated. Set it when the image was AI-created.
location_idstringFacebook Page ID of a location to tag
user_tagsarrayPeople 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.

ParameterTypeDescription
video_url *stringPublic HTTPS URL of an MP4 or MOV video
account_idstringInstagram professional account ID. Omit to use the token's own account.
audio_namestringName for the audio track attributed to this reel
captionstringCaption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags.
collaboratorsarrayUp to 3 public usernames invited as collaborators
cover_urlstringPublic HTTPS URL of a custom cover image. Overrides thumb_offset.
is_ai_generatedbooleanMark the content as AI-generated
location_idstringFacebook Page ID of a location to tag
share_to_feedbooleanWhether the reel also appears in the main feed grid. Defaults to Instagram's setting.
thumb_offsetintegerMilliseconds into the video to use as the thumbnail
user_tagsarrayPeople to tag. Images need x and y coordinates; videos and reels take username only. The tagged account must be public.
wait_secondsintegerSeconds 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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
image_urlstringPublic HTTPS URL of a JPEG for an image story
video_urlstringPublic HTTPS URL of an MP4/MOV for a video story
wait_secondsintegerSeconds 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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
captionstringCaption text, up to 2200 characters. Hashtags and @mentions work inside the caption. Instagram counts a maximum of 30 hashtags.
childrenarrayChild container IDs, for media_type=CAROUSEL
extra_paramsobjectAny other documented container parameter, passed through verbatim (e.g. cover_url, thumb_offset, share_to_feed, alt_text, product_tags, upload_type).
image_urlstring
is_carousel_itembooleanTrue when this container is a carousel child
media_typestringOmit for a single image; Instagram infers IMAGE
video_urlstring

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.

ParameterTypeDescription
container_id *stringContainer 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.

ParameterTypeDescription
container_id *stringContainer ID to publish
account_idstringInstagram 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

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
afterstringPagination cursor from a previous call's next_cursor. Omit for the first page.
fieldsarraySpecific fields to request. Omit for a sensible default set: id, caption, media_type, media_product_type, media_url, permalink, thumbnail_url, timestamp, …
limitintegerMaximum items to return in this page. Default 25, max 100.
response_formatstring'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.

ParameterTypeDescription
media_id *stringInstagram media ID
fieldsarraySpecific fields to request. Omit for a sensible default set: id, caption, media_type, media_product_type, media_url, permalink, thumbnail_url, timestamp, …
response_formatstring'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.

ParameterTypeDescription
media_id *stringCarousel media ID
response_formatstring'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".

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
response_formatstring'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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
afterstringPagination cursor from a previous call's next_cursor. Omit for the first page.
limitintegerMaximum items to return in this page. Default 25, max 100.
response_formatstring'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

ParameterTypeDescription
media_id *stringMedia ID whose comments to read
afterstringPagination cursor from a previous call's next_cursor.
limitintegerMaximum comments per page. Max 100.
response_formatstring'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.

ParameterTypeDescription
comment_id *stringComment ID
response_formatstring'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.

ParameterTypeDescription
comment_id *stringTop-level comment ID
afterstringPagination cursor from a previous call's next_cursor.
limitintegerMaximum comments per page. Max 100.
response_formatstring'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.

ParameterTypeDescription
media_id *stringMedia ID to comment on
message *stringComment 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.

ParameterTypeDescription
comment_id *stringTop-level comment ID to reply to
message *stringComment 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.

ParameterTypeDescription
comment_id *stringComment ID
hidebooleantrue 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.

ParameterTypeDescription
comment_id *stringComment 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.

ParameterTypeDescription
enabled *booleantrue allows comments, false disables them
media_id *stringMedia 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

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
afterstringPagination cursor from a previous call
limitintegerMaximum conversations per page
response_formatstring'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.

ParameterTypeDescription
conversation_id *stringConversation ID from instagram_list_conversations
limitintegerMaximum messages to return
response_formatstring'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.

ParameterTypeDescription
recipient_id *stringInstagram-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 *stringMessage text, up to 1000 characters
account_idstringSending account ID; omit for the token's own
tagstringSet 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.

ParameterTypeDescription
media_url *stringPublic HTTPS URL of the file to send
recipient_id *stringInstagram-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_idstringSending account ID; omit for the token's own
media_typestringAttachment 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.

ParameterTypeDescription
recipient_id *stringInstagram-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_idstringAccount 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.

ParameterTypeDescription
response_formatstring'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"

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
breakdownstringSplit 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_typestring'total_value' returns one total per metric and supports breakdowns; 'time_series' returns a daily series and ignores breakdowns.
metricsarrayMetric 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_formatstring'markdown' for readable text, 'json' for structured data
sincestringStart date, YYYY-MM-DD. Defaults to 7 days ago. Meta allows at most 30 days per call.
untilstringEnd 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"

ParameterTypeDescription
media_id *stringMedia ID to read insights for
media_product_typestringWhich metric set to request. Check the media's media_product_type with instagram_get_media.
metricsarrayOverride the default metric set for this media type. See instagram_list_metric_catalog.
response_formatstring'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"

ParameterTypeDescription
breakdown *stringDimension to break the audience down by
account_idstringInstagram professional account ID. Omit to use the token's own account.
metricstring'follower_demographics' profiles everyone who follows the account; 'engaged_audience_demographics' profiles only accounts that engaged.
response_formatstring'markdown' for readable text, 'json' for structured data
timeframestringWindow 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.

ParameterTypeDescription
account_idstringInstagram professional account ID. Omit to use the token's own account.
response_formatstring'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.

ParameterTypeDescription
comment_id *stringComment ID from a mentions webhook payload
account_idstringInstagram professional account ID. Omit to use the token's own account.
response_formatstring'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.

ParameterTypeDescription
media_id *stringMedia ID from a mentions webhook payload
account_idstringInstagram professional account ID. Omit to use the token's own account.
response_formatstring'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.

ParameterTypeDescription
media_id *stringMedia ID the mention appears on
message *stringReply text
account_idstringInstagram professional account ID. Omit to use the token's own account.
comment_idstringComment ID to thread the reply under. Omit to comment on the media itself.