facebook-mcp
MCP server by IvanBBaev Community
facebook-mcp is a local-first MCP server for managing Facebook Pages through the Meta Graph API. It covers publishing, insights, comment moderation and Messenger replies. It is for developers who run their own Pages with their own Meta developer app and token.
Install facebook-mcp
Built from the published package, never by AI.
claude mcp add facebook-mcp -- npx -y @ivanbaev/facebook-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"facebook-mcp": {
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"facebook-mcp": {
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"facebook-mcp": {
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add facebook-mcp -- npx -y @ivanbaev/facebook-mcp{
"mcpServers": {
"facebook-mcp": {
"args": [
"-y",
"@ivanbaev/facebook-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add facebook-mcp npx -y @ivanbaev/facebook-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the facebook-mcp block.
About
facebook-mcp is a TypeScript Model Context Protocol server for developers who run their own Facebook Pages. It talks to the Meta Graph API through your own Meta developer app and your own token. It covers publishing, reading and insights, comment moderation and Messenger replies. Writes return a preview first by default, and the server sends no telemetry.
It works with MCP clients such as Claude Code, Claude Desktop, VS Code and Cursor. Only three Meta hosts are reached: graph, graph-video and rupload. It is not for personal profiles, Groups, Instagram, or hosted services for other people's Pages. The project is pre-1.0 and its tools are not yet verified against a live Page.
Written from the project's README and checked against it.
Tools it gives your assistant
facebook_whoamiReports the identity, token type and Page the server is connected to.PublishingCreates text, link, photo, video and Reels posts, Stories and scheduled posts.InsightsReads Page, post and Reel insights and builds a one-call Page report.ModerationReads and triages comments, replies, hides, likes, deletes and blocks.MessagingReads conversations and replies within the 24-hour messaging window.ReadingReads Pages, posts, Reels, reactions, Stories, albums and photos with cursor pagination.
What you need
- A Meta (Facebook) developer app of Business type
- A Facebook Page you administer
- Meta App ID and App Secret
- Node.js 22 or later
- An ad account, only for the opt-in ads package
| Setting | Needed | What it is |
|---|---|---|
FB_Environment variable, secret | Optional | System-user access token (Business Manager). Takes precedence over FB_ACCESS_TOKEN and FB_PAGE_TOKEN when several are set. |
FB_Environment variable, secret | Optional | Primary user access token. At least one of FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN or FB_PAGE_TOKEN must be set. |
FB_Environment variable, secret | Optional | Long-lived Page access token used as a fallback credential when no user or system-user token is configured. It belongs to exactly one Page, so set FB_PAGE_ID to that Page ID alongside it (the doctor / facebook_whoami reports it as the actin |
FB_Environment variable | Optional | Meta app ID; combined with FB_APP_SECRET it forms the app access token used to authorize /debug_token inspection. |
FB_Environment variable, secret | Optional | Meta app secret. When set, appsecret_proof is attached to every call so a stolen bare token cannot be used on its own. |
FB_Environment variable | Optional | Default Facebook Page ID, used when a tool call omits an explicit profile argument. Required when FB_PAGE_TOKEN is the only credential: it names the Page that token belongs to. |
FB_Environment variable | Optional | Graph API version to target. Defaults to the tested pinned version; other values are accepted verbatim as an escape hatch but are not tested. Default: v26.0 |
FB_Environment variable | Optional | Marketing API version the ads tools target (ad accounts, campaigns, ad sets, ads, insights, async reports). The Marketing API retires versions on its own, shorter schedule, so it is pinned separately from FB_API_VERSION. Other values are ac Default: v26.0 |
FB_Environment variable | Optional | Per-request timeout in milliseconds; integer in [1, 600000]. Default: 60000 |
FB_Environment variable | Optional | Maximum number of in-flight requests per Graph host; integer in [1, 64]. Default: 4 |
FB_Environment variable | Optional | Character budget applied by the result shaper before a tool result is truncated; integer in [500, 10000000]. Default: 25000 |
FB_Environment variable | Optional | 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. Default: plan |
FB_Environment variable, secret | Optional | 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. At le |
FB_Environment variable | Optional | Directory permitted for local media uploads. Unset means URL-only uploads and no local file access at all. |
FB_Environment variable | Optional | 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_Environment variable | Optional | Path to the small JSON file where facebook_get_activity_since keeps, per Page, the horizon of the last complete read. Defaults to the XDG/%APPDATA% state path next to the journal; the file holds Page ids and timestamps only and is written a |
FB_Environment variable | Optional | Directory where the insights tools write a CSV or JSON file when called with `output`. Defaults to `exports/` under the XDG/%APPDATA% state path. Files are written atomically and owner-only (0600) and are never overwritten; a name collision |
FB_Environment variable | Optional | 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_Environment variable | Optional | Comma-separated packages OR profiles to exclude even when FB_TOOL_PACKAGES enables them; deny wins over allow. Profile names expand here exactly as they do in FB_TOOL_PACKAGES, and a profile beats a same-spelled package, so FB_PACKAGES_DENY |
FB_Environment variable | Optional | Comma-separated packages OR profiles whose write tools are not registered at all; the read tools of those packages stay available. Profile names expand as they do in FB_TOOL_PACKAGES, so FB_PACKAGES_READONLY=core makes every default package |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Draft a post with this photo and schedule it for Friday 9:00
- Triage the unanswered comments on last week's posts.
- Give me this week's Page report.
Good to know
- Implemented but not live-verified against a real Facebook Page.
- Pre-1.0, and breaking changes to tool contracts are planned for 0.9.
- Some tools are marked experimental and may change in any minor release.
- Not for personal profiles, Groups or Instagram.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to facebook-mcp
All alternatives →Provides keyword research, site audits, rank tracking and AI visibility checks through an MCP server for AI assistants. It is aimed at people who find tools like Semrush and Ahrefs too expensive or bloated.
Analyzes Google Search Console, Google Analytics and keyword data so your AI agent can find SEO and AI search gaps. Built for SaaS and B2B teams using Claude Code, Codex, ChatGPT or Cursor.
NotFair is an open-source plugin of SEO, GEO, and marketing skills for AI agents. It also registers one hosted NotFair MCP connection that uses OAuth. It is for marketers and site owners who work with Claude Code, Codex, Cursor, Gemini CLI, and similar agents.
Connects AI clients to Elmo, an open-source platform that tracks how AI answer engines mention and cite a brand. It lets assistants read visibility data and manage tracked prompts. It is aimed at marketing, SEO, and agency teams doing answer engine optimization.
Clipwright.io turns a script or short brief into a short video, either a talking-actor ad or a faceless video. The assistant gets a free price quote before each render and receives a video URL back.
Reports new AI model, product, tool and repo names as they start to surge, with the generic search terms people use for them. Built for people who make SEO pages, newsletters or directories around new AI terms.
facebook-mcp: common questions
Does facebook-mcp need Meta App Review?
The source says no App Review is needed to operate your own assets. A Business-type app at Standard Access is enough.
Does facebook-mcp send telemetry?
No. The source says the server is local-first, sends no telemetry, and reaches only three Meta hosts.
Can facebook-mcp manage Instagram accounts?
No. The source says Instagram is covered by a separate sibling server, and personal profiles and Groups are out of scope.
How do I install facebook-mcp?
In Claude Code run claude mcp add facebook-mcp -- npx -y @ivanbaev/facebook-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is facebook-mcp the official server?
facebook-mcp is a community project by IvanBBaev, not verified by a company domain.
Is facebook-mcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is facebook-mcp safe to use?
It scores 78 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
Does facebook-mcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
