
连接克洛德到(只读)的远程MCP服务器.
概览
连接克洛德到(只读)的远程MCP服务器. 因此克洛德可以通过HTTPS MCP URL来称呼它们。 发布、删除、留言、评论答复或任何写作操作。 - Node.js 20+ - 一个Instagram账户(商务或创建者) - 一个带有Instagram Graph API访问功能的Meta应用 - 账户读取权限的长寿命访问符 - Instagram账户ID(IG User ID) 复制.env.example到.env并在当地填入值. 永远不要犯罪 -健康:Get [[T0] - Auth调试 (安全):Get [T1] - 配置工具调试:Get [T2] - 媒体列表调试:Get [T3] - MCP (Streamable HTTP): http://localhost:3000/mcp] 在图.instagram.
概述(AI 翻译)
连接克洛德与官方Meta Instagram Graph API(只读)的远程MCP服务器.
将Instagram的简介,介质,见解,和评论作为MCP工具在Streamable HTTP上曝光,因此克洛德可以通过HTTPS MCP URL称呼.
□ 特性
- 工具 * * 描述 * *
|-|-|-.
QQ
get_instagram_profile已连接Instagram专业账户简介 QQlist_instagram_media. . . . QQget_instagram_media特定媒体项目的详情 QQ
get_instagram_comments对媒体项目的评论(如有答复)
** 未执行(按设计):** 出版、删除、留言、评论答复或任何写作操作。
□ 要求
- 20多号节点
- Instagram 专业账户(商业或创建者)
- 一个带有Instagram Graph API访问的Meta应用程序
- 账户读取许可的长寿访问符 -Instagram账户ID([[T5])
□ 环境变量
复制[[T6]到[T7],并在当地填入值。 永远不要犯 .env。
· 变量 · 要求 · 说明 |-----------
本页由 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"
}
}
}