Safe Facebook Pages publishing with brand-voice, image-required & anti-duplication checks.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
An MCP server that lets Claude (or any MCP-compatible LLM) safely publish posts to multiple Facebook Pages through the Meta Graph API, with built-in guardrails: brand-voice config, banned-topic blocklists, image-required enforcement, and anti-duplication checks across recent feed posts.
Letting an LLM agent post directly to your Facebook Pages is a footgun unless you put guardrails in front. Common failure modes I have hit running 5+ pages:
mcp-fb-publisher ships an MCP server that wraps the Meta Graph API behind 4 deterministic tools, all driven by a single config.yaml. Every publish call goes through validation by default. Validation is pure-Python (no LLM), reproducible in CI, and runs offline.
4 MCP tools:
| Tool | What it does |
|---|---|
fb_publish_post | Publishes (or schedules) a post on a configured page. Runs full validation by default; pass skip_validation=True to bypass. |
fb_validate_pre_publish | Dry-run all guardrails. Returns `verdict: go |
fb_anti_duplicate_check | Compares a candidate message against the page's recent posts using Jaccard similarity over word 4-grams. |
fb_generate_post_with_image | Generates an image via OpenAI (gpt-image-1) or fal.ai (flux-pro) and returns a URL ready for fb_publish_post. |
Add to your claude_desktop_config.json:
Then ask Claude things like:
"Post on the marketing page: 'New collection drops Friday'. Generate an image first, validate, then publish."
Claude will call fb_generate_post_with_image β fb_validate_pre_publish β fb_publish_post.
The split between generation, validation and publish is intentional: it lets the LLM iterate on the visual without burning Meta API quota, and it makes the guardrails inspectable in CI without a Meta account.
We compare the candidate message against every post within anti_duplicate_lookback_days (per-page, default 14) using Jaccard similarity over word 4-grams:
similarity = |A β© B| / |A βͺ B|similarity >= similarity_threshold (default 0.5), block.Why this and not embeddings: deterministic, free, no extra API key, fast enough for 50 candidates per call. If you want LLM-grade semantic comparison, add another layer on top β the fb_validate_pre_publish tool returns the score so your agent can decide.
Note: the brand_voice field is informational β it's surfaced to the calling LLM via the tool description but the server itself does not LLM-validate against it. This is by design (tests must run offline). Layer your own LLM check on top if you want enforcement.
You manage 5 Facebook pages for clients. Each has its own brand voice, banned topics (competitor names), and image policy. Configure them all in one config.yaml, give Claude the tool, and let the agent draft + validate + publish across all of them with safety rails.
You run a single product page and want Claude to schedule the next 30 days of posts. Set image_required: true, give the agent your product brief, and use fb_anti_duplicate_check to make sure no two posts land on the same angle within a fortnight.
You rotate flash promos. Set anti_duplicate_lookback_days: 7 for the promo page and 14 for the evergreen content page. Combine with scheduled_at to queue a week's worth of posts in one shot.
All tests use httpx.MockTransport and pytest-mock. No real Meta API calls in tests.
META_USER_TOKEN only. Never hard-code it.***REDACTED***) before they leave the process.config.yaml is in .gitignore. Only config.example.yaml is committed.fb_check_token_expiry).Construit en Nouvelle-CalΓ©donie pour gΓ©rer 5 pages FB en parallΓ¨le (auto-Γ©cole, marketplace de bingo, atelier d'apps, marque de tee-shirts, page mΓ©dia). Tous les Γ©cueils ci-dessus sont des bugs que j'ai vraiment vΓ©cus. Le serveur MCP est la couche que j'aurais aimΓ© avoir le premier jour β maintenant elle est libre.
MIT β see LICENSE.
Issues + PRs welcome. Please run pytest and ruff check . before opening a PR. For substantial features, open an issue first to discuss.
#BuiltOnClaudeCode
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/facebook-publisher)<a href="https://allmcps.com/mcp/facebook-publisher"><img src="https://allmcps.com/api/badge/facebook-publisher?style=directory" alt="Facebook Publisher on AllMCPs" /></a>