CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Mcp Instagram Dm

kynuxdev/mcp-instagram-dm
2STDIOregistry active
Summary

This server bridges Instagram Direct Messages to MCP clients using cookie-based authentication. It exposes 15 tools split across reading (get_inbox, get_thread with auto-pagination, get_pending), sending (send_message, send_link, create_thread, like_message, unsend_message), and searching (search_inbox, search_messages, search_users). You authenticate with sessionid, csrftoken, and ds_user_id cookies extracted from your browser. Reach for this when you want to triage DMs, search conversation history, or send replies without context switching from Claude Desktop or Cursor. The auto-pagination on get_thread means you can pull hundreds of messages in one call. It talks directly to Instagram's private API, so no official keys or OAuth flows required.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

📨 MCP Instagram DM

Control your Instagram DMs with AI

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

npm version npm downloads GitHub stars

CI License: MIT Node.js TypeScript MCP


A Model Context Protocol server that bridges Instagram Direct Messages with AI assistants like Claude, Cursor, and any MCP-compatible client.

Cookie-based authentication — no API keys, no OAuth, just works.


Getting Started · Features · Configuration · Tools Reference · Contributing


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


⚡ Getting Started

Get up and running in under 60 seconds:

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"
      }
    }
  }
}

2. Talk to your AI assistant:

"Read my Instagram DMs"

That's it — you're ready. 🎉

Need help getting your cookies? See Configuration below.

🎬 What It Looks Like

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!"

✨ Features

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

📥 Read & Monitor

ToolDescription
instagram_get_inboxList recent DM conversations with unread/group/muted indicators
instagram_get_threadGet messages from a conversation (auto-paginates — fetch 500+ messages at once)
instagram_get_pendingList pending DM requests waiting for your approval
instagram_user_infoGet any user's profile: bio, followers, posts, verification
instagram_thread_infoThread metadata: participants, group info, mute/archive status

✏️ Send & Manage

ToolDescription
instagram_send_messageSend a text message in any thread
instagram_send_linkShare a URL with optional caption
instagram_create_threadStart a new DM with one or multiple users
instagram_like_messageReact to any message with any emoji
instagram_unsend_messageUnsend your own messages
instagram_mark_seenMark a conversation as read
instagram_approve_pendingApprove a pending DM request

🔍 Search & Discover

ToolDescription
instagram_search_inboxSearch conversations by username or name (scans all pages)
instagram_search_messagesFind messages containing specific text within a thread
instagram_search_usersSearch Instagram users to start new conversations

📦 Installation

npx (recommended — zero install)

npx mcp-instagram-dm

npm global

npm install -g mcp-instagram-dm
mcp-instagram-dm

From source

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

🔧 Configuration

Getting Your Cookies

  1. Open instagram.com in Chrome and log in
  2. Press F12 → Application tab → Cookies → https://www.instagram.com
  3. Copy these three values:
Cookie NameEnvironment VariableDescription
sessionidINSTAGRAM_SESSION_IDYour session token
csrftokenINSTAGRAM_CSRF_TOKENCSRF protection token
ds_user_idINSTAGRAM_DS_USER_IDYour numeric user ID

💡 Tip: You can also run node get-cookies.js for a guided walkthrough.

Environment Variables

VariableRequiredDefaultDescription
INSTAGRAM_SESSION_ID✅—Your Instagram session cookie
INSTAGRAM_CSRF_TOKEN✅—CSRF token from cookies
INSTAGRAM_DS_USER_ID✅—Your numeric user ID
INSTAGRAM_RATE_LIMIT_MS—300Delay between paginated API requests (ms)

Client Setup

Claude Desktop

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"
      }
    }
  }
}
Claude Code

Add to your project's .mcp.json:

{
  "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"
      }
    }
  }
}
Cursor

Add to .cursor/mcp.json in 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"
      }
    }
  }
}

💬 Usage Examples

Just talk naturally to your AI assistant:

What you sayWhat happens
"Read my unread Instagram DMs"Fetches inbox with unread indicators
"Send 'Hey!' to @username"Finds the thread and sends the message
"Search my DMs for messages about 'meeting'"Scans thread messages for the keyword
"Start a new conversation with @johndoe"Creates a new thread and sends your message
"Show me pending DM requests and approve them"Lists and approves pending requests
"What's @user's profile info?"Fetches full profile details
"Get the last 200 messages with @friend"Auto-paginates to fetch all messages
"React with 🔥 to the last message"Sends emoji reaction to any message

📖 Tools Reference

View all 15 tools with parameters
ToolDescriptionParameters
instagram_get_inboxList DM conversationslimit?, cursor?
instagram_get_threadGet thread messages (auto-paginates)thread_id, limit?, cursor?
instagram_get_pendingList pending requestslimit?, cursor?
instagram_user_infoGet user profileuser_id
instagram_thread_infoGet thread detailsthread_id
instagram_send_messageSend text messagethread_id, text
instagram_send_linkShare a URLthread_id, url, text?
instagram_create_threadStart new DMrecipient_ids[], text
instagram_like_messageReact with emojithread_id, item_id, emoji?
instagram_unsend_messageUnsend a messagethread_id, item_id
instagram_mark_seenMark as readthread_id, item_id
instagram_approve_pendingApprove requestthread_id
instagram_search_inboxSearch conversationsquery, max_pages?
instagram_search_messagesSearch within threadthread_id, query, max_messages?
instagram_search_usersFind usersquery

🏗️ Architecture

┌─────────────────────┐     MCP (stdio)     ┌──────────────────────┐
│   AI Assistant       │◄──────────────────►│   MCP Server          │
│   (Claude, Cursor)   │                     │   src/index.ts        │
└─────────────────────┘                     │   15 tools            │
                                             └──────────┬───────────┘
                                                        │
                                             ┌──────────▼───────────┐
                                             │   Instagram Client    │
                                             │   src/instagram.ts    │
                                             │   Cookie auth + HTTP  │
                                             └──────────┬───────────┘
                                                        │
                                             ┌──────────▼───────────┐
                                             │   Instagram Web API   │
                                             │   (Private endpoints) │
                                             └──────────────────────┘

Design principles:

  • Single dependency — only @modelcontextprotocol/sdk. No axios, no puppeteer, no bloat.
  • TypeScript strict — zero any types, fully typed interfaces in src/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

🔒 Security

  • Session cookies are never logged or stored beyond runtime
  • All credentials are read from environment variables only
  • No data is sent to any third-party service
  • See SECURITY.md for reporting vulnerabilities

⚠️ Disclaimer

This project uses Instagram's unofficial web API, which may change without notice.

  • Personal use only — do not use for spam, mass messaging, or automation that violates Instagram's Terms of Service
  • Your session cookies are sensitive credentials — never share or commit them
  • This project is not affiliated with, endorsed by, or connected to Meta or Instagram
  • Use at your own risk — the authors are not responsible for any account restrictions

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for development setup and guidelines.

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

📄 License

MIT — Made with ❤️ by Kynux


If this project helped you, consider giving it a ⭐

Report Bug · Request Feature · Contribute

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Categories
Search & Web CrawlingMedia & Entertainment
Registryactive
Packagemcp-instagram-dm
TransportSTDIO
UpdatedApr 4, 2026
View on GitHub

Related Search & Web Crawling MCP Servers

View all →
Google Search

com.mcparmory/google-search

Scrape Google search results with SERP data, ads, and knowledge panels
25
Brave Search

io.github.pipeworx-io/brave-search

Brave Search MCP — independent web index (no Google/Bing dependency)
Serper Search and Scrape

marcopesani/mcp-server-serper

Serper MCP Server supporting search and webpage scraping
154
Brave Search Mcp Server

brave/brave-search-mcp-server

Brave Search MCP Server: web results, images, videos, rich results, AI summaries, and more.
1.2k
Google Search Console

com.mcparmory/google-search-console

Query search analytics, manage sitemaps, and inspect site URLs and status
25
Google Search Console

acamolese/google-search-console-mcp

Google Search Console MCP server: SEO audits, performance queries, URL inspection, indexing checks.
3