facebook-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@facebook-mcpget my page's latest engagement metrics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
facebook-mcp β Facebook Pages MCP Server
A local-first TypeScript Model Context Protocol (MCP) server for the Meta Graph API, focused on Facebook Pages β publishing, reading & insights, and comment/message moderation β driven from an MCP client (Claude, VS Code, the Inspectorβ¦) and operated locally by a Page admin using their own Meta developer app. Least-privilege tokens, plan-and-apply write safety, and no telemetry.
π§ Status: pre-1.0, in active development. Not yet published to npm. The foundation β HTTP client, auth, write gating, transports, tool registry β is complete and tested; 4 of the 35 planned tools are live today (the read-only
corepackage). The publishing, reading, moderation and messaging packages are next. Interfaces and scope may change until the first tagged release. See the roadmap for what lands when.
Contents: Features Β· Requirements Β· Setup Β· Configure credentials Β· Tools Β· Roadmap Β· Security notes Β· Documentation Β· Support Β· Trademark Β· License
Features
Area | Capability | Status |
Core & diagnostics | Identity, Page listing, rate-limit usage, | β Available |
Reading | Page & post reads, Reels, reactions, cursor pagination | π§ v0.2.0 |
Publishing | Text / link / photo / video / Reels posts, scheduling, edit & delete | π§ v0.2.0 |
Insights & moderation | Live-verified metrics; comment hide/unhide/delete, replies, blocking | π§ v0.3.0 |
Messaging | Conversation reads and replies within the 24-hour window | π§ v0.4.0 |
Ads | Campaign/adset/ad read + status & budget control (opt-in, off by default) | π§ v0.5.0 |
The default profile exposes a deliberately small, curated tool surface β each tool wraps a real, verified capability rather than mirroring every Graph edge.
Local-first, no telemetry. Only three Meta hosts are ever reached (
graph,graph-video,rupload); nothing phones home.Least-privilege credentials. Works with a never-expiring System User token (Business Manager) or a long-lived Page token β no App Review required for an admin operating their own assets.
Safe writes. Tiered plan-and-apply gating; irreversible and spend actions require out-of-band confirmation and are never bypassed by an env flag.
Secret hygiene. Value-based redaction at a single choke-point across logs, errors, tool results, and the write journal.
Layered architecture. Lint-enforced
core β api β mcp β toolslayering, tools-as-data with a central package registry.
Related MCP server: io.github.anthonyjbolo/mcp-fb-publisher
Requirements
Node.js β₯ 22 (enforced by
enginesand a runtime guard in the launcher; the project targets the version in.nvmrc).A Meta (Facebook) developer app β a Business-type app at Standard Access is enough; no App Review is needed to operate your own assets.
A Facebook Page (and, for the opt-in
adspackage, an ad account) you administer.
Setup
(a) From source (current)
The package is not on npm yet, so build from a clone:
git clone https://github.com/IvanBBaev/facebook-mcp.git
cd facebook-mcp
npm install
npm run build
node build/index.js # or: ./bin/facebook-mcp.mjsConfigure credentials (see below), then point your MCP client at that command.
(b) Via npx (after the first release)
Both snippets below become available after the first published release β the package is currently unpublished.
Register the server with an MCP client (Claude Desktop, VS Code Chat, the
Inspectorβ¦) by pointing its command at npx:
{
"mcpServers": {
"facebook": {
"command": "npx",
"args": ["-y", "@ivanbbaev/facebook-mcp"]
}
}
}Claude Code plugin (installs the server wired up):
/plugin marketplace add IvanBBaev/facebook-mcp
/plugin install facebook-mcpConfigure credentials
facebook-mcp authenticates with a token you already control β there is no
App Review, no OAuth callback server, and no hosted component. Provide at least
one of the token variables below; the most specific wins (FB_SYSTEM_TOKEN β
FB_ACCESS_TOKEN β FB_PAGE_TOKEN):
FB_SYSTEM_TOKENβ a never-expiring System User token (Business Manager). Recommended: it does not expire and is scoped to the assets you assign it.FB_ACCESS_TOKENβ a Meta user access token (a long-lived one preferred).FB_PAGE_TOKENβ a long-lived Page token, the no-Business-Manager fallback.
Grant only the permissions the packages you enable actually need
(least-privilege), and set FB_APP_SECRET so appsecret_proof is attached
to every call β that makes a stolen bare token unusable on its own. Settings are
read from an env file at the XDG/%APPDATA% config path, or from real
environment variables (which take precedence).
Environment variables
Provide at least one token; everything else is optional tuning. Variables marked Secret are never logged or returned by a tool.
Variable | Required | Default | Description |
| one ofΒΉ | β | Secret. Never-expiring System User token (Business Manager). Recommended. |
| one ofΒΉ | β | Secret. Meta user access token (long-lived preferred). |
| one ofΒΉ | β | Secret. Long-lived Page token β the no-Business-Manager fallback. |
| no | β | Meta app ID. With |
| no | β | Secret. Meta app secret. When set, |
| no | β | Default Page ID for Page-scoped tools when no profile is given. |
| no | β | Page ID for a named profile (e.g. |
| no | β | Secret. Optional per-profile token override. |
| no |
| Graph API version to pin. Off-default values are accepted, but only the default is tested. |
| no |
|
|
| no | β | Directory permitted as a source for local media uploads. |
| no |
| Character budget before a tool result is truncated (500β10000000). |
| no |
| Per-request timeout in milliseconds (1β600000). |
| no |
| Max parallel requests per Graph host (1β64). |
| no |
|
|
| if http | β | Secret. Bearer token required by the |
| no |
| TCP port for the |
| no |
| Comma/space-separated tool packages to enable. |
| no | β | Packages to exclude even if enabled by |
| no | β | Packages whose write tools are not registered; their read tools stay. |
| no | XDG path | Path to the append-only write journal. |
| no |
| Stderr log verbosity: |
| no | β | Ad account ID for the opt-in |
| no | β | Hard budget ceiling for ads writes, in minor currency units (non-negative integer). |
| no | β | Secret. Out-of-band confirmation token authorizing gated write / spend actions. |
ΒΉ Provide at least one of FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN or FB_PAGE_TOKEN.
Tools
The always-on core package ships four read-only tools today. The
reader, posts, insights, moderation, messages and ads packages are
on the roadmap, and this table will grow as they land.
Package | Tool | Read-only | Description |
|
| yes | Report the identity behind the configured token (type, validity, granted permissions, expiry) plus the server and pinned Graph API version. |
|
| yes | List the Pages the operator administers (via |
|
| yes | Fetch metadata for one Page β name, category, follower/fan counts, publish state and video upload limits. |
|
| yes | Report the most recent Graph rate-limit signals ( |
Roadmap
Work is tracked publicly on the facebook-mcp roadmap board and grouped into release milestones:
Milestone | Scope |
v0.1.0 β Core | Foundation + |
v0.2.0 β Reader & publishing | Post/Reels reads, publishing, scheduling, photo/video/Reels media |
v0.3.0 β Insights & moderation | Page/post/Reel insights, comment moderation, blocking |
v0.4.0 β Messaging | Conversations and message sending |
v0.5.0 β Ads | Ads read + control, opt-in and off by default |
v1.0.0 β Stable | Metadata SSOT, generated docs, release rail, npm publish |
The design behind each item is written up in advance in
docs/analysis/ β the roadmap is a consequence of
that corpus, not a replacement for it.
Security notes
Three-host fence. Only
graph.facebook.com,graph-video.facebook.comandrupload.facebook.comare ever contacted β the allowlist is fixed in code and not user-configurable, so a redirected or mistyped host cannot silently receive a token.Plan-and-apply write gating. Writes default to
plan(a non-mutating preview);applyexecutes. Irreversible and spend actions additionally require an out-of-band confirmation and are never bypassed by an env flag.Single-choke-point redaction. Secret values are stripped at one place before anything reaches logs, errors, tool results or the write journal; Page access tokens are derived to a boolean and their values never enter a payload.
No telemetry, local-first. The server logs only to
stderr, collects nothing, and phones home nowhere. Thehttptransport binds loopback (127.0.0.1) only and fails closed withoutFB_HTTP_TOKEN.
See SECURITY.md for the full model and vulnerability reporting.
Documentation
Design corpus β the full pre-implementation analysis lives in
docs/analysis/: goals & scope, market positioning, Graph API landscape, auth & security model, architecture, tool catalog, risks, roadmap, corner cases, the v1.0 release definition, and the parallel task-breakdown that drives development.Documentation site β ivanbbaev.github.io/facebook-mcp.
Support
Best-effort, single-maintainer support runs through GitHub β see SUPPORT.md for how to file bugs, feature requests and security reports.
This project is built and maintained in my own time. If it helps, a tip keeps it going:
GitHub Sponsors β one-off or recurring, no platform fee.
Ko-fi β quick one-off support (also accepts PayPal), the fallback for anyone without a GitHub account.
Donatree β every donation method on one page, including local payment options.
Donating buys no priority support and no SLA β see SUPPORT.md. If money is not an option, starring the repository or filing a good bug report helps just as much.
Trademark
This is an independent, community-built project and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. Facebook, Meta and related marks are trademarks of Meta Platforms, Inc., used here only nominatively to indicate compatibility.
License
MIT Β© 2026 Ivan Baev
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IvanBBaev/facebook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server