Instagram

Provides programmatic access to Instagram Business data, media publishing, insights, and conversations via MCP
  • python

66

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jlbadano-ig-mcp": {
      "command": "python",
      "args": [
        "src/instagram_mcp_server.py"
      ],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
      }
    }
  }
}

You can run an MCP server that connects to Instagram’s Graph API to manage business profiles, media, and conversations from your applications. This server makes it possible to access profile data, post media, fetch insights, and interact with Instagram Direct Messages (with the appropriate approvals), all through a standardized MCP interface.

How to use

You access the Instagram MCP server from an MCP client (such as Claude Desktop or a custom MCP client) by configuring a local or remote server entry. The server exposes tools to get profile info, fetch media posts, retrieve insights, publish media, list connected Facebook pages, and manage conversations and messages when you have Advanced Access.

How to install

Prerequisites you need before starting:

  • Python 3.10 or newer installed on your machine
  • Access to a terminal or command prompt
  • Internet access to install dependencies

Step-by-step setup you can follow to run the Instagram MCP server locally:

# 1) Prepare a project directory
mkdir ig-mcp-installer
cd ig-mcp-installer

# 2) Create a Python virtual environment
python -m venv venv
source venv/bin/activate  # on macOS/Linux
# or
venv\Scripts\activate  # on Windows

# 3) Install dependencies (if a requirements file exists in your project)
pip install -r requirements.txt

# 4) Place your Instagram MCP server script at the expected path or adjust accordingly
#    Example path used by the client example
#    This path should point to your actual server script

# 5) Create an environment file or export variables needed by the server
#    Example (only the variable shown in the client config is required here for start)
export INSTAGRAM_ACCESS_TOKEN=your_long_lived_access_token

# 6) Run the MCP server locally
python src/instagram_mcp_server.py  # path may vary if you place the script elsewhere

# 7) Confirm the server is running and listening for connections
#    You can test by connecting your MCP client configured to use this local stdio server

Configuration and usage notes

Configuration is driven by environment variables and the runtime script path. The essential environment variable shown for the server is INSTAGRAM_ACCESS_TOKEN, which should hold a long-lived access token with the necessary permissions.

# Example MCP client configuration for a local stdio server
{
  "mcpServers": {
    "instagram": {
      "command": "python",
      "args": ["src/instagram_mcp_server.py"],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your_access_token"
      }
    }
  }
}

Security and credentials

Handle credentials with care. Never commit tokens or secrets to version control. Use secure secret storage or environment variables and rotate tokens regularly. Ensure your token has the required permissions and that Advanced Access is granted if you plan to use Direct Messaging features.

Troubleshooting

If you encounter authentication or permission errors, verify that your access token is valid and has the necessary permissions. For Direct Messaging features, ensure you have Advanced Access approval. For connectivity issues, confirm the MCP server process is running and that your client is configured to connect via the correct path and environment variables.

Notes and examples

The server supports common operations such as retrieving profile data, media feeds, and insights, as well as publishing media and listing connected pages. Access to conversations and DMs requires the appropriate Meta approvals. Use the provided client configuration example to wire your MCP client to the local server.

Available tools

get_profile_info

Retrieve Instagram business profile details such as username, biography, and follower count.

get_media_posts

Fetch recent media posts from the connected Instagram Business account.

get_media_insights

Retrieve engagement metrics for specific posts.

publish_media

Upload and publish images or videos to Instagram with captions.

get_account_pages

List Facebook Pages connected to the Instagram account.

get_conversations

List Instagram Direct Message conversations (requires Advanced Access).

get_conversation_messages

Read messages from a specific conversation (requires Advanced Access).

send_dm

Reply to Instagram Direct Messages (requires Advanced Access).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational