Skip to content

Instagram API and MCP

Instagram lets authorized applications read and publish media for professional Instagram accounts. An agent can read account media and publish images for a connected professional account. Connect your Instagram account once with OAuth in Longwave; agents act only on that account.

Add to Longwave

Install elsewhere

Install Instagram

Choose a harness. These instructions connect to the hosted MCP endpoint shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport http instagram https://api.longwave.run/v1/mcp/instagram
functions
5
access
Connect account

Use Instagram on Longwave

  1. Download Longwave or open app.longwave.run.
  2. Sign in to Instagram the first time an agent uses the server.
  3. Ask for the result in any thread, for example: “Review recent media for a content report”. The agent picks the Instagram function and calls it.

Instagram functions

Function
longwave_instagram_account_insights Read views, reach and interactions for the connected Business or Creator account over a range of at most 30 days. Requires instagram_business_manage_insights; reconnect from the Instagram Marketplace card if permission is missing. Data can lag up to 48 hours. Empty data means unavailable, not zero. Reads one response and never follows paging URLs.
longwave_instagram_browse Read Instagram: list recent media or fetch one media item by id (direct Graph /{media-id}). Does not publish or modify content.
longwave_instagram_identity Return the connected Instagram account identity (/me). Use after connect or to confirm which account is active.
longwave_instagram_media_insights Read one lifetime insight for media owned by the connected Business or Creator account. Requires instagram_business_manage_insights; reconnect from the Instagram Marketplace card if permission is missing. Choose a metric compatible with the media type. Stories generally expire after 24 hours and need enough viewers. Empty data means unavailable, not zero. Reads one response and never follows paging URLs.
longwave_instagram_submit Write to Instagram: publish an image post from a public image URL (create container, then publish). Requires instagram_business_content_publish.

Use cases

Questions people ask

Which Instagram accounts support the publishing API?

The Instagram API supports professional accounts, including business and creator accounts. Consumer accounts do not use the professional publishing API. Instagram documentation

Why does Instagram publishing use a media container?

Publishing first creates a media container with the media details. A separate media_publish request publishes that container to the account. Instagram documentation

How do I add the Instagram MCP server to Claude Code?

Run claude mcp add --transport http instagram https://api.longwave.run/v1/mcp/instagram in a terminal. Sign in to Instagram the first time an agent uses the server.

Who publishes the Instagram MCP server?

Longwave publishes the Instagram MCP server that Longwave installs.

Use Instagram in Longwave

Call Instagram from any agent thread, on your machine or in the cloud.

Add to Longwave