Instagram DM MCP Server
Instagram DM MCP Server
用于发送和阅读 Instagram 私信的 MCP(Model Context Protocol)服务器。
快速开始
uv run mcp_server.py服务器通过 stdin/stdout 使用 JSON-RPC 2.0 进行通信。
Related MCP server: Instagram MCP Server
设置
将
config/config.json.template复制为config/config.json- 添加你的sessionid、可选的username和max_messages_per_thread。将
config/recipients.json.template复制为config/recipients.json- 包含 Instagram 用户名及可选别名的列表。.json文件已被 Git 忽略;.template文件作为指南被跟踪。
工具
send_dm(recipient, message)
向指定收件人发送私信。
参数:
recipient(必填) - 接收私信的 Instagram 用户名message(必填) - 要发送的消息文本
read_dm(recipient, max_messages=10)
读取指定收件人会话线程中的最近 N 条消息。
参数:
recipient(必填) - 要读取其私信的 Instagram 用户名max_messages(可选) - 每个线程的最大消息数(如果省略,则使用配置中的max_messages_per_thread)
list_recipients()
列出所有已配置的收件人及其别名。智能体应使用此工具来发现可以向谁发送消息。
参数: 无
配置
字段 | 默认值 | 描述 |
| (必填) | 你的 Instagram 会话 ID |
|
| 你的 Instagram 用户名(可选) |
|
| 使用 send_dm 时发送的消息 |
|
| 每个线程最多读取的消息数 |
只能向 recipients.json 中的收件人发送消息。请勿直接修改脚本。
收件人别名
在 recipients.json 中,每个条目都可以包含一个供智能体使用的 alias 字段:
[
{
"username": "john_doe",
"alias": "John Doe"
}
]别名是可选的 - 如果省略,则使用用户名。使用 list_recipients 工具查看所有已配置的别名。也支持纯字符串条目(向后兼容):
["john_doe", "jane_smith"]This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram, WhatsApp and Messenger DMs through official Meta Business APIs.
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Manage your Instagram in chat: stats, comments, DMs, publishing and scheduling after you approve.
- cloziqOAuthcom.cloziq
Create your offers and launch AI Instagram DM sales agents from any MCP client, over OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, send, and manage Instagram direct messages, including viewing conversations, sending DMs to users, reacting to messages, and searching for users by username.10-
- FlicenseBqualityDmaintenanceEnables AI agents to control Instagram accounts programmatically, supporting profile management, media interaction, direct messaging, and follower management.132-
- FlicenseAqualityCmaintenanceEnables agents to interact with Instagram through 49 tools for direct messages, feed, profiles, search, and persona discovery, with write actions disabled by default until explicitly enabled.449-
- AlicenseNot gradedqualityBmaintenanceEnables reading and replying to direct messages, comments, and templates across Instagram, WhatsApp, and Messenger through official Meta Business APIs, with support for human handover and AI assistant controls.22 npmMIT