instagram_dm_mcp
by trypeggy·★ 167·综合分 45
Instagram DM MCP 服务器,支持直接消息发送、媒体共享和用户互动功能。
概述
这是一个功能完整的 MCP 服务器,将 Instagram 的消息功能与 AI 助手连接起来。它提供了发送消息(文本、照片、视频)、管理聊天、访问用户信息和处理媒体内容的全面功能。服务器包含自动会话管理以维持认证状态,并提供环境变量和命令行凭据两种选项。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您需要从 AI 代理中以编程方式与 Instagram 私信交互,特别是在社交媒体管理、客户支持自动化或内容归档方面,请选择此 MCP 服务器。
什么时候不要选它
如果您需要在不进行逆向工程的情况下通过官方 API 访问 Instagram 进行商业应用,请不要选择此服务器,因为它绕过了官方 API 并可能违反 Instagram 的服务条款。
此 server 暴露的工具
从 README 抽取出 12 个工具send_messageSend an Instagram direct message to a user by username.
send_photo_messageSend a photo as an Instagram direct message to a user by username.
send_video_messageSend a video as an Instagram direct message to a user by username.
list_chatsGet Instagram Direct Message threads from your account.
list_messagesGet messages from a specific Instagram DM thread by thread ID.
download_media_from_messageDownload direct-uploaded photo or video from a DM message.
mark_message_seenMark a specific message in an Instagram DM thread as seen.
search_threadsSearch Instagram DM threads by username or keyword.
get_user_infoGet information about a specific Instagram user by username.
get_user_id_from_usernameGet the Instagram user ID for a given username.
search_usersSearch for Instagram users by username.
get_user_postsGet recent posts from a specific Instagram user by username.
可对比工具
安装
安装步骤
- 克隆仓库:
git clone https://github.com/trypeggy/instagram_dm_mcp.git
cd instagram_dm_mcp- 使用 uv 安装依赖项:
uv sync或使用 pip:
pip install -r requirements.txt- 使用辅助脚本配置 Instagram 凭据:
python setup_env.py- 对于 Claude Desktop,添加到
claude_desktop_config.json:
{
"mcpServers": {
"instagram_dms": {
"command": "uv",
"args": [
"run",
"--directory",
"PATH/TO/instagram_dm_mcp",
"python",
"src/mcp_server.py"
]
}
}
}- 重启 Claude Desktop / Cursor。
FAQ
- 这支持 Instagram 商业账号吗?
- README 没有说明个人账号和商业账号的区别,所以只要你有有效凭据,两种账号都应该可以使用。
- 我可以在 Claude 以外的 AI 助手中使用此服务吗?
- 虽然示例显示的是 Claude Desktop 集成,但这应该可以在任何可以连接到 Python 服务器的兼容 MCP 客户端中使用。
instagram_dm_mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。