Instagram DM Server for AI Assistants

by KynuxDev

269 downloads
Not rated
GitHub

About

Read, send, search, and manage Instagram Direct Messages through AI assistants via MCP. 15 tools including inbox, send, search, react, and thread management. Cookie-based auth, single dependency, TypeScript strict, auto-pagination.

Details

Author
KynuxDev
Downloads
269
Categories
Communication, Other, Automation

- Read inbox, threads, and pending requests
- Send text messages and share links
- Create new threads with one or multiple users
- Like messages with any emoji
- Unsend your own messages and mark conversations seen
- Approve pending DM requests
- Search inbox by username, messages by text, and Instagram users
- Auto‑pagination for 500+ messages with rate limiting
- Single dependency: @modelcontextprotocol/sdk

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Instagram DM Server for AI Assistants
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Run npx mcp-instagram-dm after copying three cookies from Chrome DevTools. Add the cookies to your MCP configuration—setup takes about 60 seconds.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "instagram dm server for ai assistants": {
            "instagram": {
                "command": "npx",
                "args": [
                    "-y",
                    "mcp-instagram-dm"
                ],
                "env": {
                    "INSTAGRAM_SESSION_ID": "your_session_id",
                    "INSTAGRAM_CSRF_TOKEN": "your_csrf_token",
                    "INSTAGRAM_DS_USER_ID": "your_user_id"
                }
            }
        }
    }
}

McpServers

{
    "instagram": {
        "command": "npx",
        "args": [
            "-y",
            "mcp-instagram-dm"
        ],
        "env": {
            "INSTAGRAM_SESSION_ID": "your_session_id",
            "INSTAGRAM_CSRF_TOKEN": "your_csrf_token",
            "INSTAGRAM_DS_USER_ID": "your_user_id"
        }
    }
}

Read, send, search, and manage Instagram Direct Messages through natural language with any MCP-compatible AI assistant.

AModel Context Protocolserver that bridges Instagram Direct Messages with AI assistants likeClaude,Cursor, and any MCP-compatible client.

Getting Started·Features·Configuration·Tools Reference·Contributing

💡 If you find this useful, please consider giving it a ⭐ — it helps others discover the project!

1. Add to your MCP config(Claude Desktop, Claude Code, or Cursor):

{ "mcpServers": { "instagram": { "command": "npx", "args": ["-y", "mcp-instagram-dm"], "env": { "INSTAGRAM_SESSION_ID": "your_session_id", "INSTAGRAM_CSRF_TOKEN": "your_csrf_token", "INSTAGRAM_DS_USER_ID": "your_user_id" } } } }
You: "Show me my unread Instagram DMs" Claude: Fetching your inbox... 📬 Inbox (3 conversations) [UNREAD] john_doe (thread_id: 340282366841710300...) Last: [2026-03-29 14:23:01] john_doe: Hey, are you free tonight? [UNREAD] [GROUP] project_team (thread_id: 340282366841710301...) Last: [2026-03-29 13:45:22] alice: Meeting moved to 3pm jane_smith (thread_id: 340282366841710302...) Last: [2026-03-29 10:12:45] You: Thanks! See you then You: "Reply to john_doe: Yeah, let's meet at 7!" Claude: ✅ Message sent: "Yeah, let's meet at 7!"

15 toolsacross three categories — everything you need to manage your Instagram DMs:

npm install -g mcp-instagram-dm mcp-instagram-dm
git clone https://github.com/KynuxDev/mcp-instagram-dm.git cd mcp-instagram-dm npm install && npm run build node dist/index.js

Edit~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows):

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

Add to.cursor/mcp.jsonin your project:

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

Just talk naturally to your AI assistant:

- Single dependency— only@modelcontextprotocol/sdk. No axios, no puppeteer, no bloat.
- TypeScript strict— zeroanytypes, fully typed interfaces insrc/types.ts
- Auto-pagination— request 500 messages and the server handles the rest with rate limiting
- 14+ message types— text, media, voice, reels, links, clips, GIFs, posts, stories, and more

This project uses Instagram'sunofficialweb API, which may change without notice.

Contributions are welcome! Please seeCONTRIBUTING.mdfor development setup and guidelines.

If you'd like to support the project financially, considersponsoring on GitHub.

If this project helped you, consider giving it a ⭐

Report Bug·Request Feature·Contribute

Schedule and queue text, image, and video posts to many social networks, including LinkedIn, X, Bluesky, Instagram, Facebook, Threads, Tiktok.

MCP server for AgentHive, the microblogging social network for AI agents. Post, reply, boost, follow, search, and discover agents.

Manage your X (Twitter) account using the Apex social media infrastructure. Requires an Apex API Key.

AI-powered social media posting across 14 platforms with per-platform content adaptation, scheduling, and 30-day calendar generation

Post to the Bluesky social network using the AT Protocol.

Access the BlueSky social network data via its official API.

An MCP server for Bluesky that provides tools to interact with the ATProtocol.

An MCP server for interacting with Discord.

Integrates with the HeyReach API for LinkedIn automation and outreach management.

Interact with Instagram Business accounts using the Instagram Graph API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.