Skip to content

Developers

Postfig works with the AI assistant you already use. Connect it once, then ask ChatGPT or Claude to draft, schedule or publish posts to the accounts you’ve connected in Postfig. There’s a plain HTTP API too.

ChatGPT and Claude

Postfig is a remote MCP server at https://app.postfig.app/mcp. Add it where your assistant keeps its connectors, then sign in to Postfig when it asks and choose what it may do. You can disconnect it at any time from Postfig’s account menu, under AI assistants & API.

  • ChatGPT: in Settings, open the connectors (apps) section and add a custom connector with the URL above.
  • Claude (web and desktop): Settings → Connectors → Add custom connector, with the URL above.
  • Claude Code:
    claude mcp add --transport http postfig https://app.postfig.app/mcp
    then run /mcp in Claude Code to sign in.

Remote connectors can’t read files on your computer. Give them a link to a photo or video, or an image the assistant generated, and it will fetch it for you.

Files from your computer: the local server

Being published to npm. Until the package appears there, use the connector above.

For Claude Code, Claude Desktop, Cursor and other MCP clients that run on your machine, @postfig/mcp adds one tool,add_media_from_file, which sends a photo or video straight from your disk. It needs an API key, which you make in Postfig’s account menu under AI assistants & API. The key stays on your computer.

claude mcp add postfig --env POSTFIG_API_KEY=pf_… -- npx -y @postfig/mcp

Claude Desktop and Cursor take the same thing as JSON:

{
  "mcpServers": {
    "postfig": {
      "command": "npx",
      "args": ["-y", "@postfig/mcp"],
      "env": { "POSTFIG_API_KEY": "pf_…" }
    }
  }
}

What the assistant can do

ToolWhat it does
list_channelsThe accounts connected to your workspace.
platform_rulesCaption limits and media rules per platform.
add_media_from_url, add_media, add_media_from_fileAdd a photo or video from a link, inline, or from your disk (local server only).
create_postDraft, schedule, or publish now, with per-platform captions and settings. Checks every platform’s rules first; dry_run only checks.
get_post, list_postsStatus, results and links.
publish_post, delete_postPublish an existing post now; delete a draft or scheduled post.

Reading tools are marked read-only; publishing and deleting aren’t, so assistants ask before doing them, and deleting is marked destructive.

The API

Everything above is also an HTTP API at https://app.postfig.app/api/v1, with an API key or OAuth token as a Bearer token. Requests and responses are JSON, except uploads, which send the file as the request body.

RequestDoesNeeds
GET /meYour workspace and what the token may do.
GET /channelsConnected accounts, with the ids posts use.channels:read
POST /mediaUpload a file (its bytes as the body, with Content-Type; optional X-Name, X-Width, X-Height, X-Duration). Up to 100 MB.media:write
POST /media/from-url{ "url": "https://…" }: fetch a public file.media:write
POST /postsCreate a post (below).posts:write
GET /posts, GET /posts/:idList (?status=, ?limit=) or fetch one, with each account’s result.posts:read
POST /posts/:id/publishPublish a draft or scheduled post now.posts:write
DELETE /posts/:idDelete a draft or scheduled post.posts:write

A post:

POST /api/v1/posts
Authorization: Bearer pf_…
Content-Type: application/json

{
  "caption": "New season, new light.",
  "media": ["m_…"],
  "channels": "all",
  "when": "2026-10-20T09:00:00+01:00",
  "overrides": {
    "instagram": { "settings": { "shareAs": "reel" } },
    "threads": { "caption": "New season. New light.", "settings": { "topic": "Photography" } }
  },
  "alt": { "m_…": "A window at dawn" }
}

when is "draft", "now", or a date-time with an offset. The reply is 201 with the post, or422 with issues, one per problem a platform would have (the caption too long for Threads, no photo for Instagram…). Send "dryRun": true to check without creating. Errors are { "error", "message" }.

Keys, tokens and what they can reach

  • Every key and every assistant is limited to the scopes it was given: channels:read, posts:read, posts:write, media:write.
  • A key is shown once and stored only as a hash. Revoke it from the account menu; it stops working at once.
  • Assistants connect with OAuth 2.1 (PKCE, short-lived tokens) and go through a consent screen. Disconnecting removes their tokens.
  • Nothing here can reach the sign-ins of your social accounts, which never leave Postfig’s servers.

Questions: support@postfig.app.