meta-mcp
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.
Prerequisites
Node.js 22+ (LTS recommended)
Related MCP server: Instagram Complete MCP Server
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
Variable | Required | Description |
| For Instagram | Instagram Graph API access token |
| For Instagram | Instagram Business/Creator account ID |
| For Threads | Threads API access token |
| For Threads | Threads user ID |
| For token/webhook tools | Meta App ID |
| For token/webhook tools | Meta App Secret |
Account Requirements
Platform | Account Type | Notes |
Business or Creator | Personal accounts cannot use the Graph API. Free to switch in settings | |
Threads | Any account | Instagram link no longer required since Sep 2025 |
Meta (token/webhook) | Meta Developer App | Create 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-usageheader
Tools
Meta Platform (6)
Tool | Description |
| Exchange short-lived token for long-lived token (~60 days). Requires |
| Refresh a long-lived token before expiration. Requires |
| Inspect token validity, expiration, and scopes |
| Get Meta App information |
| Subscribe to webhook notifications |
| List current webhook subscriptions |
Instagram — Publishing (6)
Tool | Description |
| Publish a photo post (supports alt_text) |
| Publish a video post |
| Publish a carousel/album (2-10 items, supports alt_text per item) |
| Publish a Reel (supports alt_text) |
| Publish a Story (24hr) |
| Check media container processing status |
Instagram — Media (5)
Tool | Description |
| List published media |
| Get media details |
| Delete a media post (requires Facebook Login) |
| Get media analytics (views, reach, saved, shares) |
| Enable/disable comments on a post |
Instagram — Comments (7)
Tool | Description |
| Get comments on a post |
| Get comment details |
| Post a comment |
| Get replies to a comment |
| Reply to a comment |
| Hide/unhide a comment |
| Delete a comment |
Instagram — Profile & Insights (5)
Tool | Description |
| Get account profile info |
| Get account-level analytics (views, reach, follower_count) |
| Look up another business account |
| Get pending collaboration invites |
| Accept or decline collaboration invites |
Instagram — Hashtags (4)
Tool | Description |
| Search hashtag by name |
| Get hashtag info |
| Get recent media for a hashtag |
| Get top media for a hashtag |
Instagram — Mentions & Tags (2)
Tool | Description |
| Get comments mentioning you |
| Get media you're tagged in |
Instagram — Messaging (4)
Tool | Description |
| List DM conversations |
| Get messages in a conversation |
| Send a DM |
| Get message details |
Threads — Publishing (8)
Tool | Description |
| Publish a text post in a single API call ( |
| Publish an image post (supports alt_text, topic tags, spoiler flag, cross-share to IG Stories) |
| Publish a video post (supports alt_text, topic tags, spoiler flag, cross-share to IG Stories) |
| Publish a carousel (2-20 items, supports alt_text per item, cross-share to IG Stories) |
| Delete a post (max 100/day) |
| Check container processing status (unpublished containers only) |
| Check remaining publishing quota (250 posts/day) |
| Repost an existing thread to your profile (requires |
Threads — Media & Search (3)
Tool | Description |
| List published posts (includes topic_tag, poll, GIF fields) |
| Get post details |
| Search public posts by keyword or tag (requires |
Threads — Replies (4)
Tool | Description |
| Get replies to a post ( |
| Reply to a post (supports image/video attachments) |
| Hide a reply |
| Unhide a reply |
Threads — Mentions (1)
Tool | Description |
| List posts where the user was @mentioned (requires |
Threads — Profile (2)
Tool | Description |
| Get Threads profile info (includes is_verified) |
| List user's threads |
Threads — Insights (2)
Tool | Description |
| Get post analytics (views, likes, replies, reposts, quotes) |
| Get account-level analytics (period: day/lifetime; |
Resources
Resource URI | Description |
| Instagram account profile data |
| Threads account profile data (includes is_verified) |
Prompts
Prompt | Description |
| Cross-post content to Instagram and Threads |
| Generate combined analytics report |
Setup Guide
Step 1: Create a Meta Developer App
Go to developers.facebook.com and log in
Click "My Apps" -> "Create App"
Select "Other" -> "Business" (or "None" for personal use)
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. No Facebook Page linking required — this uses the Instagram API with Instagram Login.
In your Meta App, go to "Instagram" -> "API setup with Instagram business login"
In the "Generate access tokens" section, click "Add account" -> log in to your Instagram account
The generated token is long-lived (~60 days) — no exchange step needed. Copy it as your
INSTAGRAM_ACCESS_TOKEN.To refresh before expiry, use the
meta_refresh_tokentool withplatform: "instagram", or:GET https://graph.instagram.com/refresh_access_token ?grant_type=ig_refresh_token &access_token=LONG_LIVED_TOKEN
Get your Instagram User ID:
GET https://graph.instagram.com/v25.0/me?fields=user_id,username&access_token=YOUR_TOKENThe
user_idis yourINSTAGRAM_USER_ID.Permissions are configured in your app's Instagram settings. Available scopes:
instagram_business_basic— required for all operationsinstagram_business_content_publish— publishing photos, reels, carouselsinstagram_business_manage_comments— reading and managing commentsinstagram_business_manage_messages— DM conversations and messaging
Step 3: Threads Setup
Works with any Threads account. Instagram link no longer required since Sep 2025.
In your Meta App, go to "Add Products" -> add "Threads API"
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
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,threads_share_to_instagram,threads_manage_mentions &response_type=codeFor local testing, use
https://localhost/as redirect URI (configure in App Settings -> Threads API -> Redirect URIs).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_CODEExchange 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_TOKENGet your Threads User ID:
GET https://graph.threads.net/v1.0/me?fields=id,username&access_token=YOUR_TOKENThe
idfield is yourTHREADS_USER_ID.
Token Renewal
Access tokens expire after ~60 days. Refresh before expiration (token must be at least 24h old):
Instagram: Use
meta_refresh_tokenwithplatform: "instagram", or call:GET https://graph.instagram.com/refresh_access_token ?grant_type=ig_refresh_token &access_token=CURRENT_LONG_LIVED_TOKENThreads: Use
meta_refresh_tokenwithplatform: "threads", 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
License
See CHANGELOG.md for release history.
Available Tools
59 toolsig_business_discoveryARead-only
Look up another Instagram Business/Creator account's public info by username.
Inputs: username (required), fields.
ig_delete_commentADestructiveIdempotent
Delete a comment from your media post. This action is irreversible.
Inputs: comment_id (required).
ig_delete_mediaADestructiveIdempotent
Delete an Instagram media post (posts, carousels, reels, stories). This action is irreversible. Requires instagram_manage_contents permission (Facebook Login only — not available with Instagram Login).
Inputs: media_id (required).
ig_get_account_insightsARead-only
Get Instagram account insights. Use the optional metric_type to control whether results come back as a single total per metric or as a daily breakdown. Note: 'impressions', 'email_contacts', 'phone_call_clicks', 'text_message_clicks', 'get_directions_clicks', 'website_clicks', 'profile_views' were deprecated in v22.0. Use 'views', 'reach', 'follower_count', 'reposts' instead.
Inputs: metric (required), period (required), since, until, +1 more.
ig_get_collaboration_invitesBRead-only
Get pending collaboration invites for the Instagram account. Added in December 2025.
Inputs: after, limit, before.
ig_get_commentARead-only
Get details of a specific comment.
Inputs: comment_id (required), fields.
ig_get_commentsBRead-only
Get comments on a specific Instagram media post.
Inputs: media_id (required), after, limit, before, +1 more.
ig_get_container_statusARead-only
Check the processing status of a media container (useful for videos).
Inputs: container_id (required).
ig_get_conversationsBRead-only
Get Instagram DM conversations list. Requires 'instagram_business_manage_messages' permission and the Instagram Messaging API.
Inputs: after, limit, before, fields, +1 more.
ig_get_hashtagBRead-only
Get hashtag information by ID.
Inputs: hashtag_id (required).
ig_get_hashtag_recentBRead-only
Get recent media tagged with a specific hashtag.
Inputs: hashtag_id (required), after, limit, before.
ig_get_hashtag_topARead-only
Get top (most popular) media tagged with a specific hashtag.
Inputs: hashtag_id (required), after, limit, before.
ig_get_mediaARead-only
Get details of a specific Instagram media post.
Inputs: media_id (required), fields.
ig_get_media_insightsARead-only
Get insights/analytics for a specific media post. Default metrics 'views,reach' are safe for every media type. Metric availability differs by media type — request more selectively to avoid (#100) errors:
IMAGE / VIDEO / CAROUSEL: views, reach, saved, total_interactions, likes, comments (note: 'shares' may return (#100) on IMAGE — test before relying on it)
REEL: views, reach, saved, total_interactions, likes, comments, shares, reposts, reels_skip_rate
STORY: views, reach, total_interactions, navigation, replies, profile_activity, profile_visits, follows Note: 'impressions' and 'video_views' were deprecated in v22.0 — use 'views' instead. See https://developers.facebook.com/docs/instagram-platform/reference/instagram-media/insights/ for the authoritative per-type matrix.
Inputs: media_id (required), metric.
ig_get_media_listBRead-only
Get list of media published on the Instagram account.
Inputs: after, limit, before.
ig_get_mentioned_commentARead-only
Get details of a specific comment where the account was @mentioned. Requires the comment_id from a mention webhook notification. Returns a single comment with its associated media.
Inputs: comment_id (required), fields.
ig_get_messageARead-only
Get details of a specific DM message.
Inputs: message_id (required), fields.
ig_get_messagesBRead-only
Get messages in a specific DM conversation.
Inputs: conversation_id (required), after, limit, before, +1 more.
ig_get_profileARead-only
Get Instagram Business/Creator account profile information.
Inputs: no named parameters.
ig_get_repliesBRead-only
Get replies to a specific comment.
Inputs: comment_id (required), after, limit, before, +1 more.
ig_get_tagged_mediaARead-only
Get media where the account is tagged (photo tags, not @mentions).
Inputs: after, limit, before, fields.
ig_hide_commentAIdempotent
Hide or unhide a comment on your post.
Inputs: hide (required), comment_id (required).
ig_post_commentB
Post a top-level comment on a media post.
Inputs: message (required), media_id (required).
ig_publish_carouselA
Publish a carousel (album) post with 2-10 images/videos. Each item needs a url (JPEG image or MP4 video) and a type (IMAGE or VIDEO).
Inputs: items (required), caption, location_id, collaborators.
ig_publish_photoA
Publish a photo to Instagram. Two-step process: creates container then publishes. Requires image_url (publicly accessible HTTPS URL).
Inputs: image_url (required), caption, alt_text, user_tags, +2 more.
ig_publish_reelB
Publish a Reel (short video). Waits for video processing.
Inputs: video_url (required), caption, cover_url, thumb_offset, +2 more.
ig_publish_storyA
Publish a Story (image or video). Stories disappear after 24 hours.
Inputs: media_url (required), media_type (required).
ig_publish_videoA
[DEPRECATED] Use ig_publish_reel instead. Publishes via media_type=REELS under the hood; the legacy VIDEO media_type was deprecated by Meta on Nov 9, 2023. Kept for backward compatibility — new integrations should use ig_publish_reel which exposes Reels-specific options (cover_url, share_to_feed).
Inputs: video_url (required), caption, location_id, thumb_offset, +1 more.
ig_reply_to_commentC
Reply to a specific comment.
Inputs: message (required), comment_id (required).
ig_respond_collaboration_inviteAIdempotent
Accept or decline a collaboration invite by media_id (the IG Media ID of the tagged post; available via the id field returned by ig_get_collaboration_invites). Pass accept: true to accept, accept: false to decline. Per the Instagram Collaboration API. Added in December 2025.
Inputs: accept (required), media_id (required).
ig_search_hashtagARead-only
Search for a hashtag ID by name. Required before querying hashtag media. Limited to 30 unique hashtags per 7-day rolling window — meta-mcp caches results in-process to maximize quota utilization on repeated lookups.
Inputs: q (required).
ig_send_messageA
Send a DM to a user. Requires 'instagram_business_manage_messages' permission. The recipient must have messaged the account first. Messaging window depends on messaging_type: RESPONSE/UPDATE allow replies within 24 hours of the user's last message; MESSAGE_TAG with tag=HUMAN_AGENT extends the window to 7 days (human-sent support replies only — the HUMAN_AGENT feature requires App Review and forbids automated use, per https://developers.facebook.com/docs/features-reference/human-agent). Other tag values are Messenger-oriented; HUMAN_AGENT is the documented reliable choice on Instagram.
Inputs: message (required), recipient_id (required), tag, messaging_type.
ig_toggle_commentsBIdempotent
Enable or disable comments on an Instagram media post.
Inputs: enabled (required), media_id (required).
meta_debug_tokenARead-only
Debug/inspect an access token to check validity, expiration, scopes and associated user.
Inputs: input_token (required).
meta_exchange_tokenA
Exchange a short-lived token for a long-lived token (valid ~60 days). Uses platform-specific endpoints: Instagram (graph.instagram.com) or Threads (graph.threads.net). Requires META_APP_SECRET. On success the new token is also applied in-memory to the running server, so subsequent tool calls use it immediately — no restart required (#65).
Inputs: platform (required), short_lived_token (required).
meta_get_app_infoARead-only
Get Meta App basic information (name, category, namespace, etc.).
Inputs: no named parameters.
meta_get_webhook_subscriptionsARead-only
List current webhook subscriptions for the Meta App.
Inputs: no named parameters.
meta_refresh_tokenA
Refresh a long-lived token before it expires (must be at least 24h old). Uses platform-specific endpoints: Instagram (graph.instagram.com) or Threads (graph.threads.net). Returns a new long-lived token valid for 60 days. On success the new token is also applied in-memory to the running server, so subsequent tool calls use it immediately — no restart required (#65).
Inputs: platform (required), long_lived_token (required).
meta_subscribe_webhookAIdempotent
Subscribe to webhook notifications for an object (e.g., 'instagram', 'page'). Requires META_APP_ID and META_APP_SECRET.
Inputs: fields (required), object (required), callback_url (required), verify_token (required).
threads_delete_postADestructiveIdempotent
Delete a Threads post. This action is irreversible. Rate limited to 100 deletions per 24 hours.
Inputs: post_id (required).
threads_get_container_statusARead-only
Check the processing status of a Threads media container. Only works with unpublished container IDs (returned from container creation endpoints) — not with published post IDs.
Inputs: container_id (required).
threads_get_mentionsARead-only
List Threads posts where the authenticated user has been @mentioned. Requires the threads_manage_mentions permission. Posts from private profiles are excluded by the API. Without advanced access approval, only mentions from designated app testers are returned.
Inputs: after, limit, since, until.
threads_get_postBRead-only
Get details of a specific Threads post.
Inputs: post_id (required), fields.
threads_get_post_insightsARead-only
Get insights/analytics for a specific Threads post (views, likes, replies, reposts, quotes, shares).
Inputs: post_id (required), metric.
threads_get_postsARead-only
Get a list of Threads posts published by the authenticated user.
Inputs: after, limit, since, until, +2 more.
threads_get_profileARead-only
Get Threads user profile information including verification status and geo-gating eligibility (is_eligible_for_geo_gating).
Inputs: no named parameters.
threads_get_publishing_limitARead-only
Check how many posts you can still publish within the current 24-hour window (max 250 posts/day).
Inputs: no named parameters.
threads_get_repliesARead-only
Get replies for a specific Threads post. By default returns only top-level replies (mode='top_level', endpoint /{post}/replies). Set mode='full_tree' to get the entire conversation flattened — every reply at every nesting level (endpoint /{post}/conversation). Both modes share the same response shape; full_tree additionally populates root_post, replied_to, is_reply so the caller can reconstruct the tree. The default fields differ by mode: top_level requests is_verified and profile_picture_url (always populated for direct replies); full_tree drops them since they are 'Only available on direct replies' per the Threads Replies/Conversations docs and would be undefined for every nested entry. Pass an explicit fields override to re-request them in full_tree if needed.
Inputs: post_id (required), mode, after, limit, +2 more.
threads_get_user_insightsARead-only
Get account-level Threads insights (views, likes, replies, reposts, quotes, clicks, followers, follower demographics). Requires period parameter.
Inputs: metric (required), since, until, period.
threads_hide_replyAIdempotent
Hide a reply on your Threads post. Hidden replies are still visible if directly accessed.
Inputs: reply_id (required).
threads_publish_carouselA
Publish a carousel post on Threads with 2-20 images/videos. Supports cross-share to Instagram Stories, geo-gating via allowlisted_country_codes, and location tagging via location_id (parent container only).
Inputs: items (required), text, topic_tag, location_id, +4 more.
threads_publish_imageA
Publish an image post on Threads. Supports topic tag, quote post, alt text, spoiler flag, cross-share to Instagram Stories, geo-gating via allowlisted_country_codes, and location tagging via location_id.
Inputs: image_url (required), text, alt_text, topic_tag, +6 more.
threads_publish_textA
Publish a text-only post on Threads. By default publishes in a single API call via auto_publish_text=true (faster and avoids the 4279009 'container not propagated' race condition). Supports optional link attachment, poll, GIF, topic tag, quote post, cross-share to Instagram Stories, geo-gating via allowlisted_country_codes, location tagging via location_id, and text_attachment for long-form content (up to 10,000 chars with optional styling and link). Only one attachment type per post — text_attachment, poll_options, link_attachment, and gif_id+gif_provider are mutually exclusive. Set auto_publish=false to fall back to the legacy two-step create-then-publish flow.
Inputs: text (required), gif_id, alt_text, topic_tag, +13 more.
threads_publish_videoA
Publish a video post on Threads. Waits for video processing. Supports topic tag, quote post, alt text, spoiler flag, cross-share to Instagram Stories, geo-gating via allowlisted_country_codes, and location tagging via location_id. Note: cross-share to IG Stories may silently fail for video posts (the Threads post still publishes).
Inputs: video_url (required), text, alt_text, topic_tag, +6 more.
threads_replyA
Reply to a Threads post or another reply. Text-only replies publish in a single API call by default (auto_publish_text=true); media replies always use the two-step create-then-publish flow. image_url and video_url are mutually exclusive — provide at most one.
Inputs: text (required), reply_to_id (required), image_url, video_url, +1 more.
threads_repostA
Repost an existing Threads post to your own profile. Reposts appear under the Reposts tab on your profile. Requires the threads_content_publish permission. Note: this is a simple repost — for quote-reposts use threads_publish_text with quote_post_id.
Inputs: post_id (required).
threads_search_locationsARead-only
Search Threads-supported locations by keyword or coordinates. Returns a list of location objects (id, name, address, city, country, latitude, longitude, postal_code) whose id can be passed as location_id to the four threads_publish_* tools to tag a post. Either q or both latitude+longitude must be provided. Requires the threads_location_tagging permission; without app approval, the endpoint restricts results to the literal query 'Menlo Park' for testing.
Inputs: q, latitude, longitude.
threads_search_postsARead-only
Search for public Threads posts by keyword or topic tag. Requires threads_keyword_search permission.
Inputs: q (required), after, limit, since, +5 more.
threads_unhide_replyAIdempotent
Unhide a previously hidden reply on your Threads post.
Inputs: reply_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 59 tools
Every tool has a distinct platform prefix (meta, ig, threads) and specific action, making purposes clear. Even overlapping tools like ig_publish_video vs ig_publish_reel are explicitly differentiated with deprecation notes. No tool names blur together.
All tools follow a consistent verb-noun pattern with platform prefixes (e.g., ig_get_media, threads_publish_text, meta_exchange_token). Verbs are predictable (get, publish, delete, reply), and there are no mixed naming conventions or vague placeholder names.
At 59 tools, this server vastly exceeds the typical 3-15 tool range and even the heavy 25+ threshold. It combines two separate platforms (Instagram and Threads) into one monolithic surface, overwhelming agents with choices. Splitting into separate per-platform servers would be more appropriate.
The surface appears remarkably complete, covering publishing, media management, comments, insights, profiles, DMs, hashtags, webhooks, token management, and even collaboration invites. Deprecated tools are properly redirected (ig_publish_video to ig_publish_reel), and no critical dead-ends are evident.
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Instagram and Facebook Pages for AI agents: publish, comments, DM by keyword, inbox, insights.
Publish and schedule Instagram posts, Reels and carousels from your AI assistant.
Social media API for AI agents: publish, DMs, comments, Meta ads and leads.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceEnables AI assistants to interact with Instagram and Facebook accounts through their APIs, supporting messaging, post management, commenting, and content creation.14-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Instagram Business accounts by automating content publishing, scheduling posts, and analyzing performance metrics. Supports posts, stories, reels, and carousels with detailed audience insights and hashtag discovery.1-
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Meta's Graph API, including profile retrieval, media publishing, insights, comments, conversations, and direct messaging.-
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Meta's Graph API. Supports retrieving profile details, media posts, and engagement insights, publishing images and videos, and reading or replying to direct messages (with Advanced Access).-