Instagram MCP Server
Instagram MCP 服务器
一个为 AI 智能体提供 Instagram 企业账户分析和洞察数据访问权限的 MCP 服务器。
工具
工具 | 描述 |
| 粉丝数、简介、媒体数量 |
| 包含点赞、评论、时间戳的近期帖子 |
| 单个帖子的深度指标(覆盖范围、保存量、分享量) |
| 粉丝人口统计(城市、国家、年龄/性别) |
| 随时间变化的覆盖范围和展示次数 |
| 按互动率排序的表现最佳帖子 |
Related MCP server: Instagram Complete MCP Server
设置
cd instagram-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install "mcp[cli]" httpx创建一个包含您凭据的 .env 文件:
INSTAGRAM_ACCESS_TOKEN=your_token
INSTAGRAM_ACCOUNT_ID=17841...获取您的 Instagram 凭据
前往 Meta for Developers 并创建一个应用(类型:Business)
将 Instagram Graph API 产品添加到您的应用中
在 Graph API Explorer (
developers.facebook.com/tools/explorer) 中:从下拉菜单中选择您的应用
点击 Generate Access Token
授予权限:
instagram_basic,instagram_manage_insights,pages_show_list,pages_read_engagement
获取您的 Instagram 企业账户 ID:
在 Graph API Explorer 中,查询:
me/accounts以获取您的页面 ID然后查询:
{page-id}?fields=instagram_business_account响应中的
id字段即为您的INSTAGRAM_ACCOUNT_ID
从 Explorer 获取的令牌是短期有效的(1 小时)。要获取长期有效的令牌:
在此处进行交换:
oauth/access_token?grant_type=fb_exchange_token&client_id={app-id}&client_secret={app-secret}&fb_exchange_token={short-lived-token}这将为您提供一个 60 天有效的令牌
注意: 您的 Instagram 账户必须是关联到 Facebook 主页的企业或创作者账户。
与 Claude Code 配合使用
claude mcp add instagram-mcp -e INSTAGRAM_ACCESS_TOKEN=your_token -e INSTAGRAM_ACCOUNT_ID=17841... -- python3 -m src.server然后询问 Claude 诸如:
“我本月表现最好的帖子是什么?”
“向我展示我的受众人口统计数据”
“哪些帖子的保存量最高?”
“我的互动率趋势如何?”
内容策略师智能体
一个独立的智能体,用于分析您的 Instagram 数据并生成包含 7 个帖子创意、文案和发布时间的每周内容计划。
运行智能体
source .venv/bin/activate
python -m agent.content_strategist需要配置 AWS 凭据(使用 Anthropic Bedrock)以及与 MCP 服务器相同的 .env 变量。该智能体将:
拉取您的账户信息、近期帖子、热门帖子和受众人口统计数据
识别表现良好内容的模式
生成包含特定文案、标签和时间的 7 天内容计划
将计划保存为 HTML 文件并在您的浏览器中打开
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Social media analytics, post insights, and competitor benchmarking for AI agents.
- ReelDropOAuthio.reeldrop
Schedule Instagram reels, manage comment-to-DM automations, and read analytics
Instagram profiles for AI agents — followers, similar accounts, keyword and location search.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to interact with Instagram Business accounts through the Graph API, supporting profile management, media publishing, insights retrieval, and direct messaging capabilities.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Instagram Business accounts by automating content publishing, scheduling posts, and analyzing performance metrics. Supports posts, stories, reels, and carousels with detailed audience insights and hashtag discovery.-
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.5913 npm12MIT
- AlicenseAqualityDmaintenanceEnables Instagram and Facebook analytics via the Meta Graph API, offering account insights, media analytics, and post engagement data.196MIT