Instagram MCP Server

Instagram MCP Server

Enables AI assistants to interact with Instagram and Facebook accounts through their APIs, supporting messaging, post management, commenting, and content creation.

Category
Visit Server

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

  1. Go to Facebook Developer Portal
  2. Create or select your app
  3. Generate a Page Access Token with these permissions:
    • pages_messaging
    • pages_manage_metadata
    • pages_read_engagement
    • instagram_basic
    • instagram_manage_messages
    • instagram_manage_comments
    • instagram_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 Facebook
  • send_reaction - React to a message

Conversations

  • get_conversations - List inbox conversations
  • get_conversation_by_user - Find conversation by user ID
  • get_conversation_messages - Get messages from a conversation

Profiles

  • get_user_profile - Get a user's profile
  • get_my_instagram_profile - Get your IG profile
  • get_my_facebook_page - Get your FB page info

Posts

  • get_posts - List your posts
  • get_instagram_post_details - Get detailed post info

Comments

  • get_post_comments - Get comments on a post
  • reply_to_comment - Reply to a comment

Content Creation

  • post_to_instagram - Create Instagram post/reel
  • post_to_facebook - Create Facebook post

Available Resources

The server also exposes these resources for easy access:

  • instagram://profile - Your Instagram profile
  • facebook://page - Your Facebook page
  • instagram://inbox - Instagram DM inbox
  • facebook://inbox - Facebook Messenger inbox
  • instagram://posts - Recent Instagram posts
  • facebook://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

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

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.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured