meta-flywheel-mcp
Publishes and retries posts to Facebook Pages, with channel-isolated state tracking and keyword-comment handling through Meta Private Replies.
Publishes and retries content to Instagram Professional accounts and fulfills keyword comments with atomic Private Reply DMs.
Uses Meta's Graph API and Private Replies API for webhook verification and single-bubble comment-to-DM responses across Facebook, Instagram, and Threads.
Publishes Threads posts with UTF-8 byte-limit enforcement and auto-chained replies for links, plus retry and idempotency controls.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
meta-flywheel-mcp — Deterministic Facebook, Instagram & Threads Lead-Magnet Engine + MCP Server
meta-flywheel-mcpis a zero-dependency Python engine and Model Context Protocol (MCP) server for publishing technical stories across Facebook Pages, Instagram Professional, and Threads while fulfilling keyword comments via Meta's official Private Replies API. It enforces<500UTF-8 byte Threads auto-chaining, SQLite partial-retry idempotency,<1msHMAC-SHA256 webhook verification, and single-bubble DM delivery with0 MB VRAMoverhead.
Quick Start
No terminal wrestling required: click GitHub's Copy button on the top-right of any snippet below, or hand the single prompt in Step 1 directly to your AI coding agent (Claude Code, Cursor, Antigravity, Codex, or OpenCode) and let it handle setup end-to-end via llms.txt.
1. Let Your AI Agent Install It For You (1-Click Copy)
Install and configure https://github.com/cynthiaschomp/meta-flywheel-mcp in this project using its llms.txt and docs/getting-started.md, then run a quick check to confirm everything works.2. Terminal Install (1-Click Copy)
git clone https://github.com/cynthiaschomp/meta-flywheel-mcp.git && cd meta-flywheel-mcp && python3 -m meta_flywheel.mcp_server --doctor --dry-run3. 5-Line MCP Config (Claude Desktop, Cursor, Antigravity, OpenCode)
{
"mcpServers": {
"meta-flywheel-mcp": {
"command": "python3",
"args": [
"-m",
"meta_flywheel.mcp_server",
"--mcp",
"--dry-run"
]
}
}
}4. Programmatic SDK / CLI Usage
from meta_flywheel import adapt_campaign_copy
payload = adapt_campaign_copy(
brief="Our dashboard claimed 4.2x ROAS while net cash dropped by $14,200.",
repo_url="https://github.com/cynthiaschomp/roas-to-cash-mcp",
booking_url="https://cynthiaschomp.com/book",
keyword="ROAS",
)
print(payload["threads"]["post_1_bytes"], payload["threads"]["post_2"])Related MCP server: meta-social-mcp
Documentation
Getting Started & Full Setup Guide — Step-by-step installation, configuration, and examples
AI Agent Context (
llms.txt) — Single-fetch<1,500-token SDK, CLI & architecture referenceMCP Registry Manifest (
server.json) — Officialstdiotool & registry metadata
Why Technical Founders & AI Workflows Need This
Link suppression & Threads byte-count failures — Keeps feed posts link-free, enforces exact UTF-8 byte counting (
<= 500bytes across multi-byte emojis), strips 'link in bio' or 'DM me' bait, and auto-chains links in Thread #2 viareply_to_id.Duplicate posts on partial API timeouts — Tracks
PENDING -> STAGED -> CONTAINER_CREATED -> PUBLISHED | FAILEDper channel in SQLite soretry_failed_channelsretries only failed surfaces without double-posting.Infinite bot reply loops & multi-bubble DM lockouts — Drops self-authored webhook events immediately, deduplicates
(platform, comment_id)and(campaign_id, commenter_id), and combines repo + booking URLs into one atomic Private Reply bubble.
Comparison
Feature |
| ManyChat | Buffer | Zapier |
Auto-chained Threads | Yes (Built-in) | No | Partial | Manual multi-zap |
Atomic 1-bubble Comment-to-DM ( | Yes (SQLite idempotent) | Per-contact SaaS tier | No | Brittle webhook glue |
Channel-isolated retry without double-posting | Yes ( | N/A | Manual re-queue | Replays whole run |
Self-hosted MCP server ( | Yes (Apache-2.0) | Closed SaaS | Closed SaaS | Closed SaaS |
Architecture
Master Brief + Public URLs -> [Copy Adapter & 200-OK Gate] -> [SQLite Job Spine] -> FB / IG / Threads #1+#2 -> [HMAC Webhook + Self-Author Breaker] -> Atomic Private Reply DMBenchmarks
Metric | Measured Value | Conditions |
Webhook HMAC-SHA256 + SQLite idempotency check |
| Constant-time |
Background daemon / GPU VRAM footprint |
| Pure Python 3.10+ stdlib + embedded SQLite ( |
MCP tool schema + |
| Fits cleanly inside |
FAQ
How do I connect meta-flywheel-mcp to Claude Code, Cursor, or another MCP client?
Add the 5-line mcpServers block in Quick Start pointing to python3 -m meta_flywheel.mcp_server --mcp --dry-run, and export META_APP_ID plus META_APP_SECRET in your environment when switching to live Graph API calls.
How do I prevent duplicate Facebook or Instagram posts when Threads times out?
Call flywheel_retry_failed (or retry_failed_channels(store, job_id=...)). Every channel transitions independently in SQLite, and any surface already in PUBLISHED is strictly skipped.
How do I avoid Meta's 24-hour messaging lockout when sending both a GitHub link and booking link?
Meta allows only one unsolicited Private Reply message per comment_id until the user responds. build_atomic_private_reply_payload combines both the GitHub repository link and booking link into a single atomic DM bubble alongside a public Message Requests nudge.
Who Built It
Cynthia Schomp
I run a web design, marketing, and AI systems studio—building practical software, agent infrastructure, and developer tools I need in production first, and sharing reusable building blocks openly so other builders can move faster too.
Connect: GitHub  ·  Website  ·  Contact
Feedback
Questions, bug reports, benchmark comparisons, or ideas for what you need next? Open an issue or start a thread in Discussions—real-world developer feedback directly shapes the roadmap.
License: Apache-2.0 · Attribution required via NOTICE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Social media API for AI agents: publish, DMs, comments, Meta ads and leads.
Instagram, WhatsApp and Messenger DMs through official Meta Business APIs.
Instagram and Facebook Pages for AI agents: publish, comments, DM by keyword, inbox, insights.
Agent-first social media publishing, scheduling, analytics, and unified inbox API + 16-tool MCP server across 18 social platforms (X, LinkedIn, Instagram, YouTube, TikTok, Threads, Bluesky, Reddit, Telegram, Discord, Mastodon, Facebook, Pinterest).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading and replying to direct messages, comments, and templates across Instagram, WhatsApp, and Messenger through official Meta Business APIs, with support for human handover and AI assistant controls.53 npmMIT
- AlicenseAqualityCmaintenanceEnables direct management of Facebook Pages and linked Instagram Business/Creator accounts through the official Meta Graph API, including posting, scheduling, reading and responding to comments, and viewing insights.20MIT
- AlicenseBqualityCmaintenanceEnables AI agents to publish Facebook and Instagram content, send and moderate DMs with media and audio, handle reactions and quoted replies, run follow-gated comment funnels, configure interactive chat templates, and retrieve analytics across Facebook, Instagram, and Threads.35MIT
- AlicenseNot gradedqualityCmaintenanceEnables multi-account OAuth-based publishing of text, image, and video posts, reply and mention management, keyword search, and account/post insights through Meta's official API.MIT