Skip to main content
Glama
Facebook MCP

Facebook MCP

by NabuxAi

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.

Related MCP server: Meta Social MCP

MCP tools

  • facebook_pages

  • facebook_page_profile

  • facebook_list_posts

  • facebook_publish_post

  • facebook_publish_link

  • facebook_publish_photo

  • facebook_list_comments

  • facebook_reply_comment

  • facebook_hide_comment

  • facebook_delete_object

  • facebook_page_insights

  • facebook_list_conversations

  • facebook_recent_messages

  • facebook_get_conversation

  • facebook_search_messages

  • facebook_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.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables analytics and management of Facebook Pages through the Meta Graph API, including posts, insights, audience, and publishing.
    GPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables reading and replying to direct messages, comments, and templates across Instagram, WhatsApp, and Messenger through official Meta Business APIs, with support for human handover and AI assistant controls.
    32 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables automating and managing Facebook Page interactions through the Graph API, including posting, comment moderation, engagement analytics, scheduling, and direct messaging from natural language.
    MIT