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 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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to interact with Instagram Business accounts through the Graph API, supporting profile management, media publishing, insights retrieval, and direct messaging capabilities.MIT
- 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.
- FlicenseBqualityDmaintenanceEnables AI agents to control Instagram accounts programmatically, supporting profile management, media interaction, direct messaging, and follower management.132
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Boost posts and launch community growth campaigns from your AI assistant. OAuth, credit-billed.
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/exileum/meta-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server