Skip to main content
Glama
jdenp

Instagram DM MCP Server

by jdenp

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

设置

  1. config/config.json.template 复制为 config/config.json - 添加你的 sessionid、可选的 usernamemax_messages_per_thread

  2. config/recipients.json.template 复制为 config/recipients.json - 包含 Instagram 用户名及可选别名的列表。

  3. .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()

列出所有已配置的收件人及其别名。智能体应使用此工具来发现可以向谁发送消息。

参数:

配置

字段

默认值

描述

sessionid

(必填)

你的 Instagram 会话 ID

username

""

你的 Instagram 用户名(可选)

message_text

"test"

使用 send_dm 时发送的消息

max_messages_per_thread

10

每个线程最多读取的消息数

只能recipients.json 中的收件人发送消息。请勿直接修改脚本。

收件人别名

recipients.json 中,每个条目都可以包含一个供智能体使用的 alias 字段:

[
    {
        "username": "john_doe",
        "alias": "John Doe"
    }
]

别名是可选的 - 如果省略,则使用用户名。使用 list_recipients 工具查看所有已配置的别名。也支持纯字符串条目(向后兼容):

["john_doe", "jane_smith"]
F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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