Projects

social-mcp

Self-hosted MCP server that lets Claude publish, schedule and analyse posts on Instagram and a Facebook Page.

social-mcp is a free, self-hosted MCP server that lets Claude manage your Instagram account and Facebook Page. You put photos into a folder and tell Claude what to post and when. Claude then stages, uploads, archives and schedules the posts.

The publishing server runs on your own machine. It sends publishing requests and selected media to Meta. How your AI client handles your data depends on its provider and configuration.

Source code: github.com/bmachek/social-mcp · Setup guide · Issues

What is MCP?

The Model Context Protocol is a standard for giving AI assistants access to external tools. social-mcp implements it. Claude Code or Claude Desktop connects to the server and gets tools for posting, scheduling and analytics, which use the Meta Graph API.

Features

  • Post immediately: photos, carousels (2–10 images) and Reels to Instagram, a Facebook Page, or both at once.
  • Schedule for later: queue a post for a specific time or a relative one (in 2h, tomorrow at 19:30). The scheduler is persistent and survives container restarts.
  • Analytics: reach, engagement and follower metrics for the account, insights per post (likes, comments, shares, saves, plays) and a ranking of your top-performing posts.
  • Autopilot: scans your inbox, removes duplicate burst shots by perceptual hash, groups photos taken close together in time and place into carousels, and proposes a two-week schedule. You review the plan and write the captions. One commit then queues everything.
  • Self-hosted publishing: your Meta token is set in a local .env file and authenticates the requests to Meta. For local files, an nginx sidecar serves each image briefly at a one-time public URL so Meta can fetch it. It then takes the URL down and archives the file.

Requirements

  • A Meta App (type: Business) with Facebook Login for Business and the Instagram Graph API
  • A long-lived User Access Token with the scopes pages_show_list, pages_read_engagement, pages_manage_posts, instagram_basic and instagram_content_publish
  • Docker Compose (recommended) or Python 3.8+
  • A connected Instagram Business or Creator account and a Facebook Page

Setup

  1. Create a Meta App and generate a long-lived User Access Token with the scopes listed above.
  2. Copy .env.example to .env and enter your token, Page ID and Instagram User ID.
  3. Run docker compose up -d --build. This starts the MCP server (default port 3224) and an nginx file sidecar (default port 3223).
  4. Register the server with your MCP client (Claude Code or Claude Desktop).

The setup guide describes each step in detail: creating the Meta App, generating the token, configuring .env and setting up a reverse proxy.

Usage

Once the server is connected, ask Claude in plain language, for example:

  • “Post the sunset shot from my inbox to Instagram and Facebook with this caption, and add it to my story.”
  • “Schedule these three photos as an Instagram carousel for tomorrow at 19:30.”
  • “Plan the next two weeks from my inbox, then show me the carousels you’d make.”

A step-by-step guide is in Manage Instagram and Facebook with Claude and social-mcp.

social-mcp has no built-in authentication. Restrict access at the network layer, or put a TLS-terminating reverse proxy with a bearer-token check in front of it if you expose it beyond your LAN.

Licence

social-mcp is free and self-hosted. The source code is on GitHub.

All projects