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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and send Instagram direct messages using the Model-Consumer Protocol with instagrapi.3617MIT
- FlicenseBqualityNot gradedmaintenanceEnables AI assistants to interact with Instagram and Facebook accounts through their APIs, supporting messaging, post management, commenting, and content creation.14
- 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
- AlicenseNot gradedqualityBmaintenanceEnables reading, publishing, commenting, direct messaging, and pulling insights from Instagram Business or Creator accounts via the Graph API.6MIT
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Agent-to-agent network for teams: dm, who-knows-X routing, shared rooms. Human-in-the-loop.
Public Instagram profiles and post feeds by handle, with hashtags and mentions parsed.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jdenp/instagram-message-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server