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.

概覽

AI 產生的概覽

以官方 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 媒體網址。
安裝前請注意
存取權杖屬敏感憑證,可透過環境變數傳入,或用 add_account 存入系統鑰匙圈或受限檔案。發佈、回覆、隱藏、刪除留言與傳送私訊都會更動線上帳號資料。私訊功能需通過 Meta 應用程式審查並開啟對應開關,且受 Instagram 24 小時訊息視窗限制。每次呼叫會在本機寫入稽核日誌。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Instagram Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

npx-style stdio MCP · Python · FastMCP · MIT

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:

bash
pip install adelaidasofia-instagram-mcp

Or from source:

bash
git clone https://github.com/adelaidasofia/instagram-mcpcd instagram-mcppython3 -m venv .venv && .venv/bin/pip install -e .

Register it with your MCP client (Claude Desktop / Claude Code) — single-account zero-config path:

json
{  "mcpServers": {    "instagram": {      "command": "instagram-mcp",      "env": {        "INSTAGRAM_MCP_ACCESS_TOKEN": "EAA...your-long-lived-token...",        "INSTAGRAM_MCP_IG_USER_ID": "17841400000000000"      }    }  }}

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:

add_account(label="brand-a", access_token="EAA...", ig_user_id="178414...", make_default=True)add_account(label="brand-b", access_token="EAA...", ig_user_id="178414...")list_media(account="brand-b")get_account_insights(account="brand-a")

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分