Instagram Direct Messages

v1.0.0Communicationstable

Enables sending and receiving Instagram Direct Messages, managing conversations, downloading media, viewing user profiles and stories, and interacting with posts through natural language in Claude.

aifacebookgithubinstagraminstagram-message-bot
Share:
168
Stars
0
Downloads
0
Weekly
0/5

What is Instagram Direct Messages?

Instagram Direct Messages is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables sending and receiving instagram direct messages, managing conversations, downloading media, viewing user profiles and stories, and interacting with posts through natural language in claude.

Enables sending and receiving Instagram Direct Messages, managing conversations, downloading media, viewing user profiles and stories, and interacting with posts through natural language in Claude.

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

Features

  • Enables sending and receiving Instagram Direct Messages, man

Use Cases

Send and receive Instagram DMs
Manage conversations
Download media and view profiles
trypeggy

Maintainer

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

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx instagram-dm-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 Direct Messages

The Instagram DM MCP Server enables AI assistants to send and receive Instagram Direct Messages, manage conversation threads, download shared media, view user profiles and stories, and interact with posts — all through natural language commands in Claude or other MCP clients. It uses your Instagram credentials to authenticate via the instagrapi library and runs a local Python MCP server that proxies actions to the Instagram API. Social media managers, marketers, and developers can use it to automate DM workflows, manage incoming messages, and perform account interactions without opening the Instagram app.

Prerequisites

  • Python 3.11 or later
  • uv package manager installed (recommended) or pip
  • An Instagram account with valid username and password (two-factor authentication may require additional setup)
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone the repository

Clone the instagram_dm_mcp repository to your local machine. There is no pip package — the server must be run from source.

git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcp
2

Install Python dependencies

Use uv to sync the project dependencies, or install via pip from the requirements file.

# Recommended: using uv
uv sync

# Alternative: using pip
pip install -r requirements.txt
3

Configure Instagram credentials

Run the provided setup script to create an environment file with your Instagram credentials, or manually set the environment variables.

# Interactive setup
python setup_env.py

# Or set manually
export INSTAGRAM_USERNAME=your_instagram_username
export INSTAGRAM_PASSWORD=your_instagram_password
4

Add the server to your MCP client configuration

Edit your Claude Desktop configuration to register the Instagram DM server. Replace PATH/TO/instagram_dm_mcp with the actual absolute path to your cloned repository.

5

Restart Claude Desktop and test the connection

Restart Claude Desktop to load the new MCP server configuration, then ask Claude to list your recent DM conversations to verify the connection.

Instagram Direct Messages Examples

Client configuration

Add the Instagram DM MCP server to Claude Desktop. The server is run with uv from the cloned project directory. Set the env block with your Instagram credentials.

{
  "mcpServers": {
    "instagram_dms": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/instagram_dm_mcp",
        "python",
        "src/mcp_server.py"
      ],
      "env": {
        "INSTAGRAM_USERNAME": "your_username",
        "INSTAGRAM_PASSWORD": "your_password"
      }
    }
  }
}

Prompts to try

Ask Claude to manage your Instagram DMs and interactions using natural language.

- "List my 10 most recent Instagram DM conversations"
- "Send a DM to @username saying 'Thanks for your message, I'll get back to you soon'"
- "Download all media from my conversation with @username"
- "Show me the Instagram profile and recent stories for @username"
- "Search my DM inbox for conversations mentioning the word 'collaboration'"

Troubleshooting Instagram Direct Messages

Login fails with checkpoint required or suspicious login error

Instagram may flag automated logins. Log in to Instagram manually in your browser from the same IP address to clear the checkpoint, then restart the MCP server. Consider using a device that regularly accesses your Instagram account.

uv command not found when Claude Desktop tries to start the server

Install uv with `curl -LsSf https://astral.sh/uv/install.sh | sh` and ensure it is on your system PATH. Alternatively, replace `uv run ... python` with `python` and use a virtualenv with pip-installed dependencies.

Server starts but send_dm tool returns an error

Instagram rate-limits DM sending from new or automated accounts. Wait a few minutes between sends and avoid sending identical messages repeatedly. Ensure the recipient's account exists and has not blocked you.

Frequently Asked Questions about Instagram Direct Messages

What is Instagram Direct Messages?

Instagram Direct Messages is a Model Context Protocol (MCP) server that enables sending and receiving instagram direct messages, managing conversations, downloading media, viewing user profiles and stories, and interacting with posts through natural language in claude. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Instagram Direct Messages?

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

Which AI clients work with Instagram Direct Messages?

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

Is Instagram Direct Messages free to use?

Yes, Instagram Direct Messages 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-dm-mcp-server": { "command": "npx", "args": ["-y", "instagram-dm-mcp-server"] } } }

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

Read the full setup guide →

Ready to use Instagram Direct Messages?

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