Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 78
  • 3 stars
  • 340 a week
  • MIT
  • Updated

Install facebook-mcp

Built from the published package, never by AI.

claude mcp add facebook-mcp -- npx -y @ivanbaev/facebook-mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install facebook-mcp in Claude Code

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
SettingNeededWhat it is
FB_SYSTEM_TOKENEnvironment variable, secretOptionalSystem-user access token (Business Manager). Takes precedence over FB_ACCESS_TOKEN and FB_PAGE_TOKEN when several are set.
FB_ACCESS_TOKENEnvironment variable, secretOptionalPrimary user access token. At least one of FB_SYSTEM_TOKEN, FB_ACCESS_TOKEN or FB_PAGE_TOKEN must be set.
FB_PAGE_TOKENEnvironment variable, secretOptionalLong-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_APP_IDEnvironment variableOptionalMeta app ID; combined with FB_APP_SECRET it forms the app access token used to authorize /debug_token inspection.
FB_APP_SECRETEnvironment variable, secretOptionalMeta app secret. When set, appsecret_proof is attached to every call so a stolen bare token cannot be used on its own.
FB_PAGE_IDEnvironment variableOptionalDefault 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_API_VERSIONEnvironment variableOptionalGraph 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_ADS_API_VERSIONEnvironment variableOptionalMarketing 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_REQUEST_TIMEOUT_MSEnvironment variableOptionalPer-request timeout in milliseconds; integer in [1, 600000]. Default: 60000
FB_HOST_CONCURRENCYEnvironment variableOptionalMaximum number of in-flight requests per Graph host; integer in [1, 64]. Default: 4
FB_MAX_RESULT_CHARSEnvironment variableOptionalCharacter budget applied by the result shaper before a tool result is truncated; integer in [500, 10000000]. Default: 25000
FB_WRITE_MODEEnvironment variableOptionalWrite 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_CONFIRM_TOKENEnvironment variable, secretOptionalOperator 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_MEDIA_DIREnvironment variableOptionalDirectory permitted for local media uploads. Unset means URL-only uploads and no local file access at all.
FB_JOURNAL_PATHEnvironment variableOptionalPath 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_ACTIVITY_STATE_PATHEnvironment variableOptionalPath 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_EXPORT_DIREnvironment variableOptionalDirectory 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_TOOL_PACKAGESEnvironment variableOptionalComma-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_DENYEnvironment variableOptionalComma-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_PACKAGES_READONLYEnvironment variableOptionalComma-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

A

No 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 →
OpenSEO every-app
100

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.

AAA Remote 30k
SEO Skill iannuttall
94

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.

AAA Local and remote 7.3k/wk
NotFairnowork-studio
93

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.

AAA Remote 4.4k
Elmo elmohq
92

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.

AAA Remote 772
Clipwright.io seocombat
91

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.

AAC Local and remote 2.8k/wk
New-Term Radarzhuyansen
91

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.

AAA Local 2.3k

Compare with OpenSEO, SEO Skill or NotFair

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.

What are alternatives to facebook-mcp?

Similar MCP servers: OpenSEO, SEO Skill, NotFair, Elmo.

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.

facebook-mcp Install

Add to stack

Loading.