Instagram MCP Server
Enables AI assistants to interact with Instagram and Facebook accounts through their APIs, supporting messaging, post management, commenting, and content creation.
README
Instagram MCP Server
An MCP (Model Context Protocol) server for interacting with Instagram and Facebook APIs. This server enables AI assistants to send messages, view posts, manage comments, and interact with your Instagram/Facebook accounts.
Features
Messaging
- Send text messages on Instagram and Facebook Messenger
- Send media (images, videos, audio)
- React to messages
- Human agent tag support for extended messaging windows
Inbox / Conversations
- List all conversations
- Get messages from specific conversations
- Find conversations by user ID
Profile
- Get your Instagram business profile
- Get your Facebook page info
- Look up user profiles
Posts
- View your Instagram posts and reels
- View your Facebook page posts
- Get detailed post information including carousel items
Comments
- View comments on posts
- Reply to comments
Content Creation
- Post images to Instagram
- Post videos/reels to Instagram
- Post to Facebook (text, links, photos)
Installation
cd instagram-mcp-server
npm install
npm run build
Configuration
Create a .env file based on .env.example:
cp .env.example .env
Required environment variables:
| Variable | Description |
|---|---|
FB_PAGE_ID |
Your Facebook Page ID |
FB_PAGE_ACCESS_TOKEN |
Page Access Token with required permissions |
IG_ACCOUNT_ID |
(Optional) Instagram Business Account ID |
FB_API_VERSION |
(Optional) Graph API version (default: v24.0) |
Getting Your Access Token
- Go to Facebook Developer Portal
- Create or select your app
- Generate a Page Access Token with these permissions:
pages_messagingpages_manage_metadatapages_read_engagementinstagram_basicinstagram_manage_messagesinstagram_manage_commentsinstagram_content_publish
Usage with Claude Code
Add to your Claude Code MCP settings (~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"instagram": {
"command": "node",
"args": ["/path/to/instagram-mcp-server/dist/index.js"],
"env": {
"FB_PAGE_ID": "your_page_id",
"FB_PAGE_ACCESS_TOKEN": "your_access_token",
"IG_ACCOUNT_ID": "your_ig_account_id"
}
}
}
}
Or if using environment file:
{
"mcpServers": {
"instagram": {
"command": "node",
"args": ["/path/to/instagram-mcp-server/dist/index.js"],
"cwd": "/path/to/instagram-mcp-server"
}
}
}
Available Tools
Messaging
send_message- Send text/media message to Instagram or Facebooksend_reaction- React to a message
Conversations
get_conversations- List inbox conversationsget_conversation_by_user- Find conversation by user IDget_conversation_messages- Get messages from a conversation
Profiles
get_user_profile- Get a user's profileget_my_instagram_profile- Get your IG profileget_my_facebook_page- Get your FB page info
Posts
get_posts- List your postsget_instagram_post_details- Get detailed post info
Comments
get_post_comments- Get comments on a postreply_to_comment- Reply to a comment
Content Creation
post_to_instagram- Create Instagram post/reelpost_to_facebook- Create Facebook post
Available Resources
The server also exposes these resources for easy access:
instagram://profile- Your Instagram profilefacebook://page- Your Facebook pageinstagram://inbox- Instagram DM inboxfacebook://inbox- Facebook Messenger inboxinstagram://posts- Recent Instagram postsfacebook://posts- Recent Facebook posts
Development
# Run in development mode
npm run dev
# Build
npm run build
# Run built version
npm start
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.