# mcp-instagram-dm [Health: Active]

**Category:** 🌐 Social Media  
**Repository:** https://github.com/KynuxDev/mcp-instagram-dm  
**GitHub Stars:** 4  
**npm Downloads (last month):** 387  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-instagram-dm

## Description
Read, send, search & manage Instagram DMs through AI assistants. 15 tools, cookie auth.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-instagram-dm": {
    "command": "npx",
    "args": ["-y","mcp-instagram-dm"],
    "env": {
      "INSTAGRAM_SESSION_ID": "",
      "INSTAGRAM_CSRF_TOKEN": "",
      "INSTAGRAM_DS_USER_ID": ""
    }
  }
}
```

**Requires environment variables:** `INSTAGRAM_SESSION_ID`, `INSTAGRAM_CSRF_TOKEN`, `INSTAGRAM_DS_USER_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-instagram-dm does

The mcp-instagram-dm MCP server exposes Instagram Direct Message operations as MCP tools for AI clients. It covers inbox reading, thread inspection, message retrieval, message sending, conversation search, user lookup, and several thread-management actions.

The 15 tools are divided into three practical areas:

- Reading and monitoring: list inbox conversations, retrieve thread messages, inspect pending requests, look up a user profile, and view thread metadata.
- Sending and managing: send text or links, create a conversation, react to a message with an emoji, unsend your own message, mark a thread as seen, and approve a pending request.
- Searching: find conversations by username or name, search messages within a thread, and search Instagram users.

Thread retrieval supports pagination and can automatically request additional pages. Inbox and search operations also expose pagination-related options where applicable.

## How it works

The mcp-instagram-dm MCP server runs locally as a Node.js process and communicates with the selected AI client through MCP. The documented launch methods use `npx -y mcp-instagram-dm`, a globally installed npm package, or a locally built `dist/index.js` entry point.

Authentication uses three values copied from an active Instagram browser session: the `sessionid`, `csrftoken`, and `ds_user_id` cookies. These are passed to the process as environment variables.

After configuration, requests can be expressed through the assistant in natural language. For example, a client can use the available tools to list unread conversations, locate a thread, search its messages, or send a reply. The tools themselves accept identifiers and operation-specific fields such as `thread_id`, `user_id`, message text, URLs, recipient IDs, and emoji values.

## Setup and configuration

Node.js 18 or newer is required. The recommended installation is to add the package as an npx command in the MCP client configuration. Global npm installation and building from the GitHub source are also documented options.

Set these required variables:

- `INSTAGRAM_SESSION_ID`: the Instagram session cookie.
- `INSTAGRAM_CSRF_TOKEN`: the CSRF token cookie.
- `INSTAGRAM_DS_USER_ID`: the numeric Instagram user ID.

`INSTAGRAM_RATE_LIMIT_MS` is optional and defaults to `300`; it controls the delay between paginated API requests. The README provides configuration examples for Claude Desktop, Claude Code, and Cursor. Cookie values can be copied from Instagram in Chrome through Developer Tools, the Application tab, and the site’s cookie list. A repository script named `get-cookies.js` is also mentioned as a guided option.

## Tools and capabilities

The mcp-instagram-dm MCP server includes tools for both read and write operations. Read operations can list conversations, show pending requests, retrieve profile data, inspect group or mute state, and fetch messages. Write operations can send text, share a URL with an optional caption, start a conversation with one or more recipients, react, unsend, mark seen, or approve a request.

Search tools cover inbox conversations, messages in a specific thread, and Instagram users. The documented thread tool can retrieve large message histories through automatic pagination.

## Limitations and notes

Authentication depends on Instagram cookie values, so the required session data must be supplied to the MCP process and kept protected. Its documented runtime is Node.js 18 or newer, and the available operations are limited to the listed Instagram DM, profile, thread, and user-search tools.

The rate-delay setting applies to paginated API requests; it is not described as a general Instagram quota-management system. The repository documents stdio-style setup through client configuration rather than a hosted service endpoint.

_Full upstream README: https://allmcps.com/mcp/mcp-instagram-dm/readme_

