AI

aleemhaider/instagram-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

9 stars 6 forks 品質 76 トレンド 21MIT

Instagram Graph API 用の MCP サーバー — 投稿、コメント、DM、インサイトに関する 24 個のツール.

概要

Claude(または任意のMCPクライアント)をラップするモデルコンテキストプロトコルサーバーは、Instagramまたはアカウントからインサイトを読み、公開、コメント、DM、およびプルすることができます。 プロファイル/メディア、パブリッシング、コメント、DM、およびインサイト - FastMCP + httpx で構築された5つの機能領域の24ツール。 1. [https://developers.facebook.com/apps] → → ユースケース → 型に移動します。 2。 アプリダッシュボードで、製品を追加します(製品を追加 → Instagram → セットアップ)。 InstagramアカウントをFacebookにリンクするか、Instagramアカウントが必要です。 アプリのダッシュボードで、アカウントを移動してリンクします。 これらのスコープでトークンを生成します(グラフ API Explorer または Instagram API のセットアップページ)。 - instagram basic - instagram content publish - instagram manage comments - instagram manage messages - instagram manage insight - ページ show list - page read engagement - ビジネス マネジメント アプリは、アプリのロールリスト(admins/developers/testers)内のアカウントのみが認証できます。 個人的な用途に適しています.

概要(AI 翻訳)

ラップするモデルコンテキストプロトコルサーバ Instagram Graph API では、Claude (または MCP クライアント) が読み、公開、コメント、 DM、インスタグラム*BusinessまたはCreator**アカウントからインサイトをプルします。

プロファイル/メディア、出版、コメント、DM、 FastMCP + httpx で構築されたインサイト

クイックインストール

または[uvで:

セットアップ

##1. メタアプリを作成する

  1. [https://developers.facebook.com/apps→[アプリの作成**]→ユースケース**その他**→タイプ**ビジネス**に移動します。 2。 アプリダッシュボードで、Instagram製品(製品を追加 → Instagram → セットアップ)を追加します。

##2. Instagramビジネス/クリエイターアカウントのリンク

BusinessまたはCreatorに切り替えられたInstagramアカウントが必要です。 Facebookページ* アプリのダッシュボードでは、**Instagram → API のセットアップを経由して、 Facebookのログイン → ステップ1:アクセストークンを生成し、アカウントをリンクします。

##3. 必要な権限を取得する

これらのスコープでトークンを生成する (グラフ API Explorer または Instagram API で) 設定ページ:

  • [instagram_basic
  • [instagram_content_publish
  • [instagram_manage_comments
  • [instagram_manage_messages
  • [instagram_manage_insights
  • [pages_show_list

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

instagram-mcp

A Model Context Protocol server that wraps the Instagram Graph API so Claude (or any MCP client) can read, publish, comment, DM, and pull insights from an Instagram Business or Creator account.

24 tools across five capability areas — profile/media, publishing, comments, DMs, and insights — built on FastMCP + httpx.

Quick install

pip install instagram-mcp

Or with uv:

uv tool install instagram-mcp

Setup

1. Create a Meta App

  1. Go to https://developers.facebook.com/apps → Create app → use case Other → type Business.
  2. In the app dashboard, add the Instagram product (Add Product → Instagram → Set up).

You need an Instagram account switched to Business or Creator, linked to a Facebook Page. In the app dashboard, walk through Instagram → API setup with Facebook login → Step 1: Generate access tokens and link your account.

3. Get the required permissions

Generate a token with these scopes (in Graph API Explorer or the Instagram API setup page):

  • instagram_basic
  • instagram_content_publish
  • instagram_manage_comments
  • instagram_manage_messages
  • instagram_manage_insights
  • pages_show_list
  • pages_read_engagement
  • business_management

While your app is in Development mode, only accounts in your app’s Roles list (admins/developers/testers) can authenticate. That’s fine for personal use. For other users, you need App Review with Advanced Access.

4. Mint a long-lived Page token

The fastest way: run the bundled helper.

instagram-mcp-get-token

It will ask for your short-lived user token + app ID/secret, exchange it for a long-lived user token, list your linked IG accounts, and write .env for you.

Manual alternative:

# Exchange short-lived user token → long-lived (~60 days)
curl -G "https://graph.facebook.com/v21.0/oauth/access_token" \
  --data-urlencode "grant_type=fb_exchange_token" \
  --data-urlencode "client_id=YOUR_APP_ID" \
  --data-urlencode "client_secret=YOUR_APP_SECRET" \
  --data-urlencode "fb_exchange_token=SHORT_LIVED_TOKEN"

# Find your Pages and their IG accounts
curl -G "https://graph.facebook.com/v21.0/me/accounts" \
  --data-urlencode "fields=name,instagram_business_account,access_token" \
  --data-urlencode "access_token=LONG_LIVED_USER_TOKEN"

Use the Page’s access_token (never expires) and the instagram_business_account.id of the linked IG account.

5. Configure .env

IG_USER_ID=17841446575432302
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "instagram": { "command": "instagram-mcp", "env": { "IG_USER_ID": "17841446575432302", "IG_ACCESS_TOKEN": "EAAxxxxxxxxxxxxxxxxxxx" } } } }