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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。