Meta Social MCP
Enables publishing and managing organic Facebook Page and Instagram content directly through Meta's Graph API without paid third-party services.
README
Meta Social MCP
A free, self-hosted Model Context Protocol server that lets Claude (or any MCP client) publish and manage your organic Facebook Page and Instagram content directly through Meta's own Graph API — no paid third-party service in the middle.
It complements an ads connector (e.g. Pipeboard's Meta Ads MCP): use the ads connector for campaigns, and this one for organic posts, scheduling, comments and insights.
What it can do
Facebook Page
facebook_publish_post— publish a text, link, or photo post; schedule it for laterfacebook_list_posts— list recent published and scheduled postsfacebook_get_comments— read comments on a postfacebook_reply_to_comment— reply to a commentfacebook_get_insights— post- or Page-level performance
Instagram (Business/Creator)
instagram_publish_photo— single photo + captioninstagram_publish_carousel— 2–10 image carouselinstagram_publish_reel— video reelinstagram_publish_container— publish a prepared container (retry reels / schedule)instagram_list_media— recent mediainstagram_get_comments— read commentsinstagram_reply_to_comment— reply to a commentinstagram_get_insights— media- or account-level performance
Utility
meta_whoami— confirm your token, Page and IG account resolve correctly
Honest limitations (read these)
- Facebook scheduling is native (via
scheduled_publish_time, 10 min–75 days ahead). Instagram has no native scheduled-publish API — to schedule IG posts you publish at the target time (e.g. an OS cron / external scheduler that calls the publish tool, or a container created earlier and published later withinstagram_publish_container). - Instagram posting only works on a Business or Creator account linked to a Facebook Page. Personal IG accounts cannot post via the API.
- Images/videos must be at public URLs — Instagram fetches media from a URL; it does not accept direct file uploads through this API.
- Going beyond your own assets / into production requires Meta app review and business verification for the publishing permissions.
Prerequisites
- A Facebook Page you manage.
- For Instagram: an Instagram Business/Creator account linked to that Page.
- A Meta developer app and an access token with these permissions:
pages_show_listpages_read_engagementpages_manage_postspages_manage_engagement(for replying to comments)read_insightsinstagram_basicinstagram_content_publishinstagram_manage_comments/instagram_manage_insights(for IG comments/insights)
Getting a token (quick start for your own Page)
- Go to https://developers.facebook.com/apps → Create App → type Business.
- Add the Facebook Login and Instagram Graph API products.
- Open the Graph API Explorer (https://developers.facebook.com/tools/explorer), select your app, and Add permissions for the scopes listed above.
- Generate Access Token and approve the dialog. This gives a short-lived user token.
- Exchange it for a long-lived token (≈60 days):
https://graph.facebook.com/v21.0/oauth/access_token?grant_type=fb_exchange_token&client_id=APP_ID&client_secret=APP_SECRET&fb_exchange_token=SHORT_LIVED_TOKEN - Find your Page ID: open the Page → About, or call
GET /me/accounts. - Find your IG user ID:
GET /{page-id}?fields=instagram_business_account.
Put the long-lived user token in META_ACCESS_TOKEN — the server resolves the Page token
for you. (A Page token also works directly.)
Install
git clone https://github.com/<your-username>/meta-social-mcp.git
cd meta-social-mcp
pip install -r requirements.txt # or: pip install -e .
cp .env.example .env # then fill in your values
Configure
Set these as environment variables or in .env:
| Variable | Required | Description |
|---|---|---|
META_ACCESS_TOKEN |
yes | Long-lived user or Page access token |
FB_PAGE_ID |
yes* | Facebook Page ID (*required for Facebook posting) |
IG_USER_ID |
no | Instagram Business/Creator user ID |
GRAPH_API_VERSION |
no | Defaults to v21.0 |
Run / connect to Claude
Add to your MCP client config (Claude Desktop claude_desktop_config.json, or the custom
connector settings). Example stdio config:
{
"mcpServers": {
"meta-social": {
"command": "python",
"args": ["-m", "meta_social_mcp.server"],
"cwd": "/absolute/path/to/meta-social-mcp",
"env": {
"META_ACCESS_TOKEN": "EAAB...",
"FB_PAGE_ID": "1234567890",
"IG_USER_ID": "1789xxxxxxxxxx",
"GRAPH_API_VERSION": "v21.0"
}
}
}
}
Then ask Claude things like:
- "Post to my Facebook Page: 'New off-market deal just listed', schedule it for tomorrow 9am."
- "Publish this image to Instagram with a caption about our latest project."
- "Show me the comments on my last Instagram post and draft replies."
Verify it works
python -m py_compile meta_social_mcp/*.py # syntax check
python -c "from meta_social_mcp.server import mcp; print('tools ok')"
Then in your client, run meta_whoami first — it confirms the token, Page and IG account
resolve before you try to post.
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.