Instagram DM MCP Server
Allows sending and reading Instagram DMs, listing configured recipients, and managing direct message conversations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Instagram DM MCP Serversend a DM to John Doe: I'll be 10 minutes late."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Instagram DM MCP Server
MCP (Model Context Protocol) server for sending and reading Instagram DMs.
Quick Start
uv run mcp_server.pyThe server communicates via JSON-RPC 2.0 over stdin/stdout.
Related MCP server: Instagram MCP Server
Setup
Copy
config/config.json.templatetoconfig/config.json- add yoursessionid, optionalusername, andmax_messages_per_thread.Copy
config/recipients.json.templatetoconfig/recipients.json- list of Instagram usernames with optional aliases.The
.jsonfiles are gitignored; the.templatefiles are tracked as guides.
Tools
send_dm(recipient, message)
Send a DM to a specific recipient.
Parameters:
recipient(required) - Instagram username to send the DM tomessage(required) - Message text to send
read_dm(recipient, max_messages=10)
Read the last N messages from a specific recipient's thread.
Parameters:
recipient(required) - Instagram username to read DMs frommax_messages(optional) - Max messages per thread (usesmax_messages_per_threadfrom config if omitted)
list_recipients()
List all configured recipients with their aliases. Agents should use this tool to discover who they can message.
Parameters: None
Config
Field | Default | Description |
| (required) | Your Instagram session ID |
|
| Your Instagram username (optional) |
|
| Message sent when using send_dm |
|
| Max messages to read per thread |
ONLY send to recipients in recipients.json. Do not modify the script directly.
Recipient Aliases
In recipients.json, each entry can include an alias field for agents to use:
[
{
"username": "john_doe",
"alias": "John Doe"
}
]The alias is optional - if omitted, the username is used. Use the list_recipients tool to see all configured aliases. Plain string entries (backwards compat) are also supported:
["john_doe", "jane_smith"]This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram, WhatsApp and Messenger DMs through official Meta Business APIs.
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Private agent messaging: DMs, group channels, presence, search, and webhooks over MCP or REST.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, send, and manage Instagram direct messages, including viewing conversations, sending DMs to users, reacting to messages, and searching for users by username.10-
- FlicenseBqualityDmaintenanceEnables AI agents to control Instagram accounts programmatically, supporting profile management, media interaction, direct messaging, and follower management.132-
- FlicenseAqualityCmaintenanceEnables agents to interact with Instagram through 49 tools for direct messages, feed, profiles, search, and persona discovery, with write actions disabled by default until explicitly enabled.849-
- AlicenseNot gradedqualityBmaintenanceEnables reading and replying to direct messages, comments, and templates across Instagram, WhatsApp, and Messenger through official Meta Business APIs, with support for human handover and AI assistant controls.26 npmMIT