An MCP server that integrates with Instagram's Graph API to enable AI-driven management of Instagram Business accounts. It provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages.
What is Instagram?
Instagram is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that integrates with instagram's graph api to enable ai-driven management of instagram business accounts. it provides tools for fetching profile data, publishing media, analyzing engagement...
An MCP server that integrates with Instagram's Graph API to enable AI-driven management of Instagram Business accounts. It provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages.
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server that integrates with Instagram's Graph API to
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx instagram-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Instagram
Instagram MCP Server integrates with Instagram's Graph API to give AI assistants management capabilities over Instagram Business accounts, including media publishing, engagement analytics, profile data retrieval, and direct message management. It requires a Facebook Developer App and a long-lived Instagram access token, and exposes eight core tools covering the full content lifecycle from upload to performance analysis. Social media managers and marketing teams can use it to automate posting workflows, analyze engagement trends, and respond to messages through natural language.
Prerequisites
- Python 3.8+ installed
- An Instagram Business or Creator account linked to a Facebook Page
- A Facebook Developer App at developers.facebook.com with Instagram Graph API enabled
- A long-lived Instagram access token (valid for 60 days, must be refreshed)
- Your Instagram Business Account ID from the Graph API
Clone the repository and install dependencies
Clone the ig-mcp repository and install the Python dependencies using pip.
git clone https://github.com/jlbadano/ig-mcp.git
cd ig-mcp
pip install -r requirements.txtSet up your Facebook Developer App
Create an app at developers.facebook.com, add the Instagram Graph API product, and configure the following OAuth permissions: instagram_basic, instagram_content_publish, instagram_manage_insights, instagram_manage_comments, pages_show_list, pages_read_engagement, pages_manage_metadata.
Obtain a long-lived access token
Generate a short-lived token via the Graph API Explorer, then exchange it for a long-lived token (60-day validity). Note your Instagram Business Account ID from the token debug info.
# Exchange short-lived for long-lived token:
curl -X GET "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&fb_exchange_token=SHORT_LIVED_TOKEN"Configure environment variables
Copy the example env file and fill in your credentials. Never commit .env to version control.
cp .env.example .env
# Edit .env with your values:
# INSTAGRAM_ACCESS_TOKEN=your-long-lived-token
# FACEBOOK_APP_ID=your-app-id
# FACEBOOK_APP_SECRET=your-app-secret
# INSTAGRAM_BUSINESS_ACCOUNT_ID=your-business-account-id
# INSTAGRAM_API_VERSION=v19.0Configure Claude Desktop
Add the Instagram MCP server to your claude_desktop_config.json. The server reads credentials from the .env file in the project directory.
{
"mcpServers": {
"instagram": {
"command": "python",
"args": ["/path/to/ig-mcp/server.py"],
"env": {
"INSTAGRAM_ACCESS_TOKEN": "your-long-lived-token",
"FACEBOOK_APP_ID": "your-app-id",
"FACEBOOK_APP_SECRET": "your-app-secret",
"INSTAGRAM_BUSINESS_ACCOUNT_ID": "your-business-account-id"
}
}
}
}Restart Claude Desktop and test
Restart Claude Desktop to load the server. Test by asking Claude to retrieve your Instagram profile or list recent posts.
Instagram Examples
Client configuration
Claude Desktop configuration for the Instagram MCP server with all required credentials as environment variables. Replace all placeholder values with your actual credentials.
{
"mcpServers": {
"instagram": {
"command": "python",
"args": ["/path/to/ig-mcp/server.py"],
"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-ig-business-account-id",
"INSTAGRAM_API_VERSION": "v19.0"
}
}
}
}Prompts to try
Example prompts for managing an Instagram Business account through Claude.
- "Fetch my last 10 Instagram posts and rank them by engagement rate (likes + comments / reach)."
- "Analyze my recent posts and suggest the best times to post based on when my top-performing content was published."
- "Publish a new image post to my Instagram Business account with the image URL 'https://example.com/image.jpg' and caption 'New product launch! #newproduct'."Troubleshooting Instagram
Access token returns '190: Invalid OAuth access token'
Long-lived tokens expire after 60 days. Refresh the token using the Graph API: GET https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token with your current token. Set up a reminder to refresh every 50 days to avoid expiration.
DM tools fail with 'permission denied' or 'requires Advanced Access'
Direct message features (instagram_manage_messages) require your Facebook app to go through Meta App Review and be granted Advanced Access. Standard Development Mode access is insufficient for production DM management.
Media publish fails with 'media not found' or container creation error
Instagram requires images to be hosted at a publicly accessible HTTPS URL. Ensure your image URL is publicly reachable and not behind authentication. Video content requires additional creation steps (create container, wait for processing, then publish).
Frequently Asked Questions about Instagram
What is Instagram?
Instagram is a Model Context Protocol (MCP) server that mcp server that integrates with instagram's graph api to enable ai-driven management of instagram business accounts. it provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Instagram?
Follow the installation instructions on the Instagram GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Instagram?
Instagram works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Instagram free to use?
Yes, Instagram is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Instagram Alternatives — Similar Communication Servers
Looking for alternatives to Instagram? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
Browse More Communication MCP Servers
Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Instagram in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Instagram?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.