Instagram DMs

Provides an MCP server that lets AI assistants read and send Instagram DMs by simulating user actions.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "braindead-dev-instagram-dms-mcp": {
      "command": "python",
      "args": [
        "src/server.py"
      ],
      "env": {
        "IG_DID": "YOUR_IG_DID",
        "IG_MID": "YOUR_IG_MID",
        "IG_DATR": "YOUR_IG_DATR",
        "IG_USER_ID": "YOUR_IG_USER_ID",
        "POKE_API_KEY": "YOUR_POKE_API_KEY",
        "IG_CSRF_TOKEN": "YOUR_IG_CSRF_TOKEN",
        "IG_SESSION_ID": "YOUR_IG_SESSION_ID"
      }
    }
  }
}

You can run an MCP server that lets AI assistants read and send Instagram DMs by authenticating with your Instagram session cookies and starting a Python-based server. This enables conversational automation for reading inboxes, reading conversations, sending messages, and reacting to messages through MCP clients.

How to use

You will connect an MCP client to the Instagram DMs MCP server to perform common actions. Use the MCP client to request your inbox, read a conversation with a specific user, send a reply, or add a reaction to the latest message. Start by ensuring your environment variables are set, then run the server and use the client’s functions to control DMs through simple calls like get_inbox(), get_conversation(user), send_message(user, message), and react(user, emoji). Ensure you keep cookies and tokens secure and do not expose them in logs or shared environments.

How to install

Prerequisites: Python 3.8+ and pip must be available on your system.

  1. Clone the project repository.

  2. Install Python dependencies.

  3. Run the server.

Install and run commands

git clone https://github.com/braindead-dev/instagram-dms-mcp.git
cd instagram-dms-mcp

# Build the gateway (requires Go 1.22+)
cd gateway && ./build.sh && cd ..

# Configure
cp env.example .env
# Edit .env with your cookies

# Run
pip install -r requirements.txt
python src/server.py

Additional configuration and notes

Environment variables you set control access and behavior. The MCP server reads your Instagram cookies to operate as your account. If you plan to receive notifications for new DMs, you can enable poke-based pushes by providing an API key for poke.com in the environment.

Security and reliability notes

Keep cookies and tokens secure and never share the environment file. Rotate cookies if you suspect they’ve been exposed. Do not expose the server’s logs to public networks, and limit access to trusted clients.

Tools

  • get_inbox() — See all conversations
  • get_conversation(user) — Read messages with someone
  • send_message(user, message) — Send a message
  • react(user, emoji) — React to their last message

Available tools

get_inbox

Retrieve all conversations from your Instagram DMs.

get_conversation

Fetch messages with a specific user in a conversation.

send_message

Send a text message to a specified user.

react

Add a reaction to the last message from a specified user.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational