Community source release (MIT). Self-host using your own credentials. No NabuxAI production accounts or hosted-service access are included.
Facebook MCP by Nabux
Multi-user, multi-Page MCP gateway powered by Meta's official Facebook Graph API and Messenger Platform.
Production target: https://fb.nabuxai.com
MCP endpoint: https://fb.nabuxai.com/mcp
Meta webhook: https://fb.nabuxai.com/webhook
Architecture
Facebook Login -> managed Pages discovery -> encrypted Page tokens
|
+-> /mcp -> ChatGPT / Claude / Cursor
+-> /webhook -> Messenger events -> SQLite
+-> /internal/v1 -> trusted Nabux services
No Facebook password automation, cookie/session scraping or browser bots are used.
MCP tools
facebook_pagesfacebook_page_profilefacebook_list_postsfacebook_publish_postfacebook_publish_linkfacebook_publish_photofacebook_list_commentsfacebook_reply_commentfacebook_hide_commentfacebook_delete_objectfacebook_page_insightsfacebook_list_conversationsfacebook_recent_messagesfacebook_get_conversationfacebook_search_messagesfacebook_send_message
Messenger webhook events are stored only for Pages connected to a Nabux owner. MCP account resolution is owner-scoped.
Meta setup
Configure Facebook Login and request only permissions your product actually needs. Default gateway scopes:
pages_show_list
pages_read_engagement
pages_manage_posts
pages_manage_engagement
pages_manage_metadata
pages_messaging
read_insights
OAuth redirect URI:
https://fb.nabuxai.com/facebook/callback
Webhook callback:
https://fb.nabuxai.com/webhook
Subscribe the app/Page to fields used by the gateway, currently messages, messaging_postbacks, and feed, and use the same verify token configured as FB_WEBHOOK_VERIFY_TOKEN.
Coolify
Deploy docker-compose.coolify.yml from branch feature/facebook-mcp-gateway and route fb.nabuxai.com to port 8000.
Required secrets/config:
PUBLIC_BASE_URL=https://fb.nabuxai.com
APP_SECRET_KEY=<32+ random chars>
FB_APP_ID=<Meta app id>
FB_APP_SECRET=<Meta app secret>
FB_REDIRECT_URI=https://fb.nabuxai.com/facebook/callback
FB_WEBHOOK_VERIFY_TOKEN=<random verify token>
INTERNAL_SERVICE_TOKEN=<random service token>
Meta/Page access tokens are encrypted at rest with a key derived from APP_SECRET_KEY; MCP bearer tokens are stored hashed.
Data collection
The gateway stores Messenger events delivered after the Page webhook is active. It is not an archive scraper for arbitrary personal Facebook history. Search tools operate on the connected Page's webhook-backed data plus live Graph API data.
Status
Code is deployment-shaped. Real E2E requires a Meta app, approved/available Page permissions, HTTPS/DNS, at least one Page managed by the authorizing user, and webhook configuration in the Meta dashboard.