
Instagram Mcp
io.github.adelaidasofia由 GitHub 账号 adelaidasofia 发布v0.1.2更新于 Oct 24, 2026
Official, multi-account Instagram Graph API MCP: read, publish, analytics, comments, DMs.
概览
基于官方 Instagram Graph API 的本地 MCP 服务器,让助手读取、发布、评论并分析 Business 或 Creator 账号。
- 可以做什么
- 管理账号:健康检查、列出、添加、设为默认、移除账号,查看账号信息
- 读取主页与媒体:主页资料、媒体列表、单条媒体
- 获取数据洞察:账号触达与曝光、单帖指标、粉丝人群画像
- 发布图片、视频、Reels、轮播和快拍,并查询 24 小时剩余发布额度
- 处理评论:列出、回复、隐藏和删除评论
- 发现内容:话题标签搜索、标签下媒体、提及,以及按用户名查看公开专业账号
- 适用场景
- 适合让助手通过官方 API 运营或汇报 Instagram Business/Creator 账号:发布内容、回复评论、拉取触达、互动和受众数据,并可同时管理多个品牌或客户账号。
- 运行要求
- 以 Python 包形式在本地通过 stdio 运行,需要 Python 3.10 及以上。需要与 Facebook 主页关联的 Instagram 专业账号、具备 basic、content publish、comments 和 insights 权限的长期 Graph API 访问令牌,以及数字形式的 Instagram Business 账号 id。令牌和 id 可通过 INSTAGRAM_MCP_ACCESS_TOKEN 与 INSTAGRAM_MCP_IG_USER_ID 提供,也可在运行时用 add_account 添加。发布需要可公开访问的 https 媒体链接。
安装
在 SourceWeft 中
- 打开 控制台中的 Instagram Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
instagram-mcp
An MCP server for the official Instagram Graph API. Read, publish, comment, and pull analytics across one or many Instagram Business/Creator accounts from Claude (or any MCP client) — ToS-safe, no private/reverse-engineered API.
29 tools across accounts, media, publishing, insights, comments, discovery, and (review-gated) direct messages.
Why this one
Most "Instagram automation" tools either (a) wrap the unofficial private API (username + password) — which violates Instagram's Terms and risks a ban — or (b) only post, with no way to read insights, comments, or mentions back. This server is built entirely on the official Graph API, is multi-account from day one, and covers the full read + write surface. The only thing it cannot do without Meta's approval is DMs (see Direct messages).
Requirements
- An Instagram Professional account (Business or Creator). Personal accounts cannot use the Graph API. Converting is free and reversible (Instagram app → Settings → Account type).
- The Instagram account connected to a Facebook Page.
- A long-lived access token with
instagram_basic+instagram_content_publish+instagram_manage_comments+instagram_manage_insights, and the account's numeric Instagram Business Account id. See SETUP.md for the exact token + id steps. - Python 3.10+.
Install
From PyPI:
Or from source:
Register it with your MCP client (Claude Desktop / Claude Code) — single-account zero-config path:
instagram-mcp is the console script the package installs. From a source checkout it lives at .venv/bin/instagram-mcp, or run the module directly with python -m instagram_mcp.server.
Or skip the env vars and call add_account at runtime (token goes to your OS keychain). See Multiple accounts.
Tools
Accounts & health — healthcheck, list_accounts, add_account, set_default_account, remove_account, account_info
Profile & media — get_profile, list_media, get_media
Insights — get_account_insights (reach, impressions, profile views, follower count), get_media_insights (per-post reach, saves, shares, interactions), get_audience_insights (follower demographics: age, gender, country, city)
Publishing — publish_image, publish_video, publish_reel, publish_carousel (2–10 images), publish_story, publishing_limit (remaining 24h quota). Video/reel containers process asynchronously; the server polls to completion before publishing.
Comments — get_comments, reply_to_comment, hide_comment, delete_comment
Discovery — search_hashtag, get_hashtag_media, get_mentions, business_discovery (read any public Professional account by username)
Direct messages — list_conversations, get_messages, send_message (see below)
Publishing takes public https media URLs — Instagram fetches the bytes itself, so the image/video must be reachable on the open web (an S3/Cloudflare/any-CDN URL works).
Multiple accounts
Run one server for all your accounts (yours, a brand's, a client's). Each account authorizes its own token:
Tokens are stored in the macOS keychain (or a chmod 600 file on other platforms), never in the metadata file and never returned by any tool. Omit account on any tool to use the default.
Direct messages
The DM tools require the instagram_manage_messages permission, which Meta grants only through App Review (typically weeks, and stricter in 2025–2026). Until then, the DM tools fail loud with that instruction rather than silently no-op. Once your app is approved and the token carries the scope, set INSTAGRAM_MCP_DM_ENABLED=1. Note Instagram's 24-hour standard-messaging window applies.
Full App Review walkthrough (screencast shot list, reviewer test-instructions template, privacy-policy + business-verification requirements, post-approval flip, message-tag caveat): docs/APP_REVIEW.md.
Safety
- Egress is pinned to the Meta host allow-list (
graph.facebook.com/graph.instagram.com). A general SSRF guard (RFC1918 / loopback / link-local / CGNAT / cloud-metadata, fail-closed DNS) backs any URL handling. - Credentials never leak: every result and error passes a scrubber that strips access tokens (incl. Meta
EAA…/IGQV…), bearer headers, app secrets, and API keys before it reaches the model. - Observability: every call appends a 4-field JSONL audit line (
execution_time_ms,io,token_usage,error_class) under~/.claude/instagram-mcp/audit.log.jsonl. - Input validation runs before every Graph call (ids, caption length, hashtag/username charset, https media URLs).
License
MIT — see LICENSE.
Built by Adelaida Diaz-Roa. Full install or team version at diazroa.com.
来源:README.md,提交 e800006
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分