# Instagram MCP Server for Claude, ChatGPT, Cursor and Codex (`goat255/instagram-mcp-server`) Actor

Instagram MCP server for AI agents. Four tools over MCP Streamable HTTP: profile, recent posts, live stories and highlight albums for public accounts. Works with Claude Desktop, Cursor, ChatGPT, Codex and any MCP client. No Instagram login. Pay per tool call.

- **URL**: https://apify.com/goat255/instagram-mcp-server.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** MCP servers, AI, Social media
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 tool calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Instagram MCP Server for Claude, ChatGPT, Cursor and Codex

Give your AI agent live Instagram data. This is a native Model Context Protocol (MCP)
server: connect it once and your assistant can look up any public Instagram account,
read its recent posts, see what stories are live right now, and open its highlight
albums, all in the middle of a conversation.

No Instagram login. No API key of your own. No cookies to paste. You pay per tool call,
and only when a call actually returns data.

### What it does

Five tools, over MCP Streamable HTTP:

| Tool | What it returns |
|---|---|
| `instagram_profile` | Full name, biography, follower and following counts, post count, verified and business flags, external links, profile picture |
| `instagram_posts` | Recent posts, newest first: caption, likes, comments, media type, media URLs, dimensions, timestamp, permalink |
| `instagram_stories` | Stories the account has live right now, with media URLs, type, dimensions, posted time and expiry |
| `instagram_highlights` | The highlight albums on a profile: id, title, cover image, item count |
| `instagram_highlight_items` | The individual stories inside one highlight album |

Every tool accepts a plain username, an `@handle` or a profile URL, so you can paste
whatever you have.

### Connect it

The server runs in Standby mode, so there is nothing to start. Point your MCP client at
the server URL and authenticate with your Apify API token.

```json
{
  "mcpServers": {
    "instagram": {
      "url": "https://goat255--instagram-mcp-server.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
      }
    }
  }
}
```

Works with Claude Desktop, Claude Code, Cursor, ChatGPT, OpenAI Codex, the Agents SDK,
Windsurf, and any other client that speaks MCP.

### Example input

Tool calls come from your assistant, so you write them in plain language:

> "What is @example\_user's follower count, and what have they posted this week?"

Under the hood that is:

```json
{
  "name": "instagram_posts",
  "arguments": {
    "username": "example_user",
    "limit": 12
  }
}
```

`limit` accepts 1 to 50. Asking for more than about a dozen posts reads several pages,
so the call takes a little longer. Every reply carries `complete`: if it is `false`, the
call stopped early to stay responsive and the account has more posts than came back.

### Output sample

`instagram_profile`:

```json
{
  "username": "nasa",
  "id": "528817151",
  "fullName": "NASA",
  "followerCount": 104340863,
  "followingCount": 91,
  "mediaCount": 4931,
  "isVerified": true,
  "isPrivate": false,
  "isBusiness": true,
  "externalUrl": "https://www.nasa.gov"
}
```

`instagram_posts`:

```json
{
  "username": "nasa",
  "requested": 12,
  "postCount": 12,
  "complete": true,
  "posts": [
    {
      "username": "nasa",
      "id": "3983374110243288826",
      "shortcode": "DdHyaYAifb6",
      "mediaType": "carousel",
      "timestamp": "1789075224",
      "caption": "Cementing their names in history.",
      "displayUrl": "https://scontent.cdninstagram.com/v/...",
      "dimensions": { "height": 1800, "width": 1440 },
      "likeCount": 111791,
      "commentCount": 486,
      "url": "https://www.instagram.com/p/DdHyaYAifb6/"
    }
  ]
}
```

`instagram_highlights`, then `instagram_highlight_items` with one of those ids:

```json
{
  "username": "nasa",
  "userId": "528817151",
  "highlightCount": 5,
  "highlights": [
    {
      "highlightId": "highlight:18195781759377100",
      "title": "Artemis",
      "mediaCount": 9,
      "coverImageUrl": "https://scontent.cdninstagram.com/v/..."
    }
  ]
}
```

### Notes

- **Public accounts only.** A private account returns a `private_account` error rather
  than partial data. A handle that does not exist returns `not_found`.
- **Stories are live.** They expire 24 hours after posting, so an empty list means the
  account has nothing up at the moment, not that the call failed.
- **You are charged per successful tool call.** A call that fails, hits a private
  account or names a handle that does not exist is not charged.
- **Highlights are two steps on purpose.** Listing the albums is quick; expanding one
  album into its stories is a second call. That keeps every call fast enough for an
  assistant to wait on, and you only pay to open the album you actually want.
- Pressing Start on this page does not scrape anything. It prints the connection
  details and finishes, because the tools are served in Standby mode.

# Actor input Schema

## `showSetupInstructions` (type: `boolean`):

Print the connection details for this MCP server (URL, tools and how billing works) and save them to the dataset. This Actor serves its tools in Standby mode, so a normal run only reports how to connect and then finishes.

## Actor input object example

```json
{
  "showSetupInstructions": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Server URL, tool list and billing note (JSON).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "showSetupInstructions": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/instagram-mcp-server").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "showSetupInstructions": True }

# Run the Actor and wait for it to finish
run = client.actor("goat255/instagram-mcp-server").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "showSetupInstructions": true
}' |
apify call goat255/instagram-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goat255/instagram-mcp-server"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ickljBhKzVL4OKi0H/builds/d02wg4DlV6tS53T54/openapi.json
