Instagram DM MCP
Instagram Direct messages MCP
What is Instagram DM MCP?
Instagram DM MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to instagram direct messages mcp
Instagram Direct messages MCP
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Instagram Direct messages MCP
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx instagram-dm-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Instagram DM MCP
Instagram DM MCP connects your AI assistant directly to Instagram Direct Messaging, letting you send text, photos, and videos, read and search message threads, and manage conversations programmatically. Built on the instagrapi library, it authenticates with your Instagram credentials and exposes 14 tools covering messaging, media download, user lookup, and post interaction. Teams and developers use it to build AI-powered Instagram outreach workflows, auto-reply bots, and social CRM integrations without maintaining separate scripts.
Prerequisites
- Python 3.10 or higher installed
- uv package manager or pip installed
- An active Instagram account (username and password)
- An MCP client such as Claude Desktop
Clone the repository
Clone the instagram_dm_mcp repository from GitHub and navigate into the project directory.
git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcpInstall Python dependencies
Install required packages using uv (recommended) or pip. The server depends on instagrapi and mcp packages.
uv sync
# or alternatively:
pip install -r requirements.txtConfigure Instagram credentials
Run the interactive setup script to create your .env file with Instagram credentials, or create it manually with INSTAGRAM_USERNAME and INSTAGRAM_PASSWORD.
python setup_env.py
# OR create .env manually:
# INSTAGRAM_USERNAME=your_username
# INSTAGRAM_PASSWORD=your_passwordAdd the server to Claude Desktop config
Edit claude_desktop_config.json to register the MCP server. Use the uv run command pointing to the cloned directory.
{
"mcpServers": {
"instagram-dm": {
"command": "uv",
"args": ["--directory", "/path/to/instagram_dm_mcp", "run", "main.py"],
"env": {
"INSTAGRAM_USERNAME": "your_instagram_username",
"INSTAGRAM_PASSWORD": "your_instagram_password"
}
}
}
}Restart Claude Desktop and verify
Restart Claude Desktop to load the new server. You should see Instagram DM tools available in the tool list. Try listing your chats to confirm the connection works.
Instagram DM MCP Examples
Client configuration
Claude Desktop configuration for the Instagram DM MCP server using uv to run the Python server.
{
"mcpServers": {
"instagram-dm": {
"command": "uv",
"args": ["--directory", "/path/to/instagram_dm_mcp", "run", "main.py"],
"env": {
"INSTAGRAM_USERNAME": "your_instagram_username",
"INSTAGRAM_PASSWORD": "your_instagram_password"
}
}
}
}Prompts to try
Example prompts to use once the Instagram DM MCP server is connected.
- "List my 10 most recent Instagram DM threads"
- "Send a message to @johndoe saying 'Hey, saw your post — great work!'"
- "Search my DM threads for conversations with the keyword 'collaboration'"
- "Get the last 20 messages from my thread with @janedoe"
- "Download the photo from the last message in my conversation with @partner_account"
- "Get recent posts from Instagram user @someinfluencer"Troubleshooting Instagram DM MCP
Login fails with 'ChallengeRequired' or two-factor authentication error
Instagram may require a challenge verification. Run the server interactively once via 'python main.py' to complete the challenge in the terminal, then the session cookie will be cached for future MCP runs.
Messages send successfully but the recipient never receives them
Ensure the recipient's username is spelled exactly correctly. For new conversations, Instagram sometimes rate-limits new DM threads — wait a few minutes and try again. Avoid sending too many messages in quick succession to prevent account flags.
uv sync fails with dependency resolution errors
Make sure you are using Python 3.10 or higher. Try 'uv sync --reinstall' or fall back to 'pip install -r requirements.txt' in a fresh virtual environment created with 'python -m venv .venv && source .venv/bin/activate'.
Frequently Asked Questions about Instagram DM MCP
What is Instagram DM MCP?
Instagram DM MCP is a Model Context Protocol (MCP) server that instagram direct messages mcp It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Instagram DM MCP?
Follow the installation instructions on the Instagram DM MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Instagram DM MCP?
Instagram DM MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Instagram DM MCP free to use?
Yes, Instagram DM MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Instagram DM MCP Alternatives — Similar Communication Servers
Looking for alternatives to Instagram DM MCP? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up Instagram DM MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Instagram DM MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.