Instagram

v1.0.0Communicationstable

An MCP server that integrates with Instagram's Graph API to enable AI-driven management of Instagram Business accounts. It provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages.

facebookinstagrammcpmcp-server
Share:
129
Stars
0
Downloads
0
Weekly
0/5

What is Instagram?

Instagram is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that integrates with instagram's graph api to enable ai-driven management of instagram business accounts. it provides tools for fetching profile data, publishing media, analyzing engagement...

An MCP server that integrates with Instagram's Graph API to enable AI-driven management of Instagram Business accounts. It provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages.

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP server that integrates with Instagram's Graph API to

Use Cases

Publish media and analyze engagement on Instagram Business accounts.
Manage direct messages and retrieve profile data through AI.
jlbadano

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx instagram-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Instagram

Instagram MCP Server integrates with Instagram's Graph API to give AI assistants management capabilities over Instagram Business accounts, including media publishing, engagement analytics, profile data retrieval, and direct message management. It requires a Facebook Developer App and a long-lived Instagram access token, and exposes eight core tools covering the full content lifecycle from upload to performance analysis. Social media managers and marketing teams can use it to automate posting workflows, analyze engagement trends, and respond to messages through natural language.

Prerequisites

  • Python 3.8+ installed
  • An Instagram Business or Creator account linked to a Facebook Page
  • A Facebook Developer App at developers.facebook.com with Instagram Graph API enabled
  • A long-lived Instagram access token (valid for 60 days, must be refreshed)
  • Your Instagram Business Account ID from the Graph API
1

Clone the repository and install dependencies

Clone the ig-mcp repository and install the Python dependencies using pip.

git clone https://github.com/jlbadano/ig-mcp.git
cd ig-mcp
pip install -r requirements.txt
2

Set up your Facebook Developer App

Create an app at developers.facebook.com, add the Instagram Graph API product, and configure the following OAuth permissions: instagram_basic, instagram_content_publish, instagram_manage_insights, instagram_manage_comments, pages_show_list, pages_read_engagement, pages_manage_metadata.

3

Obtain a long-lived access token

Generate a short-lived token via the Graph API Explorer, then exchange it for a long-lived token (60-day validity). Note your Instagram Business Account ID from the token debug info.

# Exchange short-lived for long-lived token:
curl -X GET "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&fb_exchange_token=SHORT_LIVED_TOKEN"
4

Configure environment variables

Copy the example env file and fill in your credentials. Never commit .env to version control.

cp .env.example .env
# Edit .env with your values:
# INSTAGRAM_ACCESS_TOKEN=your-long-lived-token
# FACEBOOK_APP_ID=your-app-id
# FACEBOOK_APP_SECRET=your-app-secret
# INSTAGRAM_BUSINESS_ACCOUNT_ID=your-business-account-id
# INSTAGRAM_API_VERSION=v19.0
5

Configure Claude Desktop

Add the Instagram MCP server to your claude_desktop_config.json. The server reads credentials from the .env file in the project directory.

{
  "mcpServers": {
    "instagram": {
      "command": "python",
      "args": ["/path/to/ig-mcp/server.py"],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your-long-lived-token",
        "FACEBOOK_APP_ID": "your-app-id",
        "FACEBOOK_APP_SECRET": "your-app-secret",
        "INSTAGRAM_BUSINESS_ACCOUNT_ID": "your-business-account-id"
      }
    }
  }
}
6

Restart Claude Desktop and test

Restart Claude Desktop to load the server. Test by asking Claude to retrieve your Instagram profile or list recent posts.

Instagram Examples

Client configuration

Claude Desktop configuration for the Instagram MCP server with all required credentials as environment variables. Replace all placeholder values with your actual credentials.

{
  "mcpServers": {
    "instagram": {
      "command": "python",
      "args": ["/path/to/ig-mcp/server.py"],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your-long-lived-access-token",
        "FACEBOOK_APP_ID": "your-facebook-app-id",
        "FACEBOOK_APP_SECRET": "your-facebook-app-secret",
        "INSTAGRAM_BUSINESS_ACCOUNT_ID": "your-ig-business-account-id",
        "INSTAGRAM_API_VERSION": "v19.0"
      }
    }
  }
}

Prompts to try

Example prompts for managing an Instagram Business account through Claude.

- "Fetch my last 10 Instagram posts and rank them by engagement rate (likes + comments / reach)."
- "Analyze my recent posts and suggest the best times to post based on when my top-performing content was published."
- "Publish a new image post to my Instagram Business account with the image URL 'https://example.com/image.jpg' and caption 'New product launch! #newproduct'."

Troubleshooting Instagram

Access token returns '190: Invalid OAuth access token'

Long-lived tokens expire after 60 days. Refresh the token using the Graph API: GET https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token with your current token. Set up a reminder to refresh every 50 days to avoid expiration.

DM tools fail with 'permission denied' or 'requires Advanced Access'

Direct message features (instagram_manage_messages) require your Facebook app to go through Meta App Review and be granted Advanced Access. Standard Development Mode access is insufficient for production DM management.

Media publish fails with 'media not found' or container creation error

Instagram requires images to be hosted at a publicly accessible HTTPS URL. Ensure your image URL is publicly reachable and not behind authentication. Video content requires additional creation steps (create container, wait for processing, then publish).

Frequently Asked Questions about Instagram

What is Instagram?

Instagram is a Model Context Protocol (MCP) server that mcp server that integrates with instagram's graph api to enable ai-driven management of instagram business accounts. it provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Instagram?

Follow the installation instructions on the Instagram GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Instagram?

Instagram works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Instagram free to use?

Yes, Instagram is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "instagram-mcp-server": { "command": "npx", "args": ["-y", "instagram-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Instagram?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides