send_messageLABSCO SUMMARY
DMs without opening the app.
It works from your own account rather than through a business API, which is why it runs on an ordinary personal profile — and it covers more than sending: reading and searching your chats, downloading media from messages, and looking up users, their posts, stories and followers.
What it is
An MCP server for Instagram direct messages. It signs in as your account to send DMs (text, photo and video each have their own call) and to read, search and mark your chats, download media from messages, and look up users.
What you get
- A text direct message sent from your account
- A photo sent as a direct message
- A video sent as a direct message; plus your inbox read back — list_chats, list_messages, list_pending_chats, search_threads, mark_message_seen — media downloaded from messages, user lookups (get_user_info, get_user_posts, get_user_stories, get_user_followers, get_user_following) and like_media
- Credentials read from a .env file instead of the command line
Requirements
Python 3.11 or newer and an Instagram account. Your username and password go in a .env file, which setup_env.py will create for you; they can also be passed as command-line arguments.
Setup effort
Build from source — clone the repository, then follow the steps on this page and add the configuration for your client
USE CASES
Replying to someone while you are working elsewhere
Send the text DM from your account without opening Instagram.
Sending an image you just produced
Deliver the photo straight into the conversation.
Sharing a clip with a follower
Send a video as a direct message.
Setting up without pasting secrets into a config file
setup_env.py prompts for the credentials and writes the .env file itself.
22 tools
Listed in project docs. Your client may show a different list.
send_photo_messagesend_video_messagelist_chatslist_messagesdownload_media_from_messagedownload_shared_post_from_messagelist_media_messagesmark_message_seenlist_pending_chatssearch_threadsget_thread_by_participantsget_thread_detailsget_user_id_from_usernameget_username_from_user_idget_user_infosearch_usersget_user_storieslike_mediaget_user_followersget_user_followingget_user_postsBEFORE YOU INSTALL
What to know first
Tools you get
22 tools named in the project's documentation.
Requires
- uv on PATH
- Python 3.11+
- INSTAGRAM_PASSWORD in your environment
- INSTAGRAM_USERNAME in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Clone the repository, then follow the steps on this page and add the configuration for your client. This one is built from source rather than installed with a single command.
Server setup
Setup
git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcp
uv sync
python setup_env.pyAdd the configuration below to your client
uv
uv run --directory <YOUR_PATH_TO_INSTAGRAM_DM_MCP> python src/mcp_server.pyMCP Clients
Claude Desktop, Cursor
{
"mcpServers": {
"instagram_dms": {
"command": "uv",
"args": [
"run",
"--directory",
"<YOUR_PATH_TO_INSTAGRAM_DM_MCP>",
"python",
"src/mcp_server.py"
]
}
}
}The configuration on this page does not set INSTAGRAM_PASSWORD and INSTAGRAM_USERNAME; the project's instructions put them in a .env file. Check which folder the server reads that file from before you rely on it.