Facebook MCP Server
by ivanbbaevio.github.IvanBBaev/facebook-mcpv0.7.0
Facebook Pages MCP server for the Meta Graph API — publishing, insights, moderation, messaging
context tax
queued
security
queued
cold start
queued
freshness
Active13d ago
Install Facebook MCP server
Install in Claude Code
claude mcp add facebook-ivanbbaev -e FB_SYSTEM_TOKEN='<fb-system-token>' -e FB_ACCESS_TOKEN='<fb-access-token>' -e FB_PAGE_TOKEN='<fb-page-token>' -e FB_APP_SECRET='<fb-app-secret>' -e FB_CONFIRM_TOKEN='<fb-confirm-token>' -e FB_HTTP_TOKEN='<fb-http-token>' -- npx -y @ivanbaev/facebook-mcpInstall in Cursor
{
"mcpServers": {
"facebook-ivanbbaev": {
"command": "npx",
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"env": {
"FB_SYSTEM_TOKEN": "<fb-system-token>",
"FB_ACCESS_TOKEN": "<fb-access-token>",
"FB_PAGE_TOKEN": "<fb-page-token>",
"FB_APP_SECRET": "<fb-app-secret>",
"FB_CONFIRM_TOKEN": "<fb-confirm-token>",
"FB_HTTP_TOKEN": "<fb-http-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"facebook-ivanbbaev": {
"command": "npx",
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"env": {
"FB_SYSTEM_TOKEN": "<fb-system-token>",
"FB_ACCESS_TOKEN": "<fb-access-token>",
"FB_PAGE_TOKEN": "<fb-page-token>",
"FB_APP_SECRET": "<fb-app-secret>",
"FB_CONFIRM_TOKEN": "<fb-confirm-token>",
"FB_HTTP_TOKEN": "<fb-http-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"facebook-ivanbbaev": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"env": {
"FB_SYSTEM_TOKEN": "<fb-system-token>",
"FB_ACCESS_TOKEN": "<fb-access-token>",
"FB_PAGE_TOKEN": "<fb-page-token>",
"FB_APP_SECRET": "<fb-app-secret>",
"FB_CONFIRM_TOKEN": "<fb-confirm-token>",
"FB_HTTP_TOKEN": "<fb-http-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"facebook-ivanbbaev": {
"command": "npx",
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"env": {
"FB_SYSTEM_TOKEN": "<fb-system-token>",
"FB_ACCESS_TOKEN": "<fb-access-token>",
"FB_PAGE_TOKEN": "<fb-page-token>",
"FB_APP_SECRET": "<fb-app-secret>",
"FB_CONFIRM_TOKEN": "<fb-confirm-token>",
"FB_HTTP_TOKEN": "<fb-http-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| FB_SYSTEM_TOKEN | — | yes | System-user access token (Business Manager). Takes precedence over FB_ACCESS_TOKEN and FB_PAGE_TOKEN when several are set. |
| FB_ACCESS_TOKEN | — | yes | Primary user access token. At least one of FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN or FB_PAGE_TOKEN must be set. |
| FB_PAGE_TOKEN | — | yes | Long-lived Page access token used as a fallback credential when no user or system-user token is configured. |
| FB_APP_ID | — | — | Meta app ID; combined with FB_APP_SECRET it forms the app access token used to authorize /debug_token inspection. |
| FB_APP_SECRET | — | yes | Meta app secret. When set, appsecret_proof is attached to every call so a stolen bare token cannot be used on its own. |
| FB_PAGE_ID | — | — | Default Facebook Page ID, used when a tool call omits an explicit profile argument. |
| FB_API_VERSION | — | — | Graph API version to target. Defaults to the tested pinned version; other values are accepted verbatim as an escape hatch but are not tested. |
| FB_REQUEST_TIMEOUT_MS | — | — | Per-request timeout in milliseconds; integer in [1, 600000]. |
| FB_HOST_CONCURRENCY | — | — | Maximum number of in-flight requests per Graph host; integer in [1, 64]. |
| FB_MAX_RESULT_CHARS | — | — | Character budget applied by the result shaper before a tool result is truncated; integer in [500, 10000000]. |
| FB_WRITE_MODE | — | — | Write gating mode: plan (validating dry-run preview, the default) or apply. It never covers the irreversible and spend tiers, which always need a per-call apply plus a plan_id. |
| FB_CONFIRM_TOKEN | — | yes | Operator confirmation token for out-of-band approval of irreversible or spend actions. The server prompts through MCP elicitation where the client supports it; otherwise the caller passes this value as the confirm_token tool argument. |
| FB_MEDIA_DIR | — | — | Directory permitted for local media uploads. Unset means URL-only uploads and no local file access at all. |
| FB_JOURNAL_PATH | — | — | Path to the append-only write journal. Defaults to the XDG/%APPDATA% state path; the file is created owner-only (0600) and rotates by size. |
| FB_TOOL_PACKAGES | — | — | Comma-separated tool packages or profiles to expose (e.g. core,posts,reader, or the profiles core|all|reader|publisher|moderator|ads). Omit for the default profile, which excludes ads. |
| FB_PACKAGES_DENY | — | — | Comma-separated packages to exclude even when FB_TOOL_PACKAGES enables them. Deny wins over allow. |
| FB_PACKAGES_READONLY | — | — | Comma-separated packages whose write tools are not registered at all; the read tools of those packages stay available. |
| FB_TRANSPORT | — | — | Transport protocol: stdio (default) or http. The http transport binds 127.0.0.1 only and fails closed without FB_HTTP_TOKEN. |
| FB_HTTP_TOKEN | — | yes | Bearer token guarding the HTTP transport; required when FB_TRANSPORT=http (the server refuses to start without it). |
| FB_HTTP_PORT | — | — | Port for the HTTP transport (loopback only); used when FB_TRANSPORT=http. Integer in [1, 65535]. |
| FB_AD_ACCOUNT_ID | — | — | Default ad account ID (act_… or the bare numeric id) for the opt-in ads package. |
| FB_ADS_BUDGET_CEILING | — | — | Hard ceiling for any ads budget write, in minor currency units (e.g. cents). Non-negative integer; a write above it is refused. |
| FB_LOG_LEVEL | — | — | Stderr log verbosity: debug, info, warn or error. Logs never go to stdout — that is the stdio protocol channel. |
Freshness
Active — last maintenance signal 13d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-26 · 13d ago · GitHub
Latest release
2026-08-27 · 43d ago · GitHub · v0.7.0
Package published
no data · npm/PyPI
Registry entry updated
2026-08-27 · 43d ago · official registry · v0.7.0
FAQ
›How do I install the Facebook MCP server in Claude Code?
Run: claude mcp add facebook-ivanbbaev -e FB_SYSTEM_TOKEN='<fb-system-token>' -e FB_ACCESS_TOKEN='<fb-access-token>' -e FB_PAGE_TOKEN='<fb-page-token>' -e FB_APP_SECRET='<fb-app-secret>' -e FB_CONFIRM_TOKEN='<fb-confirm-token>' -e FB_HTTP_TOKEN='<fb-http-token>' -- npx -y @ivanbaev/facebook-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Facebook require an API key?
Yes. It expects FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN, FB_PAGE_TOKEN, FB_APP_SECRET, FB_CONFIRM_TOKEN, FB_HTTP_TOKEN, of which 6 are secrets.
›Can I use Facebook as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Facebook in the official MCP registry?
Yes, as io.github.IvanBBaev/facebook-mcp.
Alternatives to Facebook
Other social media MCP servers.