Skip to main content
Glama
Meta Social MCP

Meta Social MCP

by miindtraa
README.md
# meta-social-mcp

Your own Instagram + Facebook connector for Claude. It uses Meta's official Graph API with your own token, runs on your own machine or server, and costs nothing to run.

It covers what paid Instagram connectors for Claude do (research, brand profile, carousel rendering, content library, posting and scheduling, insights, comment inbox, comment-to-DM lead capture) and adds Facebook Pages.

![sample slide](docs/sample-slide.png)

## What it can do (51 tools)

| Job | Tools |
|---|---|
| **Accounts and health** | `meta_accounts`, `meta_token_status`, `meta_graph_request` (any other Graph API call) |
| **Brand memory** | `brand_from_website` (learns the brand from your site), `brand_profile_get`, `brand_profile_set` |
| **Research** | `competitor_track` (the server checks public accounts every 4 hours and builds their history), `competitor_report` (leaderboard: growth per week, posts per week, views per follower, views in the first 24 h, CTA keywords, hashtags, breakouts), `hook_bank` (hooks that beat their account's median most), `competitor_posts` (browse any public account's reels and carousels), `analyze_post` (frames of the first 3 seconds, cuts, transcript in Hindi or English, or every carousel slide), `analyze_video` (any video link, e.g. a screen-recorded story), `ig_competitor_research`, `ig_hashtag_research`, `ig_mentions` |
| **Your stories** | `story_report` (reach, replies, tap-forward, tap-back and exit rates, how much of each day's audience the sequence kept; saved hourly before Instagram deletes them) |
| **Audit your own account** | `growth_audit` (gaps, cadence, CTA use, winner vs flop hooks, competitors), `ig_performance_report` (winners, flops, best format, best days and hours), `post_insights`, `account_insights` (incl. audience demographics) |
| **Create** | `render_reel` (animated 9:16 MP4 reels: words landing one by one, highlight chips, counters, lists, CTA pill, logos on frame 0, over footage or images, with music and voiceover), `render_status`, `render_carousel` (1080x1350 JPEG slides) |
| **Content library** | `draft_save`, `draft_list`, `draft_delete`, `draft_publish` |
| **Publish** | `ig_publish` (image, carousel, reel, story; optional cross-post to Facebook; first comment; collaborators; tags; alt text; AI info label; Trial Reels), `fb_publish` (text, link, photos, video, reel, story; native scheduling) |
| **Schedule** | `schedule_post` (`run_at: "best"` books your best day and hour), `schedule_list`, `schedule_cancel`, `publish_queue_run` |
| **Comments** | `comment_inbox` (unanswered comments across recent posts), `comments_list`, `comment_reply`, `comment_moderate`, `ig_toggle_comments` |
| **DMs** | `dm_conversations`, `dm_messages`, `dm_send`, `private_reply` (DM a commenter) |
| **Lead loop** | `autoreply_rule_create` / `_list` / `_update` / `_delete`, `autoreply_run_now` (with dry run), `leads_list` (CSV export) |
| **Log** | `activity_log` |

Media can be a public URL, a Google Drive or Dropbox share link, or a file on your computer. For local images it uploads them to your Facebook Page as an unpublished photo and gives Instagram that link, so you need no separate image hosting. Local videos go through Meta's direct upload.

## Install

Needs Node.js 20 or newer.

```bash
git clone <your-repo-url> meta-social-mcp
```

```bash
cd meta-social-mcp
```

```bash
npm install
```

```bash
npm run build
```

Then do the one-time Meta setup in **[SETUP.md](SETUP.md)** and fill in `.env`.

> Want it on claude.ai and your phone without keeping a laptop on? Skip this section and use **[RUN-IT.md](RUN-IT.md)** instead.

Carousel rendering needs a browser once:

```bash
npx playwright install chromium
```

## Connect it to Claude

### Option A: Claude Desktop on your computer (simplest)

Open Claude Desktop > Settings > Developer > Edit Config, and add (Windows paths shown):

```json
{
  "mcpServers": {
    "meta-social": {
      "command": "node",
      "args": ["C:\\meta-social-mcp\\dist\\index.js"],
      "env": {
        "ENV_FILE": "C:\\meta-social-mcp\\.env",
        "DATA_DIR": "C:\\meta-social-mcp\\data"
      }
    }
  }
}
```

Restart Claude Desktop. The scheduler and comment rules run in the background while Claude Desktop is open.

### Option B: Claude Code

```bash
claude mcp add meta-social -e ENV_FILE=/full/path/meta-social-mcp/.env -e DATA_DIR=/full/path/meta-social-mcp/data -- node /full/path/meta-social-mcp/dist/index.js
```

### Option C (recommended): claude.ai and the phone app, running 24/7 with no laptop

Follow **[RUN-IT.md](RUN-IT.md)**. You paste one script into Oracle Cloud's free server form, wait 15 minutes, and add the connector URL in claude.ai. HTTPS, the scheduler, comment rules and nightly self-updates are all set up for you. Cost: $0.

## Using it

Things to say to Claude:

- "Audit my last 30 posts. What are my winners and what do they have in common?"
- "Research @someaccount and @another. Give me their 10 best hooks and how often they post."
- "Write a 7-slide carousel on the 3 signs of a dysregulated nervous system, render it in my brand colours, and save it as a draft."
- "Post draft X as a carousel tomorrow 7 pm IST, cross-post to Facebook."
- "Upload D:\VideoStudio\exports\reel-12.mp4 as a reel with this caption. Show me before posting."
- "Create a rule: anyone who comments GUIDE on my newest reel gets a public 'sent to your DMs' reply and a DM with the link. Dry run first."
- "Show me unanswered comments from the last 10 posts and draft replies in my voice."
- "Weekly report: account insights for 7 days plus top 3 posts."

Claude will ask before anything goes public. Publishing, replying and DM tools are marked as actions with side effects, so Claude Desktop shows an approval prompt for each.

## How it compares to Ootto

See **[COMPARISON.md](COMPARISON.md)**, checked against every page of ootto.ai.

## The autopilot skill

`skills/miindtraa-social-autopilot/SKILL.md` teaches Claude the whole loop: learn the brand, weekly audit, research, make, approve, book at the best time, turn comments into leads, compound the winners. Upload it in claude.ai under Settings > Capabilities > Skills (zip the folder first).

## Data and safety

- Everything the connector stores (brand profiles, drafts, schedule, rules, leads) is in one JSON file in `DATA_DIR`. Back it up if you care about it.
- Your token stays in `.env` on your machine or server. Set `META_APP_SECRET` so every call is signed.
- Comment and DM text is treated as untrusted. The server instructions tell Claude never to act on instructions written inside comments.
- Comment rules only handle comments posted after the rule is created, and each comment only once.
- Public auto-replies never need a link; put links in the DM, which is what Instagram expects.

## Handover

Start with **[HANDOFF.md](HANDOFF.md)**: current state, go-live steps and the rules for operating it.

## Develop and test

```bash
npm test
```

This builds the server and runs an end-to-end test suite over the real MCP protocol against a mock Graph API (`test/mock-graph.mjs`), covering publishing of every format, local-file uploads, cross-posting, research, insights fallbacks, scheduling, rendering, and the comment-to-DM loop.

## Notes

- Graph API version defaults to `v25.0` (`META_GRAPH_VERSION`). Meta supports each version for about two years.
- Meta renamed several metrics in 2025-2026 (e.g. `impressions` and `plays` became `views`). When Meta rejects a metric, the insights tools fetch the others and list what was unavailable instead of failing.

MIT licence.

TDQS

B3.1/5.0

Scored across 51 tools

Disambiguation3/5

Most tools are clearly separable by resource and action (publish vs schedule vs draft vs render vs DM vs comment), and the descriptions are unusually explanatory. However, the research cluster overlaps heavily: ig_competitor_research, competitor_posts, competitor_report, growth_audit and ig_performance_report all return similar post/engagement breakdowns for accounts, and analyze_post vs analyze_video sit close together. meta_graph_request is also a deliberate catch-all that can shadow any other tool.

Naming Consistency3/5

Everything is snake_case, which keeps it readable, but the verb position and prefix strategy are mixed: verb-first (render_reel, schedule_post, analyze_video), resource-first (draft_save, posts_list, comment_reply, competitor_track, brand_profile_set), domain-prefixed (ig_publish, fb_publish, meta_accounts), and bare nouns (hook_bank, leads_list, activity_log). Several near-identical actions get different shapes (draft_publish vs publish_queue_run vs ig_publish).

Tool Count2/5

51 tools is well past the heavy threshold and forces the agent to choose among many loosely related families (publishing, rendering, research, competitor tracking, DM, autoreply, analytics). While the domain is genuinely broad, several tools are thin variants of each other (competitor_refresh, autoreply_run_now, publish_queue_run), suggesting over-exposure rather than strict necessity.

Completeness4/5

Coverage is broad and lifecycle-ish for most areas: drafting, rendering, scheduling, publishing, cancellation, insights, comments, DMs, keyword automation, leads and competitor history all have entry points. The main gaps are destructive/lifecycle operations — no unpublish or delete for published IG/FB posts, no profile/bio editing, and no ad or audience management — some of which are API limitations, but they leave agents at dead ends after publishing mistakes.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues