
demaalramhe/instagram-claude-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Claudeを(読み取り専用)に接続するリモートMCPサーバー.
概要
Claudeを(読み取り専用)に接続するリモートMCPサーバー。 Instagramのプロファイル、メディア、インサイト、コメントをMCPツールとして公開するので、ClaudeはHTTPS MCP URLを介してそれらを呼び出しることができます。 出版、削除、メッセージング、コメントの返信、または書き込み操作。 - Node.js 20 + - Instagramアカウント(ビジネスまたはクリエイター) - Instagram Graph APIアクセスを持つメタアプリ - アカウントの読み取り権限を持つ長期アクセストークン - InstagramアカウントID(IGユーザーID) .env.example を .env にコピーし、ローカルに値を入力します。 .env をコミットしない。 - Health: GET http://localhost:3000/health - Auth デバッグ (安全): GET [http://localhost:3000/debug-instagram-auth]] - プロファイルツールのデバッグ: GET [http://localhost:3000/debug-instagram-profile]]]] - メディアリストのデバッグ: [http://localhost:3000/debug-instagram-media]]] - MCP (Streamable HTTP): [[[T4] graph.instagramで.
概要(AI 翻訳)
Claude を 公式 メタ Instagram Graph API (read-only) に接続するリモート MCP サーバー。
Streamable HTTP* を超える MCP ツールとして、Instagram プロファイル、メディア、インサイト、コメントを公開するので、Claude は HTTPS MCP URL 経由でそれらを呼び出します。
##特徴
| ツール | 概要 |
お問い合わせ
| [get_instagram_profile | インスタグラムの専門アカウント情報 |
| 【[T1] | 最近の投稿 / リール / カルーセル |
| [get_instagram_media | 特定媒体の詳細は |
| [get_instagram_insights | 経理レベルやメディアレベルのインサイト |
| 【【[T4]】 | 媒体項目について |
**未導入(設計):**出版、削除、メッセージング、コメントの返信、または書き込み操作。
要件
- Node.js 20 +
- Instagram プロフェッショナルアカウント(ビジネスまたはクリエイター)
- Instagram Graph APIアクセスのメタアプリ -アカウントの読み取り権限を持つ長期アクセストークン
- InstagramアカウントID(
IG User ID)
環境変数
[.env.exampleを.envにコピーし、ローカルに値を入力します。 [[T8] をコミットしない。
| 変数 | 必須 | 説明 | お問い合わせ
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
instagram-claude-mcp
Remote MCP server that connects Claude to the official Meta Instagram Graph API (read-only).
Exposes Instagram profile, media, insights, and comments as MCP tools over Streamable HTTP, so Claude can call them via an HTTPS MCP URL.
Features
| Tool | Description |
|---|---|
get_instagram_profile |
Connected Instagram professional account profile |
list_instagram_media |
Recent posts / reels / carousels |
get_instagram_media |
Details for a specific media item |
get_instagram_insights |
Account-level or media-level insights |
get_instagram_comments |
Comments (and replies when available) on a media item |
Not implemented (by design): publishing, deleting, messaging, comment replies, or any write operations.
Requirements
- Node.js 20+
- An Instagram professional account (Business or Creator)
- A Meta app with Instagram Graph API access
- A long-lived access token with read permissions for the account
- The Instagram account ID (
IG User ID)
Environment variables
Copy .env.example to .env and fill in values locally. Never commit .env.
| Variable | Required | Description |
|---|---|---|
INSTAGRAM_ACCESS_TOKEN |
Yes | Instagram User access token (prefer long-lived) |
INSTAGRAM_ACCOUNT_ID |
Conditional | Optional for Instagram Login (graph.instagram.com) — IG ID is resolved from /me.user_id. Required for graph.facebook.com |
INSTAGRAM_GRAPH_API_BASE |
No* | Default https://graph.facebook.com. *Use https://graph.instagram.com for Instagram Login tokens |
INSTAGRAM_API_VERSION |
No | Default v22.0 |
INSTAGRAM_APP_SECRET |
No | App secret — only for short→long-lived token exchange |
PORT |
No | HTTP port (default 3000) |
MCP_AUTH_TOKEN |
No | If set, /mcp and /exchange-instagram-token require Authorization: Bearer |
Local development
npm install
cp .env.example .env
# Edit .env with INSTAGRAM_ACCESS_TOKEN and INSTAGRAM_ACCOUNT_ID
npm run dev
# or
npm run build && npm start
Endpoints:
- Health:
GET http://localhost:3000/health - Auth debug (safe):
GET http://localhost:3000/debug-instagram-auth - Profile tool debug:
GET http://localhost:3000/debug-instagram-profile - Media list debug:
GET http://localhost:3000/debug-instagram-media - MCP (Streamable HTTP):
http://localhost:3000/mcp
Instagram Login id vs user_id
On graph.instagram.com, GET /me returns:
id— app-scoped ID (not used for/media)user_id— Instagram professional account ID (``) used for/{user_id}/media, insights, etc.
This server resolves user_id from /me for Instagram Login and does not blindly trust INSTAGRAM_ACCOUNT_ID (which is often mistakenly set to id).
Instagram Login tokens (short vs long-lived)
- App Dashboard → Generate token: already long-lived (~60 days). Put it in
INSTAGRAM_ACCESS_TOKEN.
インストール
npx @modelcontextprotocol/inspector設定
{
"mcpServers": {
"instagram-claude-mcp": {
"url": "https://your-service.example.com/mcp"
}
}
}