# HasData Instagram MCP server

> Fetch public Instagram profiles, post feeds, Reels and post comments as structured JSON by handle.

- Repository: https://github.com/HasData/instagram-mcp
- Page: https://hostedmcp.org/servers/hasdata/instagram-mcp
- Transport: stdio, remote
- Stars: 12
- License: MIT
- Latest version: 1.0.8

## Install

### Claude Code

```sh
claude mcp add --env 'HASDATA_API_KEY=<YOUR_HASDATA_API_KEY>' instagram-mcp -- npx -y @hasdata/instagram-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "instagram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@hasdata/instagram-mcp"
      ],
      "env": {
        "HASDATA_API_KEY": "<YOUR_HASDATA_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "instagram-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@hasdata/instagram-mcp"
      ],
      "env": {
        "HASDATA_API_KEY": "<YOUR_HASDATA_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"instagram-mcp","type":"stdio","command":"npx","args":["-y","@hasdata/instagram-mcp"],"env":{"HASDATA_API_KEY":"<YOUR_HASDATA_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "instagram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@hasdata/instagram-mcp"
      ],
      "env": {
        "HASDATA_API_KEY": "<YOUR_HASDATA_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add instagram-mcp --env 'HASDATA_API_KEY=<YOUR_HASDATA_API_KEY>' --env 'HASDATA_API_KEY=<YOUR_HASDATA_API_KEY>' -- npx -y @hasdata/instagram-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.instagram-mcp]
command = "npx"
args = ["-y", "@hasdata/instagram-mcp"]

[mcp_servers.instagram-mcp.env]
HASDATA_API_KEY = "<YOUR_HASDATA_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'HASDATA_API_KEY=<YOUR_HASDATA_API_KEY>' -e 'HASDATA_API_KEY=<YOUR_HASDATA_API_KEY>' instagram-mcp npx -- -y @hasdata/instagram-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "instagram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@hasdata/instagram-mcp"
      ],
      "env": {
        "HASDATA_API_KEY": "<YOUR_HASDATA_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `HASDATA_API_KEY` | yes | yes | HasData API key, created at app.hasdata.com. 1,000 free credits every month, no card. |
| `HASDATA_API_KEY` | yes | yes | HasData API key, created at app.hasdata.com. 1,000 free credits every month, no card. |

## Tools (3)

- `handle`
- `limit`
- `url`

## FAQ

### How do I authenticate to the HasData Instagram MCP server?

Send your HasData API key in an x-api-key header, or use OAuth from a client that supports it. The key is free to create and no account is connected.

### Can it read private Instagram accounts?

No. A private account returns a flag with little data, so check that field before reading the rest.

### What Instagram data can it return?

It returns public profiles, post feeds, the Reels tab and comments on a public post, including hashtags and mentions parsed from captions.

### How many posts come back in one posts call?

Twelve posts is the maximum per call regardless of the limit value, and you page with nextPageToken.

### Is there a free tier?

Yes, 1,000 free credits per month without a card, which works out to 100 Instagram calls.
