# Instagram — how to use (mcp.ai)

Publica fotos, vídeos, carrosséis, Reels e Stories, gerencia comentários e mensagens diretas, e lê insights de perfil e mídia pela API oficial. Com o plano Avançado, também curte posts, segue e deixa de seguir, lista e vê stories de outros perfis. Conecte em 2 cliques (conta Business ou Criador) ou com usuário e senha, que suporta 2FA.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_instagram?ms=1796396520000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `instagram_actions_follow`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/instagram_actions`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://new.mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/instagram_actions/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/instagram_actions/actions/follow` — Follow one or more Instagram users by @username. Returns a job_id.
  - body: { targets: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/get/job/status` — Get the status/progress/result of a previously started action by its job_id.
  - body: { job_id: string, account?: string, job_ids?: string[] }
- `POST https://api.mcp.ai/api/instagram_actions/actions/like` — Like one or more Instagram posts, addressed by post URL or shortcode (NOT the numeric media id the official API returns). Returns a job_id; poll instagram_actions_get_job_status.
  - body: { posts: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/like/comment` — Like one or more comments. Each comment_id MUST come from instagram_actions_list_comments. The id returned by the official instagram_get_ig_media_comments belongs to a different namespace and is rejec
  - body: { comment_ids: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/list/accounts` — List the Instagram accounts connected to this install — id, username, label.
  - body: { account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/list/comments` — List the comments on a post, addressed by URL or shortcode. Returns each comment_id in the form that instagram_actions_like_comment accepts. The official API returns a DIFFERENT id that is not accepte
  - body: { posts: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/list/jobs` — List recent action jobs for the connected account, optionally filtered by status.
  - body: { status?: string, account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/list/stories` — List a specific user's currently available stories (read-only, does not mark as seen). Returns a job_id (or the result inline when wait=true).
  - body: { target: string, wait?: boolean, account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/send/message` — Send the FIRST direct message to someone who has never messaged this account (the official API cannot do this). One recipient per call, low daily cap. Returns a job_id.
  - body: { target: string, text: string, dry_run?: boolean, account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/unfollow` — Unfollow one or more Instagram users by @username. Returns a job_id.
  - body: { targets: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/actions/view/story` — Watch (mark as seen) the stories of one or more profiles. Omit `targets` to watch the home tray. Returns a job_id.
  - body: { targets?: string[], account?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/create/carousel/container` — Create a draft carousel post with multiple images/videos before publishing. Instagram requires carousels to have between 2 and 10 media items. Container creation_ids expire in under 24 hours, so publi
  - body: { caption?: string, children?: string[], ig_user_id?: string, location_id?: string, share_to_feed?: boolean, child_image_urls?: string[], child_video_urls?: string[], child_image_files?: object[], child_video_files?: object[], graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/conversation` — Get details about a specific Instagram DM conversation (participants, etc). Requires a Business or Creator account with Instagram messaging permissions; personal accounts will return permission errors
  - body: { conversation_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/ig/media` — Get a published Instagram Media object (photo, video, story, reel, or carousel). Use when you need to retrieve detailed information about a specific Instagram post including engagement metrics, captio
  - body: { fields?: string, ig_media_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/ig/media/comments` — Tool to retrieve comments on an Instagram media object. Use when you need to fetch comments from a specific Instagram post, photo, video, or carousel owned by the connected Business/Creator account. S
  - body: { after?: string, limit?: integer, before?: string, fields?: string, ig_media_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/ig/media/insights` — Read media insights. REST response: read result.result.data. Request metric=[views,reach,saved,shares] for views, reach, saves and shares; availability depends on the media type and metric.
  - body: { metric: string[], period?: string, breakdown?: string, ig_media_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/ig/user/media` — List account media. REST response: read result.result.data and result.result.paging (not result.data). Null engagement fields mean unavailable, not zero; use media insights for saved, shares and views
  - body: { after?: string, limit?: integer, since?: integer, until?: integer, before?: string, fields?: string, ig_user_id?: string, graph_api_version?: string, auto_resolve_fb_page_id?: boolean }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/user/info` — Get Instagram Business Account info including profile details and statistics. Use "me" to query your own authenticated account, or provide the numeric Business Account ID of an account you manage. NOT
  - body: { ig_user_id?: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/get/user/insights` — Read account insights at result.result.data in REST. An empty data array means insights are unavailable, not zero. It does not by itself establish a follower-count restriction.
  - body: { since?: integer, until?: integer, metric?: string[], period?: string, breakdown?: string, timeframe?: string, ig_user_id?: string, metric_type?: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/list/all/conversations` — List all Instagram DM conversations for the authenticated user. Requires a Business/Creator account with messaging permissions; personal accounts return empty results. Response conversations are neste
  - body: { after?: string, limit?: integer, user_id?: string, platform?: string, ig_user_id?: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/list/all/messages` — List all messages from a specific Instagram DM conversation. Requires a Business or Creator account with messaging permissions; personal accounts return empty results. Response data is nested under da
  - body: { after?: string, limit?: integer, conversation_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/mark/seen` — Mark Instagram DM messages as read/seen for a specific user. Sends a 'mark_seen' sender action to indicate messages from the specified recipient have been read. Marking as seen is visible to the other
  - body: { ig_user_id?: string, recipient_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/post/ig/comment/replies` — Tool to create a reply to an Instagram comment. Use when you need to reply to a specific comment on an Instagram post owned by a Business or Creator account. The reply must be 300 characters or less, 
  - body: { message: string, ig_comment_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/post/ig/user/media` — Tool to create a media container for Instagram posts. Use this to create a container for images, videos, Reels, or carousels. This is the first step in Instagram's two-step publishing process - after 
  - body: { caption?: string, alt_text?: string, children?: string[], cover_url?: string, image_url?: string, user_tags?: object[], video_url?: string, audio_name?: string, ig_user_id?: string, image_file?: object, media_type?: string, video_file?: object, location_id?: string, thumb_offset?: integer, share_to_feed?: boolean, is_carousel_item?: boolean, graph_api_version?: string, trial_params?: object }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/post/ig/user/media/publish` — Tool to publish a media container to an Instagram Business account. This action automatically waits for the container to finish processing before publishing. Instagram enforces an account-specific con
  - body: { ig_user_id?: string, creation_id: string, max_wait_seconds?: integer, graph_api_version?: string, poll_interval_seconds?: number }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/send/image` — Send an image via Instagram DM to a specific user. Each send modifies inbox state; avoid bulk or automated sends without explicit user approval.
  - body: { image_url: string, ig_user_id?: string, recipient_id: string, graph_api_version?: string }
- `POST https://api.mcp.ai/api/instagram_actions/instagram/send/text/message` — Send a text message to an Instagram user via DM in an existing conversation. Cannot initiate new DM threads — a prior conversation must exist. Requires an Instagram Business or Creator account with me
  - body: { text: string, ig_user_id?: string, recipient_id: string, graph_api_version?: string, reply_to_message_id?: string }

## Example prompts
- "Publique essa foto no meu feed com a legenda 'novidade!'"
- "Quantas visualizações meu último Reels teve?"
- "Curta os posts 123 e 456 na minha conta"

## More
- Page: https://new.mcp.ai/instagram
- Agent spec (llms.txt): https://new.mcp.ai/instagram/llms.txt
- Postman collection: https://new.mcp.ai/instagram/postman.json
