instagram_dm_mcp
by trypeggy·★ 167·Score 45
Instagram DM MCP server enabling direct messaging, media sharing, and user interaction through Instagram's API.
Overview
This is a fully-featured MCP server that bridges Instagram's messaging capabilities with AI assistants. It provides comprehensive functionality for sending messages (text, photos, videos), managing chats, accessing user information, and handling media content. The server includes automatic session management to maintain authentication state and offers both environment variable and command-line credential options.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server if you need to programmatically interact with Instagram DMs from an AI agent, especially for social media management, customer support automation, or content archiving purposes.
When NOT to choose this
Don't choose this if you need access to Instagram's API for commercial applications without reverse engineering, as this server bypasses official API and may violate Instagram's terms of service.
Tools this server exposes
12 tools extracted from the READMEsend_messageSend an Instagram direct message to a user by username.
send_photo_messageSend a photo as an Instagram direct message to a user by username.
send_video_messageSend a video as an Instagram direct message to a user by username.
list_chatsGet Instagram Direct Message threads from your account.
list_messagesGet messages from a specific Instagram DM thread by thread ID.
download_media_from_messageDownload direct-uploaded photo or video from a DM message.
mark_message_seenMark a specific message in an Instagram DM thread as seen.
search_threadsSearch Instagram DM threads by username or keyword.
get_user_infoGet information about a specific Instagram user by username.
get_user_id_from_usernameGet the Instagram user ID for a given username.
search_usersSearch for Instagram users by username.
get_user_postsGet recent posts from a specific Instagram user by username.
Comparable tools
Installation
Installation
- Clone the repository:
git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcp- Install dependencies using uv:
uv syncor with pip:
pip install -r requirements.txt- Configure Instagram credentials using the helper script:
python setup_env.py- For Claude Desktop, add to
claude_desktop_config.json:
{
"mcpServers": {
"instagram_dms": {
"command": "uv",
"args": [
"run",
"--directory",
"PATH/TO/instagram_dm_mcp",
"python",
"src/mcp_server.py"
]
}
}
}- Restart Claude Desktop / Cursor.
FAQ
- Does this support Instagram Business accounts?
- The README doesn't specify differences between personal and business accounts, so both should work as long as you have valid credentials.
- Can I use this with AI assistants other than Claude?
- While the example shows Claude Desktop integration, this should work with any MCP-compatible client that can connect to Python-based servers.
Compare instagram_dm_mcp with
Last updated · Auto-generated from public README + GitHub signals.