Skip to main content
Glama
chaudryammar7861-pixel

Instagram → ChatGPT MCP Server

Instagram → ChatGPT MCP Server

Open-source MCP server for connecting an Instagram Professional (Business or Creator) account to an MCP client such as ChatGPT, using Meta's official Instagram Platform API and OAuth. It does not ask for or store your Instagram password.

What it supports

  • Read profile information

  • Read posts/reels

  • Publish image posts

  • Publish reels

  • Read account/media insights

  • Read comments

  • Reply to comments

  • Hide/unhide comments

  • Delete comments

  • Delete media where Meta permits the operation

Related MCP server: Instagram MCP Server

Important platform limits

Meta's Instagram Platform API is for Professional accounts (Business/Creator). Personal accounts need to be converted first. API permissions and available metrics can change; use the current Meta App Dashboard and documentation when configuring the app.

Publishing requires the media to be reachable by Meta at a public HTTPS URL. A local file:// or localhost URL will not work.

Architecture

ChatGPT/MCP client → HTTPS /mcp + Bearer token → this server → official graph.instagram.com API.

OAuth endpoints:

  • /oauth/start

  • /oauth/callback

The MCP endpoint requires Authorization: Bearer $MCP_AUTH_TOKEN. Keep this separate from the Meta access token.

Tokens are stored in a local SQLite database. The Instagram password is never handled by this server.

Local setup

  1. Install Node.js 22+.

  2. Create a Meta developer app and add Instagram API with Instagram Login.

  3. Configure OAuth redirect URI as https://YOUR-DOMAIN/oauth/callback (or your local tunnel URL).

  4. Request these scopes:

    • instagram_business_basic

    • instagram_business_content_publish

    • instagram_business_manage_comments

    • instagram_business_manage_insights

  5. Copy .env.example to .env and fill in App ID, App Secret, redirect URI, public URL and a strong session secret.

  6. Run:

npm install
npm run build
npm start
  1. Open https://YOUR-DOMAIN/oauth/start in a browser and approve Instagram access.

  2. Configure your MCP client to use https://YOUR-DOMAIN/mcp with Streamable HTTP.

Docker

docker build -t instagram-chatgpt-mcp .
docker run --rm -p 3000:3000 --env-file .env -v "$PWD/data:/app/data" instagram-chatgpt-mcp

Production notes

  • Put the server behind HTTPS.

  • Keep META_APP_SECRET, MCP_AUTH_TOKEN, and the SQLite database private.

  • Back up the SQLite database securely; it contains access tokens.

  • Do not commit .env or the SQLite database.

  • Add rate limiting, structured audit logs, CSRF protections around OAuth, and persistent/session-aware MCP handling before exposing this to multiple users.

  • For a personal/single-account deployment, the included SQLite token store is intentionally simple.

ChatGPT connection

ChatGPT needs a publicly reachable HTTPS MCP endpoint. The source package cannot itself create that public endpoint. Deploy this server first, then add its MCP URL in the ChatGPT connector/plugin flow available to your account.

Meta references

Use Meta's current Instagram Platform documentation and App Dashboard for the exact current scopes, review requirements, API version and redirect URI settings.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables reading, publishing, commenting, direct messaging, and pulling insights from Instagram Business or Creator accounts via the Graph API.
    21 PyPI
    6
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Connects Claude Desktop and other MCP clients to the Instagram Graph API for reading analytics, managing comments, and publishing photos, carousels, and reels.
    11
    28 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for Instagram Graph API integration, enabling AI applications to manage Instagram Business accounts: fetch profiles, media, insights, publish content, and handle DMs.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for interacting with Instagram Business accounts via the Instagram Graph API, enabling profile retrieval, media publishing, insights, and direct messaging.
    MIT