MCP Hub
Back to servers

meta-mcp

Enables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.

glama
Updated
Apr 4, 2026

meta-mcp

npm version License: MIT meta-mcp MCP server

Enables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.

Prerequisites

  • Node.js 22+ (LTS recommended)

Quick Start

Add to your MCP client config:

{
  "mcpServers": {
    "meta": {
      "command": "npx",
      "args": ["-y", "@exileum/meta-mcp"],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your_ig_token",
        "INSTAGRAM_USER_ID": "your_ig_user_id",
        "THREADS_ACCESS_TOKEN": "your_threads_token",
        "THREADS_USER_ID": "your_threads_user_id"
      }
    }
  }
}

Only set the variables for the platforms you use.

Manual Installation

git clone https://github.com/exileum/meta-mcp.git
cd meta-mcp
npm install
npm run build
{
  "mcpServers": {
    "meta": {
      "command": "node",
      "args": ["/path/to/meta-mcp/dist/index.js"],
      "env": {
        "INSTAGRAM_ACCESS_TOKEN": "your_ig_token",
        "INSTAGRAM_USER_ID": "your_ig_user_id",
        "THREADS_ACCESS_TOKEN": "your_threads_token",
        "THREADS_USER_ID": "your_threads_user_id"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
INSTAGRAM_ACCESS_TOKENFor InstagramInstagram Graph API access token
INSTAGRAM_USER_IDFor InstagramInstagram Business/Creator account ID
THREADS_ACCESS_TOKENFor ThreadsThreads API access token
THREADS_USER_IDFor ThreadsThreads user ID
META_APP_IDFor token/webhook toolsMeta App ID
META_APP_SECRETFor token/webhook toolsMeta App Secret

Account Requirements

PlatformAccount TypeNotes
InstagramBusiness or CreatorPersonal accounts cannot use the Graph API. Free to switch in settings
ThreadsAny accountInstagram link no longer required since Sep 2025
Meta (token/webhook)Meta Developer AppCreate at developers.facebook.com

Features

  • 57 tools across Instagram (33), Threads (18), and Meta platform (6)
  • Instagram: Publish photos/videos/reels/stories/carousels with alt text, manage comments, view insights, search hashtags, handle DMs, manage collaboration invites
  • Threads: Publish text/images/videos/carousels with polls, GIFs, topic tags, link attachments, alt text, spoiler flags; manage replies; search posts; delete posts; view insights
  • Meta: Token exchange/refresh/debug, webhook management
  • 2 resources: Instagram profile, Threads profile
  • 2 prompts: Cross-platform content publishing, analytics report
  • Rate limit tracking via x-app-usage header

Tools

Meta Platform (6)

ToolDescription
meta_exchange_tokenExchange short-lived token for long-lived token (~60 days)
meta_refresh_tokenRefresh a long-lived token before expiration
meta_debug_tokenInspect token validity, expiration, and scopes
meta_get_app_infoGet Meta App information
meta_subscribe_webhookSubscribe to webhook notifications
meta_get_webhook_subscriptionsList current webhook subscriptions

Instagram — Publishing (6)

ToolDescription
ig_publish_photoPublish a photo post (supports alt_text)
ig_publish_videoPublish a video post
ig_publish_carouselPublish a carousel/album (2-10 items, supports alt_text per item)
ig_publish_reelPublish a Reel (supports alt_text)
ig_publish_storyPublish a Story (24hr)
ig_get_container_statusCheck media container processing status

Instagram — Media (5)

ToolDescription
ig_get_media_listList published media
ig_get_mediaGet media details
ig_delete_mediaDelete a media post
ig_get_media_insightsGet media analytics (views, reach, saved, shares)
ig_toggle_commentsEnable/disable comments on a post

Instagram — Comments (7)

ToolDescription
ig_get_commentsGet comments on a post
ig_get_commentGet comment details
ig_post_commentPost a comment
ig_get_repliesGet replies to a comment
ig_reply_to_commentReply to a comment
ig_hide_commentHide/unhide a comment
ig_delete_commentDelete a comment

Instagram — Profile & Insights (5)

ToolDescription
ig_get_profileGet account profile info
ig_get_account_insightsGet account-level analytics (views, reach, follower_count)
ig_business_discoveryLook up another business account
ig_get_collaboration_invitesGet pending collaboration invites
ig_respond_collaboration_inviteAccept or decline collaboration invites

Instagram — Hashtags (4)

ToolDescription
ig_search_hashtagSearch hashtag by name
ig_get_hashtagGet hashtag info
ig_get_hashtag_recentGet recent media for a hashtag
ig_get_hashtag_topGet top media for a hashtag

Instagram — Mentions & Tags (2)

ToolDescription
ig_get_mentioned_commentsGet comments mentioning you
ig_get_tagged_mediaGet media you're tagged in

Instagram — Messaging (4)

ToolDescription
ig_get_conversationsList DM conversations
ig_get_messagesGet messages in a conversation
ig_send_messageSend a DM
ig_get_messageGet message details

Threads — Publishing (7)

ToolDescription
threads_publish_textPublish a text post (supports polls, GIFs, link attachments, topic tags, quote posts, spoiler flag)
threads_publish_imagePublish an image post (supports alt_text, topic tags, spoiler flag)
threads_publish_videoPublish a video post (supports alt_text, topic tags, spoiler flag)
threads_publish_carouselPublish a carousel (2-20 items, supports alt_text per item)
threads_delete_postDelete a post (max 100/day)
threads_get_container_statusCheck container processing status
threads_get_publishing_limitCheck remaining publishing quota (250 posts/day)

Threads — Media & Search (3)

ToolDescription
threads_get_postsList published posts (includes topic_tag, poll, GIF fields)
threads_get_postGet post details
threads_search_postsSearch public posts by keyword or topic tag

Threads — Replies (4)

ToolDescription
threads_get_repliesGet replies to a post
threads_replyReply to a post (supports image/video attachments)
threads_hide_replyHide a reply
threads_unhide_replyUnhide a reply

Threads — Profile (2)

ToolDescription
threads_get_profileGet Threads profile info (includes is_verified)
threads_get_user_threadsList user's threads

Threads — Insights (2)

ToolDescription
threads_get_post_insightsGet post analytics (views, likes, replies, reposts, quotes, clicks)
threads_get_user_insightsGet account-level analytics

Resources

Resource URIDescription
instagram://profileInstagram account profile data
threads://profileThreads account profile data (includes is_verified)

Prompts

PromptDescription
content_publishCross-post content to Instagram and Threads
analytics_reportGenerate combined analytics report

Setup Guide

Step 1: Create a Meta Developer App

  1. Go to developers.facebook.com and log in
  2. Click "My Apps" -> "Create App"
  3. Select "Other" -> "Business" (or "None" for personal use)
  4. Enter an app name and create

Your META_APP_ID and META_APP_SECRET are in App Settings -> Basic.

Step 2: Instagram Setup

Requires an Instagram Business or Creator account. Switch for free in Instagram app -> Settings -> Account type.

  1. In your Meta App, go to "Add Products" -> add "Instagram Graph API"
  2. Go to "Instagram Graph API" -> "Settings" and connect your Instagram Business account via a Facebook Page
  3. Open the Graph API Explorer
    • Select your app
    • Add permissions: instagram_basic, instagram_content_publish, instagram_manage_comments, instagram_manage_insights, instagram_manage_contents, pages_show_list, pages_read_engagement
    • Click "Generate Access Token" and authorize
  4. The generated token is short-lived (~1 hour). Exchange it for a long-lived token (~60 days):
    GET https://graph.facebook.com/v25.0/oauth/access_token
      ?grant_type=fb_exchange_token
      &client_id=YOUR_APP_ID
      &client_secret=YOUR_APP_SECRET
      &fb_exchange_token=SHORT_LIVED_TOKEN
    
    Or use the meta_exchange_token tool after setup.
  5. Get your Instagram User ID:
    GET https://graph.facebook.com/v25.0/me/accounts?access_token=YOUR_TOKEN
    
    For each page, get the linked Instagram account:
    GET https://graph.facebook.com/v25.0/{page-id}?fields=instagram_business_account&access_token=YOUR_TOKEN
    
    The instagram_business_account.id is your INSTAGRAM_USER_ID.

Step 3: Threads Setup

Works with any Threads account. Instagram link no longer required since Sep 2025.

  1. In your Meta App, go to "Add Products" -> add "Threads API"
  2. Go to "Threads API" -> "Settings":
    • Add your Threads account as a Threads Tester under "Roles"
    • Accept the invitation in the Threads app: Settings -> Account -> Website permissions -> Invites
  3. Generate an authorization URL:
    https://threads.net/oauth/authorize
      ?client_id=YOUR_APP_ID
      &redirect_uri=YOUR_REDIRECT_URI
      &scope=threads_basic,threads_content_publish,threads_manage_insights,threads_manage_replies,threads_read_replies
      &response_type=code
    
    For local testing, use https://localhost/ as redirect URI (configure in App Settings -> Threads API -> Redirect URIs).
  4. After authorization, exchange the code for an access token:
    POST https://graph.threads.net/oauth/access_token
    Content-Type: application/x-www-form-urlencoded
    
    client_id=YOUR_APP_ID
    &client_secret=YOUR_APP_SECRET
    &grant_type=authorization_code
    &redirect_uri=YOUR_REDIRECT_URI
    &code=AUTHORIZATION_CODE
    
  5. Exchange for a long-lived token (~60 days):
    GET https://graph.threads.net/access_token
      ?grant_type=th_exchange_token
      &client_secret=YOUR_APP_SECRET
      &access_token=SHORT_LIVED_TOKEN
    
  6. Get your Threads User ID:
    GET https://graph.threads.net/v1.0/me?fields=id,username&access_token=YOUR_TOKEN
    
    The id field is your THREADS_USER_ID.

Token Renewal

Access tokens expire after ~60 days. Refresh before expiration:

  • Instagram: Use meta_exchange_token with the current valid token
  • Threads: Use meta_refresh_token or call:
    GET https://graph.threads.net/refresh_access_token
      ?grant_type=th_refresh_token
      &access_token=CURRENT_LONG_LIVED_TOKEN
    

Check token status anytime with meta_debug_token.

Glama

meta-mcp MCP server

License

MIT


See CHANGELOG.md for release history.

Reviews

No reviews yet

Sign in to write a review