Social Fanout

v0.1.7
io.github.Muse-Nexus/socialfanout-mcp Checked 2 days ago Published 29 days ago

Focused tools for AI agents to publish, schedule, and review posts through the Social Fanout API.

A tiny, zero-dependency Model Context Protocol server that gives your AI agent a focused set of tools to publish through Social Fanout and review the resulting job history. It's a thin stdio client over the Social Fanout REST API — your agent never touches raw platform tokens. One key; each call publishes to one connected destination. For multi-destination fan-out in a single request, use the REST API's targets array (up to 20). Set FANOUT_API_KEY privately in your environment, then run this exact version:

Summary extracted from the README.

socialfanout-mcp

A tiny, zero-dependency Model Context Protocol server that gives your AI agent a focused set of tools to publish through Social Fanout and review the resulting job history.

It's a thin stdio client over the Social Fanout REST API — your agent never touches raw platform tokens. One key; each call publishes to one connected destination. For multi-destination fan-out in a single request, use the REST API's targets array (up to 20).

Set FANOUT_API_KEY privately in your environment, then run this exact version:

FANOUT_API_BASE_URL=https://socialfanout.com \
  npx -y socialfanout-mcp@0.1.7

You need a Social Fanout API key — get one free at https://socialfanout.com/signup?ref=g1-npm.

Add it to your agent

The server speaks MCP over stdio, so any MCP-capable client can launch it. Set your API key; the packaged command connects to the hosted API by default:

Variable Required Default Notes
FANOUT_API_KEY yes — Your Social Fanout API key (spk_…).
FANOUT_API_BASE_URL no https://socialfanout.com Optional API address override. Leave it unset for the hosted service.

Pin the version (socialfanout-mcp@0.1.7) so your client runs the release you tested. The npm releases 0.1.0 and 0.1.1 default to http://localhost:3000 and lack dryRun; do not use them. Explicit FANOUT_API_BASE_URL values take precedence over the supported legacy POSTFIZZ_API_BASE_URL override.

Claude Desktop / Claude Code

{
  "mcpServers": {
    "socialfanout": {
      "command": "npx",
      "args": ["-y", "socialfanout-mcp@0.1.7"],
      "env": {
        "FANOUT_API_BASE_URL": "https://socialfanout.com",
        "FANOUT_API_KEY": "your-fanout-api-key"
      }
    }
  }
}

Replace the key placeholder privately. Merge only the socialfanout entry into your existing mcpServers; do not overwrite other servers. Save and restart Claude Desktop, then list connections before using dryRun: true to validate.

In Claude Code, the same server is one command. Set FANOUT_API_KEY privately in your environment first; your shell fills in the value, so you never type or paste the key into the command:

claude mcp add --env FANOUT_API_KEY="$FANOUT_API_KEY" --transport stdio socialfanout \
  -- npx -y socialfanout-mcp@0.1.7

Cursor / VS Code / other MCP clients

Use the same command / args / env shape in your client's MCP config. Codex, Cursor, and VS Code's agent mode all accept this form.

Tools

Tool Purpose
fanout_health Check the Social Fanout API is live.
fanout_list_providers List configured providers and their capabilities.
fanout_list_connections List the social accounts connected to your API key.
fanout_publishing_capabilities Read implemented formats, media limits, required selectors, scheduling and receipts for active owned connections.
fanout_list_posts Review recent published, scheduled, queued, failed, action-required, and canceled jobs.
fanout_get_job Read one owned durable job status and provider receipt.
fanout_cancel_job Cancel an unclaimed future schedule and retain its receipt.
fanout_start_oauth Get a provider OAuth URL (no API key in the URL).
fanout_publish_post Dry-run first, then publish now or schedule through an existing connection.
fanout_first_comment_capability Read whether automatic Facebook first comments are available to your key, and the exact owned Page and Comments connection pairs.
fanout_first_comment_status Read the parent post, first comment and accounting status of a first-comment command by jobId or its original requestKey.
fanout_publish_with_first_comment Publish one explicitly approved Facebook Page post with its exact first comment. Listed only while your key has the capability.

Every tool carries MCP annotations so your client knows what it does before calling it. The eight read tools are marked read-only. fanout_publish_post, fanout_publish_with_first_comment and fanout_cancel_job are marked destructive, so clients that honor annotations ask before running them. fanout_start_oauth only creates a connection link.

Call fanout_publishing_capabilities before composing a post. This read-only GET makes no provider requests and keeps unknown, unconfigured, limited and engagement-only connections visible with explanations. It separates provider configuration/readiness from stored connection health and strict support versus enabled state. These are implementation and stored metadata, not fresh account permission or a guarantee of publication. textLimit: null means no local limit is declared, not unlimited. TikTok direct mode still requires an explicit privacy choice from fresh creator-info options through the dashboard or REST; capability discovery does not fetch those options.

fanout_publish_post accepts the REST contract's ISO scheduledAt; a future time returns a durable scheduled job receipt and the background worker performs delivery. Pinterest remains immediate-only because Social Fanout does not retain Board ids for delayed dispatch. fanout_list_posts accepts an optional limit from 1 to 200 and uses the configured API key's owned post-history scope.

Always call fanout_publish_post with dryRun: true first. A dry run records a preflight job without calling a social provider or consuming publish quota. Omitted or false publishes live, so send it only after the user approves the exact content, destination, and schedule. Invalid non-boolean values are rejected. If an installed tool schema has no dryRun field, you are on an old release: use only read tools or a REST dry run until you upgrade.

fanout_publish_post also accepts:

  • subject: the Pinterest Pin title (truncated to 100 characters) or the email subject. Other platforms ignore it.
  • link: the Pinterest Pin destination URL, an absolute http(s) URL of at most 2048 characters. Other platforms ignore it, so put a URL in text for those.
  • requestKey: an optional stable identity for this exact command, 1-200 non-space printable ASCII characters, not starting with strict-v1:. It is sent only as the Idempotency-Key header. Generate it once per approved command and keep the same key and unchanged arguments across retries and reconnects; check fanout_list_posts or fanout_get_job before any retry. Use a separate key for the dry run. A new approved command needs a new key, even with identical content. Without a key there is no caller-key retry protection. This is not an exactly-once guarantee.

Automatic Facebook first comments

These tools use the Social Fanout first-comment feature, which is off unless it has been enabled for your key. Call fanout_first_comment_capability first; it makes no provider requests and publishes nothing. While the feature is unavailable, fanout_publish_with_first_comment is left out of the tool list, and the server checks the capability again before every call, so a guessed call cannot bypass it.

fanout_publish_with_first_comment publishes one Facebook Page post (text, one HTTPS image, or one verified uploaded image where the capability allows it) and then its exact firstComment through an eligible Comments connection you own. Its requestKey is required: generate it once for the user's command and keep it with the tool arguments. After an uncertain response, call fanout_first_comment_status with the original requestKey, even if no job ID arrived. Never change the key or post again to repair an uncertain result. It has no dry run, fan-out, video or replay. A published parent post stays published even when its comment is blocked or unknown; read parentOutcome, firstComment.status and accounting separately.

Connect accounts (OAuth) from the dashboard. The agent publishes through those connections without receiving raw provider tokens. The Social Fanout API key still authorizes those actions: keep it in private client configuration or its environment, never in chat, shared configuration, or source control. The dashboard's Quick publish and Posts agenda are optional first-party conveniences over the same API/MCP contracts.

Changes in 0.1.7

  • fanout_publish_post accepts optional subject and link (Pinterest Pin title and destination URL, or the email subject) and an optional requestKey, sent as the Idempotency-Key header.
  • New fanout_first_comment_capability, fanout_first_comment_status and fanout_publish_with_first_comment tools for explicit Facebook first comments. The write tool is listed only while your key has the capability.
  • fanout_publish_post rejects a firstComment argument and points to fanout_publish_with_first_comment, so a requested comment is never dropped silently.

How it works

socialfanout-mcp makes plain HTTPS calls to the Social Fanout REST API using your key. It has no npm dependencies — just Node's built-in fetch — so npx is fast and the install footprint is effectively zero.

License

MIT © Muse Nexus