Skip to main content
Glama

🎬 Meta Nexus Agent β€” Zero-API Facebook & Instagram Autonomous Studio


⚑ Why Meta Nexus Agent?

Paid social media schedulers and comment automation tools charge $49 to $199/month, force you through brittle Meta Graph API approvals, strip trending audio tracks, and generate detectable AI slop that destroys Reel retention.

Meta Nexus Agent solves this 100% locally with zero API fees:

  1. Persistent Login Engine (chrome_profile): Log into Instagram and Facebook manually once (or inject sessionid / c_user+xs cookies in < 1s). Exports decrypted Netscape cookies.txt so yt-dlp never hits Windows Chrome DPAPI locks.

  2. Saved Video Extractor & yt-dlp Downloader (02_saved_extractor.py): Scrapes your Instagram Saved (/saved/all-posts/) and Facebook Saved (/saved) collections, downloads high-resolution .mp4 Reels via yt-dlp, and extracts full metadata (Title/Hook, Caption, Creator Handle, Duration, Audio Track).

  3. Automated Master Sheet (saved_videos_log.xlsx): Bidirectionally syncs every scraped, mixed, and published Reel between a styled Excel workbook and local SQLite (storage/meta_agent.db).

  4. FFmpeg Music & Reel Studio (03_media_music_mixer.py):

    • Scenario A (Reel + Local MP3 Pre-Mix): Lowers original video audio to 20% and overlays .mp3 tracks from music_library/ at 85% volume.

    • Scenario B (Static Image + Music -> 15s Reel): Loops any .jpg/.png or auto-generated 1080x1920 (9:16) builder quote card with an .mp3 track into a 15-second vertical Reel.

    • Scenario C (Native Platform Audio): Flags rows with NATIVE_UI:<song_name> so the Playwright uploader selects trending music directly inside Instagram/Facebook's native "Add Music" UI modal.

  5. 82-Rule Humanizer & Cognitive Brain: Eliminates all 82 AI buzzwords (delve, tapestry, robust, pivotal, game-changer, landscape) and grounds captions and comment replies in verified project receipts from your Story Bank.

  6. Autonomous IG & FB Publishers + AI Comment Engine (04_ig & 05_fb): Publishes Reels/Posts and runs Mode 1 (Inbox/Comment Auto-Reply) and Mode 2 (Niche Hashtag Outreach) with 3.5s–9.2s human jitter, 5–8s Reel watch simulation, and 50–90ms per-character keystroke typing.


Related MCP server: Instagram MCP Server

πŸ“Š Comparison: Meta Nexus Agent vs. Paid SaaS

Feature

Meta Nexus Agent

Hootsuite / Buffer

Later

ManyChat

Price

$0 / month (Free & Open Source)

$99 – $249 / mo

$25 – $80 / mo

$15 – $145 / mo

Meta Graph API Required?

βœ“ Zero-API (Persistent Browser + Cookie)

❌ Requires Business API

❌ Requires API

❌ Requires Webhooks

Saved Reels yt-dlp Downloader

βœ“ Built-in (chrome_profile/cookies.txt)

❌ No

❌ No

❌ No

FFmpeg 20%/85% Audio Mixer

βœ“ Built-in (Scenarios A, B & C)

❌ No

❌ No

❌ No

Automated Excel Master Sheet

βœ“ Live saved_videos_log.xlsx Sync

❌ CSV export only

❌ No

❌ No

Local Offline AI (Ollama)

βœ“ Yes (qwen2.5 / llama3.2 / deepseek-r1)

❌ Cloud only

❌ Cloud only

❌ Cloud only

82-Rule Anti-Slop Humanizer

βœ“ Strict 4-Pass Programmatic Scrub

❌ Generic AI

❌ Generic AI

❌ Flow templates

Claude Desktop / Cursor MCP

βœ“ Native JSON-RPC 2.0 Server

❌ No

❌ No

❌ No


πŸ—οΈ System Architecture

flowchart TD
    subgraph Interfaces ["Multi-Channel Interfaces"]
        UI["FastAPI Web Studio (:8005)"]
        CLI["Master CLI (main_agent.py)"]
        MCP["Claude Desktop & Cursor (MCP Server)"]
        Excel["Master Excel Sheet (saved_videos_log.xlsx)"]
    end

    subgraph Pipeline ["6-Phase Autonomous Meta Pipeline"]
        P1["01_login_setup.py\n(Persistent Chrome + cookies.txt)"]
        P2["02_saved_extractor.py\n(IG/FB Saved Scraper + yt-dlp)"]
        P3["03_media_music_mixer.py\n(FFmpeg 20%/85% Mix + 9:16 Card Reel)"]
        P4["04_ig_publisher_commenter.py\n(Instagram Reels & AI Commenter)"]
        P5["05_fb_publisher_commenter.py\n(Facebook Reels & AI Commenter)"]
        P6["Anti-Ban Guardrails\n(3.5-9.2s Jitter + 50-90ms Typing)"]
    end

    subgraph Intelligence ["Cognitive Brain & Multi-Model LLM"]
        Brain["Story Bank Receipts + Voice Profile"]
        Humanizer["82-Rule Strict Humanizer Gate"]
        LLM["Local Ollama (qwen2.5 / llama3.2)\n+ OpenRouter Free Fallback"]
    end

    Interfaces --> Pipeline
    Pipeline <--> Excel
    Pipeline --> Intelligence

πŸ“ Directory & File Architecture

G:\Meta agent\
β”‚
β”œβ”€β”€ chrome_profile\              # Persistent Chrome user data (FB & IG cookies + Netscape cookies.txt for yt-dlp)
β”œβ”€β”€ saved_videos\                # Downloaded raw .mp4 files from FB & IG Saved collections
β”‚   β”œβ”€β”€ instagram\
β”‚   └── facebook\
β”œβ”€β”€ music_library\               # Local .mp3 songs/audio tracks to attach to Posts & Reels
β”œβ”€β”€ ready_to_post\               # Final processed 1080x1920 Reels & Image-Music videos ready for upload
β”œβ”€β”€ logs\                        # Error logs and execution history
β”œβ”€β”€ storage\                     # Local SQLite database (meta_agent.db) synced with Excel
β”‚
β”œβ”€β”€ saved_videos_log.xlsx        # Master spreadsheet (ID, Platform, Hook, Caption, Creator, URL, MP4, Music, Status, Posted URL)
β”œβ”€β”€ config.json                  # Usernames, posting schedules, human-delay timings, Ollama model name
β”‚
β”œβ”€β”€ 01_login_setup.py            # Phase 1: Run ONCE to log into Facebook & Instagram manually (or inject cookies)
β”œβ”€β”€ 02_saved_extractor.py        # Phase 2: Scrapes Saved posts, downloads videos via yt-dlp, updates Excel sheet
β”œβ”€β”€ 03_media_music_mixer.py      # Phase 3: FFmpeg engine to combine music + video or static image + music
β”œβ”€β”€ 04_ig_publisher_commenter.py # Phase 4 & 5: Playwright UI automation for Instagram Reels, Posts & Comments
β”œβ”€β”€ 05_fb_publisher_commenter.py # Phase 4 & 5: Playwright UI automation for Facebook Reels, Posts & Comments
β”œβ”€β”€ main_agent.py                # Master CLI / AI controller that orchestrates all modules
β”œβ”€β”€ run.py                       # FastAPI Web Studio Dashboard launcher (:8005)
β”œβ”€β”€ run_mcp.py                   # Model Context Protocol (MCP) Server for Claude Desktop & Cursor
└── launch.bat                   # 1-Click Windows Studio Launcher

πŸš€ Quick Start (Up in < 2 Minutes)

Option A: 1-Click Launch (Windows)

Double-click launch.bat in the repository root:

launch.bat

Option B: Terminal / Python (All Platforms)

# Clone the repository
git clone https://github.com/muhdfaisalwork-gif/meta-agent.git
cd meta-agent

# Install dependencies
pip install -r requirements.txt
playwright install chromium

# Launch Web Studio Server (http://localhost:8005)
python run.py

πŸ› οΈ Running the 6 Blueprint Modules via CLI

# Phase 1: Log into Instagram (Tab 1) & Facebook (Tab 2) once in persistent Chrome
python 01_login_setup.py

# Phase 2: Scrape Saved Reels/Videos via yt-dlp & update saved_videos_log.xlsx
python 02_saved_extractor.py --platform both --max 5

# Phase 3 (Scenario A): Batch mix downloaded Reels with local MP3s (20% original / 85% music)
python 03_media_music_mixer.py --scenario batch

# Phase 3 (Scenario B): Turn a 9:16 quote card / static image + MP3 into a 15s 1080x1920 Reel
python 03_media_music_mixer.py --scenario b --hook-text "How we cut order execution latency from 1.2s to 420ms"

# Phase 4 & 5: Publish Reels & Auto-Reply to Comments on Instagram and Facebook
python 04_ig_publisher_commenter.py --action publish
python 04_ig_publisher_commenter.py --action auto-reply
python 05_fb_publisher_commenter.py --action publish
python 05_fb_publisher_commenter.py --action auto-reply

# Run Full End-to-End Autonomous Cycle
python main_agent.py --auto

πŸ”Œ Connect to Claude Desktop or Cursor (MCP)

Meta Nexus Agent includes a certified Model Context Protocol (MCP 2024-11-05) server:

python scripts/install_mcp.py

Or add manually to claude_desktop_config.json:

{
  "mcpServers": {
    "meta-nexus": {
      "command": "python",
      "args": ["G:\\Meta agent\\run_mcp.py"]
    }
  }
}

πŸ§ͺ Automated Test Suite (100% Pass Rate)

python -m pytest -v

🀝 Contributing & Security

Contributions are warmly welcomed! Please read CONTRIBUTING.md and review SECURITY.md.


πŸ“„ License

Distributed under the MIT License. See LICENSE for full details.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Lets you control Meta apps (Facebook, Instagram, Threads) using your Chrome login session without API tokens, enabling actions like posting, messaging, and reading inbox locally.
    3
    -
  • A
    license
    A
    quality
    B
    maintenance
    Connects Claude Desktop and other MCP clients to the Instagram Graph API for reading analytics, managing comments, and publishing photos, carousels, and reels.
    11
    23 npm
    1
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Local MCP server for operating Instagram, Meta Ads, and Facebook Page from Claude Code via Meta's Graph API. Provides 20 tools for publishing, campaign management, and insights.
    20
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to publish, edit, delete, comment on, and analyze posts across LinkedIn, Facebook Pages, and Instagram professional accounts, including cross-posting and local scheduling. Runs locally with user-supplied credentials and no third-party token routing.
    8 npm
    MIT