Atlas / MCP servers / trypeggy / Instagram DMs

Instagram DMsSAFE

mcp/trypeggy/instagram-dms

Instagram Direct messages MCP

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
25 19r · 5w · 1d
Transport
stdio
License
MIT
Stars
183
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

This is a Model Context Protocol (MCP) server for sending instagram Direct Messages.

With this you can send Instagram Direct Messages from your account (more capabilities coming soon).

Here's an example of what you can do when it's connected to Claude.

https://github.com/user-attachments/assets/9c945f25-4484-4223-8d6b-5bf31243464c

To get updates on this and other projects we work on enter your email here

Installation

Prerequisites

  • Python 3.11+
  • Anthropic Claude Desktop app (or Cursor)
  • Pip (Python package manager), install with python -m pip install
  • An instagram account

Steps

  1. Clone this repository
git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcp
  1. Install dependencies
  • Using uv (recommended):
uv sync
  • Using Pip:
pip install -r requirements.txt
  1. Configure Instagram credentials

You have two options for providing your Instagram credentials:

Option A: Environment Variables (Recommended)

Quick Setup (Recommended):

Run the helper script:

python setup_env.py

This will interactively prompt you for your credentials and create the .env file securely.

Manual Setup:

Create a .env file in the project root:

cp env.example .env

Then edit .env with your actual credentials:

INSTAGRAM_USERNAME=your_instagram_username
INSTAGRAM_PASSWORD=your_instagram_password

Option B: Command Line Arguments

You can still pass credentials as command line arguments (less secure).

  1. Connect to the MCP server

For Claude Desktop:

Save this as claude_desktop_config.json in your Claude Desktop configuration directory at:

~/Library/Application Support/Claude/claude_desktop_config.json

**

Read from source at commit db03d4b2946eOBSERVED · 2026-10-06
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add instagram-dm-mcp --env INSTAGRAM_PASSWORD=${INSTAGRAM_PASSWORD} -- uvx instagram-dm-mcp
claude-desktop
{
  "mcpServers": {
    "instagram-dm-mcp": {
      "command": "uvx",
      "args": [
        "instagram-dm-mcp"
      ],
      "env": {
        "INSTAGRAM_PASSWORD": "${INSTAGRAM_PASSWORD}"
      }
    }
  }
}
03

Exposed tools (25)

19 read · 5 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
check_user_online_statusreadCheck the online status of Instagram users.
delete_messagedestructiveDelete a message from a direct message thread.
download_media_from_messagereadDownload media from a specific Instagram direct message and get the local file path.
download_shared_post_from_messagewriteDownload media from a shared post/reel/clip in a DM message and get the local file path.
get_thread_by_participantsreadGet an Instagram Direct Message thread by participant user IDs.
get_thread_detailsreadGet details and messages for a specific Instagram Direct Message thread by thread ID, with an optional message limit.
get_user_followersreadGet followers of an Instagram user.
get_user_followingreadGet users that an Instagram user is following.
get_user_id_from_usernamereadGet the Instagram user ID for a given username.
get_user_inforeadGet detailed information about an Instagram user.
get_user_postsreadGet recent posts from an Instagram user.
get_user_storiesreadGet Instagram stories from a user.
get_username_from_user_idreadGet the Instagram username for a given user ID.
like_mediawriteLike or unlike an Instagram post.
list_chatsreadGet Instagram Direct Message threads (chats) from the user
list_media_messagesreadList all messages containing media in an Instagram direct message thread.
list_messagesreadGet messages from a specific Instagram Direct Message thread by thread ID, with an optional limit.
list_pending_chatsreadGet Instagram Direct Message threads (chats) from the user
mark_message_seenreadMark a message as seen in a direct message thread.
mute_conversationreadMute or unmute a direct message conversation.
search_threadsreadSearch Instagram Direct Message threads by username or keyword.
search_usersreadSearch for Instagram users by name or username.
send_messagewriteSend an Instagram direct message to a user by username.
send_photo_messagewriteSend a photo via Instagram direct message to a user by username.
send_video_messagewriteSend a video via Instagram direct message to a user by username.
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (2)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_message
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
Pillow
Why it matters. 1 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-06 · audit v0.4.1 · source sha db03d4b2946efull audit observations/trust-audit/mcp-server/trypeggy__instagram-dms.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-06db03d4b2946eSAFEB89first audit
06

Questions

What is the Instagram DMs MCP server?

Instagram Direct messages MCP

What tools does Instagram DMs expose?

25 in total: 19 read-only, 5 that write, and 1 that can delete or overwrite (delete_message). Every one is listed on this page with its risk.

Is Instagram DMs safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Instagram DMs need?

It reads INSTAGRAM_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Instagram DMs run?

It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as instagram-dm-mcp.

How current is this page?

The grade is for one exact copy of the source (db03d4b2946e), read on 2026-10-06. The repository is watched and re-audited when it changes.

Advertisement