logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

insta-messenger-mcp-gateway

Facilitates interaction with Instagram's direct messaging infrastructure, enabling capabilities like message retrieval, transmission, and granular thread management. Incorporates operational oversight and diverse credential handling for robust execution.

Author

insta-messenger-mcp-gateway logo

taskmaster-ai

No License

Quick Info

GitHub GitHub Stars 15
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

instagraminstataskmasterinstagram dmmanage instagraminsta mcp

Instagram DM MCP Server Wrapper

This repository details an MCP (Model-Consumer Protocol) intermediary service engineered for Instagram private messaging functions, leveraging the fastmcp framework alongside the instagrapi library. This service permits advanced computational agents to read and dispatch direct messages across the Instagram platform.

Current Iteration: 1.3.5

Core Capabilities

  • Acquire recent direct communications from your Instagram inbox, complete with exhaustive metadata regarding message threads.
  • Formulate and dispatch direct messages to specified Instagram accounts.
  • Provision of a rudimentary 'greeting' endpoint for proof-of-concept operations.
  • A dedicated operational health check endpoint reporting system status.
  • Robust output logging directed to stderr to maintain integrity of structured data interchange.
  • Support for multiple authentication protocols, including configuration via environmental variables.

Deployment Guide

  1. Install the package system-wide:
npm install -g instagram-dm-mcp
  1. Execute the prerequisite setup routine to install Python dependencies:
instagram-dm-mcp-setup
  1. Integrate the service with Claude Desktop and configure necessary access tokens:
instagram-dm-mcp install

You will be prompted to input your Instagram cookie data. If unfamiliar with extraction, navigate to Instagram in Google Chrome, invoke developer tools (Inspect), select the 'Application' tab, then 'Cookies' on the left navigation pane. Extract the values corresponding to sessionid, csrftoken, and ds_user_id.

The install command automatically registers this Instagram DM MCP service with Claude Desktop and updates its configuration file. This process is set up to utilize the npx execution strategy for simplified maintenance. The resulting configuration is fully portable to Claude Desktop or any other compatible MCP client.

Access credentials can be provided through several mechanisms:

  • Utilizing command-line parameters: bash instagram-dm-mcp install --session-id YOUR_SESSION_ID --csrf-token YOUR_CSRF_TOKEN --ds-user-id YOUR_DS_USER_ID

  • Referencing a dedicated credentials file: bash instagram-dm-mcp install --from-file /path/to/instagram_cookies.json

  • Employing system environment variables (specifically INSTAGRAM_SESSION_ID, INSTAGRAM_CSRF_TOKEN, and INSTAGRAM_DS_USER_ID)

Upon successful installation, the installer injects these credentials as environment variables into the Claude Desktop configuration, resulting in a structure similar to this:

"mcpServers": {
  // existing servers...
  "InstagramDM": {
    "command": "npx",
    "args": [
      "-y",
      "instagram-dm-mcp",
      "start"
    ],
    "env": {
      "INSTAGRAM_SESSION_ID": "your-session-id",
      "INSTAGRAM_CSRF_TOKEN": "your-csrf-token",
      "INSTAGRAM_DS_USER_ID": "your-ds-user-id"
    }
  }
}

See Also

`