Facebook Pages MCP server for the Meta Graph API — publishing, insights, moderation, messaging
To add facebook-mcp to Claude, run the install command below or copy the ready-made config for Claude Code, Claude Desktop, Cursor and VS Code further down. Restart your client after adding it and its tools show up in your next conversation. It needs 27 environment variables, listed below.
Install
npx -y @ivanbaev/facebook-mcp@0.8.0Environment variables
FB_SYSTEM_TOKENSet in your MCP configFB_ACCESS_TOKENSet in your MCP configFB_PAGE_TOKENSet in your MCP configFB_APP_IDSet in your MCP configFB_APP_SECRETSet in your MCP configFB_PAGE_IDSet in your MCP configFB_API_VERSIONSet in your MCP configFB_ADS_API_VERSIONSet in your MCP configFB_REQUEST_TIMEOUT_MSSet in your MCP configFB_HOST_CONCURRENCYSet in your MCP configFB_MAX_RESULT_CHARSSet in your MCP configFB_WRITE_MODESet in your MCP configFB_CONFIRM_TOKENSet in your MCP configFB_MEDIA_DIRSet in your MCP configFB_JOURNAL_PATHSet in your MCP configFB_ACTIVITY_STATE_PATHSet in your MCP configFB_EXPORT_DIRSet in your MCP configFB_TOOL_PACKAGESSet in your MCP configFB_PACKAGES_DENYSet in your MCP configFB_PACKAGES_READONLYSet in your MCP configFB_TRANSPORTSet in your MCP configFB_HTTP_TOKENSet in your MCP configFB_HTTP_PORTSet in your MCP configFB_AD_ACCOUNT_IDSet in your MCP configFB_ADS_BUDGET_CEILINGSet in your MCP configFB_ADS_CAMPAIGN_SPEND_CAP_MAXSet in your MCP configFB_LOG_LEVELSet in your MCP configInstall with your client
claude mcp add facebook --env FB_SYSTEM_TOKEN=<YOUR_FB_SYSTEM_TOKEN> --env FB_ACCESS_TOKEN=<YOUR_FB_ACCESS_TOKEN> --env FB_PAGE_TOKEN=<YOUR_FB_PAGE_TOKEN> --env FB_APP_ID=<YOUR_FB_APP_ID> --env FB_APP_SECRET=<YOUR_FB_APP_SECRET> --env FB_PAGE_ID=<YOUR_FB_PAGE_ID> --env FB_API_VERSION=<YOUR_FB_API_VERSION> --env FB_ADS_API_VERSION=<YOUR_FB_ADS_API_VERSION> --env FB_REQUEST_TIMEOUT_MS=<YOUR_FB_REQUEST_TIMEOUT_MS> --env FB_HOST_CONCURRENCY=<YOUR_FB_HOST_CONCURRENCY> --env FB_MAX_RESULT_CHARS=<YOUR_FB_MAX_RESULT_CHARS> --env FB_WRITE_MODE=<YOUR_FB_WRITE_MODE> --env FB_CONFIRM_TOKEN=<YOUR_FB_CONFIRM_TOKEN> --env FB_MEDIA_DIR=<YOUR_FB_MEDIA_DIR> --env FB_JOURNAL_PATH=<YOUR_FB_JOURNAL_PATH> --env FB_ACTIVITY_STATE_PATH=<YOUR_FB_ACTIVITY_STATE_PATH> --env FB_EXPORT_DIR=<YOUR_FB_EXPORT_DIR> --env FB_TOOL_PACKAGES=<YOUR_FB_TOOL_PACKAGES> --env FB_PACKAGES_DENY=<YOUR_FB_PACKAGES_DENY> --env FB_PACKAGES_READONLY=<YOUR_FB_PACKAGES_READONLY> --env FB_TRANSPORT=<YOUR_FB_TRANSPORT> --env FB_HTTP_TOKEN=<YOUR_FB_HTTP_TOKEN> --env FB_HTTP_PORT=<YOUR_FB_HTTP_PORT> --env FB_AD_ACCOUNT_ID=<YOUR_FB_AD_ACCOUNT_ID> --env FB_ADS_BUDGET_CEILING=<YOUR_FB_ADS_BUDGET_CEILING> --env FB_ADS_CAMPAIGN_SPEND_CAP_MAX=<YOUR_FB_ADS_CAMPAIGN_SPEND_CAP_MAX> --env FB_LOG_LEVEL=<YOUR_FB_LOG_LEVEL> -- npx -y @ivanbaev/facebook-mcp@0.8.0
Run this in a terminal to add the server to Claude Code.
What this does
facebook-mcp exposes a set of tools to Claude over the Model Context Protocol. After you add it to claude_desktop_config.json (snippet above) and restart Claude Desktop, those tools become callable inside any conversation.
Requirements
This server needs the following environment variables to be set before it can run:
FB_SYSTEM_TOKEN FB_ACCESS_TOKEN FB_PAGE_TOKEN FB_APP_ID FB_APP_SECRET FB_PAGE_ID FB_API_VERSION FB_ADS_API_VERSION FB_REQUEST_TIMEOUT_MS FB_HOST_CONCURRENCY FB_MAX_RESULT_CHARS FB_WRITE_MODE FB_CONFIRM_TOKEN FB_MEDIA_DIR FB_JOURNAL_PATH FB_ACTIVITY_STATE_PATH FB_EXPORT_DIR FB_TOOL_PACKAGES FB_PACKAGES_DENY FB_PACKAGES_READONLY FB_TRANSPORT FB_HTTP_TOKEN FB_HTTP_PORT FB_AD_ACCOUNT_ID FB_ADS_BUDGET_CEILING FB_ADS_CAMPAIGN_SPEND_CAP_MAX FB_LOG_LEVEL
Set these via the env object in your MCP config (see claude_desktop_config.json snippet above).
Frequently asked questions
How do I install facebook-mcp?
Run the Claude Code command in the install section to add facebook-mcp to Claude Code, or copy the ready-made config for your client from the install section on this page. Restart your client afterwards and the tools appear in your next conversation.
Which clients work with facebook-mcp?
This page carries setup and config for Claude Code, Claude Desktop, Cursor and VS Code. Any other MCP client that accepts a standard server config can connect to facebook-mcp as well.
Does facebook-mcp need an API key?
Yes. Before it can run, set these environment variables: FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN, FB_PAGE_TOKEN, FB_APP_ID, FB_APP_SECRET, FB_PAGE_ID, FB_API_VERSION, FB_ADS_API_VERSION, FB_REQUEST_TIMEOUT_MS, FB_HOST_CONCURRENCY, FB_MAX_RESULT_CHARS, FB_WRITE_MODE, FB_CONFIRM_TOKEN, FB_MEDIA_DIR, FB_JOURNAL_PATH, FB_ACTIVITY_STATE_PATH, FB_EXPORT_DIR, FB_TOOL_PACKAGES, FB_PACKAGES_DENY, FB_PACKAGES_READONLY, FB_TRANSPORT, FB_HTTP_TOKEN, FB_HTTP_PORT, FB_AD_ACCOUNT_ID, FB_ADS_BUDGET_CEILING, FB_ADS_CAMPAIGN_SPEND_CAP_MAX, FB_LOG_LEVEL. They go in the env block of your MCP config.
Imported from the Official MCP Registry. The details above come from the registry entry; the maker can claim this listing to correct them, add docs, and see its traffic.
Is this your MCP server?
Claim this listing to see its traffic, fix details yourself, and skip the review queue on future updates.
Add this badge to your README
Show visitors this server is listed in the ClaudeRules directory. The badge links straight to this listing.
[](https://clauderules.net/mcp/io-github-ivanbbaev-facebook-mcp)<a href="https://clauderules.net/mcp/io-github-ivanbbaev-facebook-mcp" target="_blank" rel="noopener noreferrer"><img src="https://clauderules.net/api/badge/io-github-ivanbbaev-facebook-mcp" alt="Listed on clauderules.net" /></a>More API MCP servers
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
Figma-Context-MCP
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
