Instagram DM MCP 服务器
一个用于 Instagram 私信功能的 MCP(模型消费者协议)服务器,由fastmcp
和instagrapi
构建。该服务器使 AI 助手能够读取和发送 Instagram 私信。
当前版本:1.3.5
特征
- 阅读 Instagram 收件箱中最近的直接消息,其中包含全面的主题信息
- 向 Instagram 用户发送直接消息
- 简单的问候资源(示例功能)
- 带有状态信息的健康检查端点
- 正确记录到 stderr 以避免 JSON 解析问题
- 支持各种身份验证方法,包括环境变量
安装
作为 npm 包(推荐)
- 全局安装包:
- 运行安装脚本来安装 Python 依赖项:
- 使用 Claude Desktop 注册服务器并配置凭据:
系统会提示您粘贴 Instagram Cookie 信息。如果您不确定如何获取,请在 Chrome 浏览器中登录 Instagram,右键单击页面,然后选择“检查”。转到“应用程序”选项卡,然后点击左侧边栏中的“Cookie”。您应该会看到一个 Cookie 列表。复制sessionid
、 csrftoken
和ds_user_id
的值。
install
命令会自动将 Instagram DM MCP 服务器注册到 Claude Desktop,并将其添加到您的 Claude Desktop 配置文件中。该命令会将服务器配置为使用npx
方法,以便于维护。您也可以将相同的设置复制粘贴到 Claude 或任何其他 MCP 客户端。
您可以通过多种方式提供 Instagram 凭据:
- 使用命令行参数:
- 使用凭证文件:
- 使用环境变量(INSTAGRAM_SESSION_ID、INSTAGRAM_CSRF_TOKEN 和 INSTAGRAM_DS_USER_ID)
安装程序会将这些凭据作为环境变量添加到 Claude Desktop 配置文件中,创建如下配置:
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
使 AI 助手能够使用带有 instagrapi 的模型-消费者协议读取和发送 Instagram 直接消息。
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI models to interact with messages from various messaging platforms (Mobile, Mail, WhatsApp, LinkedIn, Slack, Twitter, Telegram, Instagram, Messenger) through a standardized interface.Last updated -38PythonMIT License
- -securityFlicense-qualityProvides AI agents with comprehensive Twitter functionality through the Model Context Protocol standard, enabling reading tweets, posting content, managing interactions, and accessing timeline data with robust error handling.Last updated -41JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.Last updated -874TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI models to perform function calls through Feishu/Lark messaging platform, using your personal account (no bot configuration needed) to create a full-featured AI assistant.Last updated -91Python