原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Instagram MCP

作者:mcpware版本 1.0.4i★ 74i在你的电脑上运行
注册名称io.github.mcpware/instagram-mcp

安装

概览

作者提供的说明(英文原文)

Instagram MCP — 23 tools for Instagram Graph API: posts, DMs, stories, reels, analytics.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 营销与社交媒体
  • 你需要填写:INSTAGRAM_ACCESS_TOKEN, INSTAGRAM_ACCOUNT_ID

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:3 项中通过 3 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: INSTAGRAM_ACCESS_TOKEN, INSTAGRAM_ACCOUNT_ID, INSTAGRAM_API_VERSION

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "instagram": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpware/instagram-mcp"
      ],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your-value",
        "INSTAGRAM_ACCOUNT_ID": "your-value",
        "INSTAGRAM_API_VERSION": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add instagram --env INSTAGRAM_ACCESS_TOKEN=your-value --env INSTAGRAM_ACCOUNT_ID=your-value --env INSTAGRAM_API_VERSION=your-value -- npx -y @mcpware/instagram-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "instagram": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpware/instagram-mcp"
      ],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your-value",
        "INSTAGRAM_ACCOUNT_ID": "your-value",
        "INSTAGRAM_API_VERSION": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "instagram": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mcpware/instagram-mcp"
      ],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your-value",
        "INSTAGRAM_ACCOUNT_ID": "your-value",
        "INSTAGRAM_API_VERSION": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • INSTAGRAM_ACCESS_TOKEN 机密 必填 env
    Meta long-lived access token for Instagram Graph API
  • INSTAGRAM_ACCOUNT_ID 必填 env
    Instagram business account ID
  • INSTAGRAM_API_VERSION env
    Instagram Graph API version (default: v19.0)

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 mcpware 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于2个月前

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“营销与社交媒体”中的其他服务器比较i

  • 星标数多于此分类中其他 2985 个服务器的 100%
  • 发布到注册中心的时间比此分类中其他 2985 个服务器的 4% 更新
  • 基础检查结果等于或优于此分类中其他 2985 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Instagram MCP 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:INSTAGRAM_ACCESS_TOKEN, INSTAGRAM_ACCOUNT_ID

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于2个月前,最新版本(1.0.4)于8个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

MCP YouTube Transcript

作者:jkawamoto

An MCP server retrieving transcripts of YouTube videos

在你的电脑上运行★ 495MIT10天前更新
安装

Google Analytics MCP

作者:surendranb

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

在你的电脑上运行★ 244MIT10天前更新
安装

AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.

在云端运行★ 137MIT10天前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

@mcpware/instagram-mcp

A Model Context Protocol (MCP) server that provides seamless integration with Instagram's Graph API, enabling AI applications to interact with Instagram Business accounts programmatically.

Features

🔧 Tools (Model-controlled)
  • Get Profile Info: Retrieve Instagram business profile details
  • Get Media Posts: Fetch recent posts from an Instagram account
  • Get Media Insights: Retrieve engagement metrics for specific posts
  • Publish Media: Upload and publish images/videos to Instagram
  • Get Account Pages: List Facebook pages connected to the account
  • Get Conversations: List Instagram DM conversations (requires Advanced Access)
  • Get Conversation Messages: Read messages from specific conversations (requires Advanced Access)
  • Send DM: Reply to Instagram direct messages (requires Advanced Access)
📊 Resources (Application-controlled)
  • Profile Data: Access to profile information including follower counts, bio, etc.
  • Media Feed: Recent posts with engagement metrics
  • Insights Data: Detailed analytics for posts and account performance
💬 Prompts (User-controlled)
  • Analyze Engagement: Pre-built prompt for analyzing post performance
  • Content Strategy: Template for generating content recommendations
  • Hashtag Analysis: Prompt for hashtag performance evaluation

Prerequisites

  1. Instagram Business Account: Must be connected to a Facebook Page
  2. Facebook Developer Account: Required for API access
  3. Access Token: Long-lived access token with appropriate permissions
  4. Python 3.10+: For running the MCP server (required by MCP dependencies)
Required Instagram API Permissions

Standard Access (available immediately):

  • instagram_basic
  • instagram_content_publish
  • instagram_manage_insights
  • instagram_manage_comments
  • pages_show_list
  • pages_read_engagement
  • pages_manage_metadata
  • pages_read_user_content
  • business_management

Advanced Access (requires Meta App Review):

  • instagram_manage_messages - Required for Direct Messaging features

⚠️ Instagram DM Features: Reading and sending Instagram direct messages requires Advanced Access approval from Meta. See INSTAGRAM_DM_SETUP.md for the App Review process.

🔑 How to Get Instagram API Credentials

📖 Quick Start: See AUTHENTICATION_GUIDE.md for a 5-minute setup guide!

This section provides a step-by-step guide to obtain the necessary credentials for the Instagram MCP server.

Step 1: Set Up Instagram Business Account
  1. Convert to Business Account (if not already):
  • Open Instagram app → Settings → Account → Switch to Professional Account
  • Choose "Business" → Select a category → Complete setup
  1. Connect to Facebook Page:
  • Go to Instagram Settings → Account → Linked Accounts → Facebook
  • Connect to an existing Facebook Page or create a new one
  • Important: The Facebook Page must be owned by you
Step 2: Create Facebook App
  1. Go to Facebook Developers:
  1. Create New App:
  • Click "Create App" → Choose "Business" → Click "Next"
  • Fill in app details:
  • App Name: Choose a descriptive name (e.g., "My Instagram MCP Server")
  • App Contact Email: Your email address
  • Click "Create App"
  1. Add Instagram Basic Display Product:
  • In your app dashboard, click "Add Product"
  • Find "Instagram Basic Display" → Click "Set Up"
  1. Configure Instagram Basic Display:
  • Go to Instagram Basic Display → Basic Display
  • Click "Create New App" in the Instagram App section
  • Accept the terms and create the app
Step 3: Get App Credentials
  1. Get App ID and Secret:
  • In your Facebook app dashboard, go to Settings → Basic
  • Copy your App ID and App Secret
  • Important: Keep the App Secret secure and never share it publicly
Step 4: Set Up Instagram Business API Access
  1. Add Instagram Graph API Product:
  • In your app dashboard, click "Add Product"
  • Find "Instagram Graph API" → Click "Set Up"
  1. Configure Permissions:
  • Go to Instagram Graph API → Permissions
  • Request the following permissions:
  • instagram_basic
  • instagram_content_publish
  • instagram_manage_insights
  • pages_show_list
  • pages_read_engagement
Step 5: Generate Access Token
Option A: Using Facebook Graph API Explorer (Recommended for Testing)
  1. Go to Graph API Explorer:
  1. Configure Explorer:
  • Select your app from the dropdown
  • Click "Generate Access Token"
  • Select required permissions when prompted
  1. Get Page Access Token:
  • In the explorer, make a GET request to: /me/accounts
  • Find your Facebook Page in the response
  • Copy the access_token for your page
  1. Get Instagram Business Account ID:
  • Use the page access token to make a GET request to: /{page-id}?fields=instagram_business_account
  • Copy the Instagram Business Account ID from the response
Option B: Using Facebook Login Flow (Recommended for Production)
  1. Set Up Facebook Login:
  • In your app dashboard, add "Facebook Login" product
  • Configure Valid OAuth Redirect URIs
  1. Implement OAuth Flow:
   # Example OAuth URL

oauth_url = f"https://www.facebook.com/v19.0/dialog/oauth?client_id={app_id}&redirect_uri={redirect_uri}&scope=pages_show_list,instagram_basic,instagram_content_publish,instagram_manage_insights"

  1. Exchange Code for Token:
   # Exchange authorization code for access token

token_url = f"https://graph.facebook.com/v19.0/oauth/access_token?client_id={app_id}&redirect_uri={redirect_uri}&client_secret={app_secret}&code={auth_code}"

Step 6: Get Long-Lived Access Token

Short-lived tokens expire in 1 hour. Convert to long-lived token (60 days):

curl -X GET "https://graph.facebook.com/v19.0/oauth/access_token?grant_type=fb_exchange_token&client_id={app_id}&client_secret={app_secret}&fb_exchange_token={short_lived_token}"
Step 7: Set Up Environment Variables

Create a .env file in your project root:

# Facebook App Credentials

FACEBOOK_APP_ID=your_app_id_here FACEBOOK_APP_SECRET=your_app_secret_here

Instagram Access Token (long-lived)

INSTAGRAM_ACCESS_TOKEN=your_long_lived_access_token_here

Instagram Business Account ID

INSTAGRAM_BUSINESS_ACCOUNT_ID=your_instagram_business_account_id_here

Optional: API Configuration

INSTAGRAM_API_VERSION=v19.0 RATE_LIMIT_REQUESTS_PER_HOUR=200 CACHE_ENABLED=true LOG_LEVEL=INFO

Step 8: Test Your Setup

Run the validation script to test your credentials:

python scripts/setup.py

Or test manually:

import os

import requests

Test access token

access_token = os.getenv('INSTAGRAM_ACCESS_TOKEN') response = requests.get(f'https://graph.facebook.com/v19.0/me?access_token={access_token}') print(response.json())

🚨 Important Security Notes
  1. Never commit credentials to version control
  2. Use environment variables or secure secret management
  3. Regularly rotate access tokens
  4. Monitor token expiration dates
  5. Use HTTPS only in production
  6. Implement proper error handling for expired tokens
🔄 Token Refresh Strategy

Long-lived tokens expire after 60 days. Implement automatic refresh:

# Check token validity

def check_token_validity(access_token): url = f"https://graph.facebook.com/v19.0/me?access_token={access_token}" response = requests.get(url) return response.status_code == 200

Refresh token before expiration

def refresh_long_lived_token(access_token, app_id, app_secret): url = f"https://graph.facebook.com/v19.0/oauth/access_token" params = { 'grant_type': 'fb_exchange_token', 'client_id': app_id, 'client_secret': app_secret, 'fb_exchange_token': access_token } response = requests.get(url, params=params) return response.json().get('access_token')

📋 Troubleshooting Common Issues

Error: "Invalid OAuth access token"

  • Check if token has expired
  • Verify token has required permissions
  • Ensure Instagram account is connected to Facebook Page

Error: "Instagram account not found"

  • Verify Instagram Business Account ID is correct
  • Check if Instagram account is properly linked to Facebook Page
  • Ensure account is a Business account, not Personal

Error: "Insufficient permissions"

  • Review required permissions in Facebook App
  • Re-generate access token with correct scopes
  • Check if app is in Development vs Live mode

Rate Limiting Issues

  • Implement exponential backoff
  • Cache responses when possible
  • Monitor rate limit headers in API responses

Installation

  1. Clone the repository:
git clone <repository-url>

cd ig-mcp

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env

Edit .env with your Instagram API credentials

  1. Configure the MCP server:
# Edit config.json with your specific settings

Configuration

Environment Variables (.env)
INSTAGRAM_ACCESS_TOKEN=your_long_lived_access_token

FACEBOOK_APP_ID=your_facebook_app_id FACEBOOK_APP_SECRET=your_facebook_app_secret INSTAGRAM_BUSINESS_ACCOUNT_ID=your_instagram_business_account_id

MCP Client Configuration

Add this to your MCP client configuration (e.g., Claude Desktop):

{

"mcpServers": { "instagram": { "command": "python", "args": ["/path/to/ig-mcp/src/instagram_mcp_server.py"], "env": { "INSTAGRAM_ACCESS_TOKEN": "your_access_token" } } } }

Usage Examples

Using with Claude Desktop
  1. Get Profile Information:
Can you get my Instagram profile information?
  1. Analyze Recent Posts:
Show me my last 5 Instagram posts and their engagement metrics
  1. Publish Content:
Upload this image to my Instagram account with the caption "Beautiful sunset! #photography #nature"
Using with Python MCP Client
from mcp import ClientSession, StdioServerParameters

from mcp.client.stdio import stdio_client

Connect to the Instagram MCP server

server_params = StdioServerParameters( command="python", args=["src/instagram_mcp_server.py"] )

async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize()

Get profile information

result = await session.call_tool("get_profile_info", {}) print(result)

API Endpoints Covered

Profile Management
  • Get business profile information
  • Update profile details (future feature)
Media Management
  • Retrieve recent posts
  • Get specific media

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx