Back to Guides
How to Connect Instagram to ChatGPT
Connect the Instagram Graph API to ChatGPT via MCP. Analyze posts, engagement, followers, and insights with natural language using AnythingMCP.
Analyze Your Instagram with ChatGPT
Instagram has no official MCP connector. With AnythingMCP, you can convert the Instagram Graph API into an MCP server and let ChatGPT analyze your content performance, engagement, and follower demographics.
What You Need
- An Instagram Business or Creator account
- A Facebook Developer account with a Meta app
- Docker installed
- ChatGPT Desktop or any MCP-compatible AI client
Step-by-Step Guide
Step 1: Deploy AnythingMCP
git clone https://github.com/HelpCode-ai/anythingmcp.git
cd anythingmcp && docker compose up -d
Step 2: Get Instagram Graph API Access
Create a Meta app at https://developers.facebook.com. Add the Instagram Graph API product. Generate a long-lived access token with instagram_basic, instagram_manage_insights, and pages_read_engagement permissions.
Step 3: Create a REST Connector
Create a REST connector with base URL https://graph.facebook.com/v19.0. Append the access token as a query parameter or Bearer token.
Step 4: Expose Key Endpoints
GET /{ig-user-id}/media— Your postsGET /{media-id}/insights— Post engagement metricsGET /{ig-user-id}/insights— Account insights (reach, impressions)GET /{ig-user-id}— Profile info and follower countGET /{media-id}/comments— Post comments
Step 5: Connect ChatGPT
{
"mcpServers": {
"instagram": {
"url": "http://localhost:4000/mcp"
}
}
}
Step 6: Get Insights from ChatGPT
- "Which of my posts had the highest engagement this month?"
- "What's my average reach per post?"
- "How is my follower count trending?"
- "Which content type (reels, carousels, stories) performs best?"
- "Summarize my Instagram performance for the last 30 days"