Instagram DM MCP Server

Instagram DM MCP Server

Enables AI assistants to read and send Instagram direct messages using the Model-Consumer Protocol with instagrapi.

Category
Visit Server

README

Instagram DM MCP Server

An MCP (Model-Consumer Protocol) server for Instagram direct messaging functionality, built with fastmcp and instagrapi. This server enables AI assistants to read and send Instagram direct messages.

Current Version: 1.3.5

Features

  • Read recent direct messages from your Instagram inbox with comprehensive thread information
  • Send direct messages to Instagram users
  • Simple greeting resource (example functionality)
  • Health check endpoint with status information
  • Proper logging to stderr to avoid JSON parsing issues
  • Support for various authentication methods, including environment variables

Installation

As an npm package (recommended)

  1. Install the package globally:
npm install -g instagram-dm-mcp
  1. Run the setup script to install Python dependencies:
instagram-dm-mcp-setup
  1. Register the server with Claude Desktop and configure credentials:
instagram-dm-mcp install

You will be prompted to paste in your Instagram cookies information. If you arne't sure how to get this, log into Instagram on Chrome, right-click on the page, and select "Inspect". Go to the "Application" tab, then click on "Cookies" in the left sidebar. You should see a list of cookies. Copy the values for sessionid, csrftoken, and ds_user_id.

The install command will automatically register the Instagram DM MCP server with Claude Desktop and add it to your Claude Desktop configuration file. The command will configure the server to use the npx approach, which makes it easier to maintain. You can also copy-paste the same setup to Claude or any other MCP client.

You can provide Instagram credentials in several ways:

  • Using command-line arguments:

    instagram-dm-mcp install --session-id YOUR_SESSION_ID --csrf-token YOUR_CSRF_TOKEN --ds-user-id YOUR_DS_USER_ID
    
  • Using a credentials file:

    instagram-dm-mcp install --from-file /path/to/instagram_cookies.json
    
  • Using environment variables (INSTAGRAM_SESSION_ID, INSTAGRAM_CSRF_TOKEN, and INSTAGRAM_DS_USER_ID)

The installer will add these credentials as environment variables in the Claude Desktop configuration file, creating a configuration like this:

"mcpServers": {
  // other 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"
    }
  }
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured