
Mcp Instagram Dm
io.github.KynuxDev由 GitHub 账号 KynuxDev 发布v2.1.1更新于 Oct 24, 2026
Read, send, search & manage Instagram DMs through AI assistants. 15 tools, cookie auth.
概览
让助手使用你自己的会话 Cookie 读取、搜索、发送和管理 Instagram 私信。
- 可以做什么
- 通过 15 个工具把兼容 MCP 的助手连接到 Instagram 的私有网页 API。读取类工具可列出收件箱、自动分页获取会话消息、查看待处理的私信请求,以及获取用户或会话详情。写入类工具可发送文本或链接、创建新会话、用表情回应、撤回自己发送的消息、标记已读并批准待处理请求。搜索类工具可查找会话、会话内消息和用户。
- 适用场景
- 适合希望在桌面助手中用自然语言查看、搜索或回复 Instagram 私信,而不想打开应用的人。最适合个人、低频率使用,且愿意自行管理会话 Cookie 的用户。
- 运行要求
- 以 stdio 方式在本地运行,通常通过 npx mcp-instagram-dm 启动,因此需要 Node.js。需要从已登录的 Instagram 浏览器会话中获取三个环境变量:INSTAGRAM_SESSION_ID、INSTAGRAM_CSRF_TOKEN 和 INSTAGRAM_DS_USER_ID。可选的 INSTAGRAM_RATE_LIMIT_MS 控制分页请求间隔。仅支持桌面客户端,并且需要访问 Instagram 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Instagram Dm,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
📨 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):
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
✨ Features
15 tools across three categories — everything you need to manage your Instagram DMs:
📥 Read & Monitor
✏️ Send & Manage
🔍 Search & Discover
📦 Installation
npx (recommended — zero install)
npm global
From source
🔧 Configuration
Getting Your Cookies
- Open instagram.com in Chrome and log in
- Press
F12→ Application tab → Cookies →https://www.instagram.com - Copy these three values:
💡 Tip: You can also run
node get-cookies.jsfor a guided walkthrough.
Environment Variables
Client Setup
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Claude Code
Add to your project's .mcp.json:
Cursor
Add to .cursor/mcp.json in your project:
💬 Usage Examples
Just talk naturally to your AI assistant:
📖 Tools Reference
View all 15 tools with parameters
🏗️ Architecture
Design principles:
- Single dependency — only
@modelcontextprotocol/sdk. No axios, no puppeteer, no bloat. - TypeScript strict — zero
anytypes, 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
🔒 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
If this project helped you, consider giving it a ⭐
来源:README.md,提交 6e435f1
工具
0版本历史
1- v2.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分