REST + MCP · 7 networks

Skip six OAuth integrations

Every social network has its own auth dance, its own media pipeline and its own idea of what a post is. One request body covers all seven, and the parts that take weeks — app registration, product approval, token refresh — are already done.

Request
POST https://api.postmcpai.com/api/tools/create_post
x-api-key: pmcp_sec_•••
content-type: application/json

{
  "content": "Multi-workspace support is live.",
  "targetAccounts": [
    { "platform": "linkedin", "profileId": "lin_774…" },
    { "platform": "twitter",  "profileId": "tw_129…",
      "content": "Workspaces. One bill, clean separation." },
    { "platform": "bluesky",  "profileId": "bsk_558…" }
  ],
  "mediaUrl": "https://cdn.example.com/launch.png",
  "scheduleDate": "2026-10-14",
  "scheduleTime": "09:00",
  "timezone": "Asia/Kolkata"
}
Response
{
  "ok": true,
  "posts": [
    { "id": "6712…a1", "platform": "linkedin",
      "status": "scheduled" },
    { "id": "6712…a2", "platform": "twitter",
      "status": "scheduled" },
    { "id": "6712…a3", "platform": "bluesky",
      "status": "scheduled" }
  ],
  "creditsCharged": 7,
  "scheduledFor": "2026-10-14T03:30:00.000Z"
}

One post per profile — each independently editable, retryable and cancellable.

Six things you do not have to build

Each of these is a week of work per network, and every one of them keeps needing maintenance after it ships.

Six OAuth flows and their consent screens

One hosted connect flow per network. You never register a developer app or chase product approval.

Token storage and refresh

Encrypted server-side and refreshed for you. Account health tells you which connections are about to expire.

LinkedIn’s three-step image upload

Pass a public mediaUrl. The engine initializes the upload, PUTs the bytes, waits for processing and references the URN.

Per-network character and media rules

One pre-flight call reports every violation, including networks that reject a post with no media at all.

Scheduling infrastructure

A queue with wall-clock times and IANA timezones, editable and cancellable until publish.

Partial-failure bookkeeping

Every profile is its own delivery with its own status, permalink and error. Retry re-sends only what failed.

Two ways to call the same engine

REST, from anything

Every tool at POST /api/tools/{name}. Call it from a release script, a cron job, a backend service or your own product’s dashboard. No SDK required — it is plain JSON over HTTPS.

Endpoint reference

MCP, for agents

The same sixteen tools as a Model Context Protocol server — stdio for local clients, streamable HTTP for remote ones, and an OpenAPI document for ChatGPT Actions. MIT licensed, so you can read exactly what each tool sends.

MCP server

Key handling, briefly

  • Send it as x-api-key, or as an Authorization bearer token.
  • A key is bound to the workspace it was issued from. Pass workspaceId to act elsewhere.
  • Rotate a key from the dashboard without touching any social connection.
  • Social OAuth tokens are never returned by any endpoint, to any caller.

Developer FAQ

How do I post to social media programmatically?
Send a POST to https://api.postmcpai.com/api/tools/create_post with your API key in an x-api-key header, and a body containing content plus targetAccounts naming the profiles. Add publishImmediately: true to broadcast now, or scheduleDate, scheduleTime and timezone to queue it. The same body works for every supported network.
Do I need my own developer app on each network?
No. PostMCP holds the app registrations and approved products for LinkedIn, X, Meta and the rest. Your users connect through a hosted OAuth flow, and you authenticate your own requests with a PostMCP API key. That removes the part of this work that takes weeks rather than hours.
How is authentication handled?
Two layers. Social OAuth tokens and app passwords are encrypted in a server-side vault and never leave it. Your requests carry a PostMCP API key as x-api-key or an Authorization bearer token; the key is bound to the workspace it was issued from and can be rotated without touching any social connection.
Can I batch operations?
Yes. multicall runs up to 20 calls in one request, in order, validating every tool name before anything executes so a typo cannot leave a batch half-applied. The response carries one entry per call plus counts, and with stopOnError it names the calls that were skipped.
Is there an MCP server as well as REST?
Yes — @postmcpai/server, MIT licensed on npm. It runs over stdio for local clients like Claude Desktop and Cursor, or in streamable HTTP mode for remote connectors, and generates an OpenAPI 3.0 document at /openapi.json for ChatGPT Actions.
What are the rate and cost characteristics?
Publishing is charged per delivery: 1 credit per profile, 5 for X, plus a one-off 50-credit surcharge on posts containing a link. preflight_post reports the cost before you commit, so a client can be shown the price of an action before taking it. Upstream network rate limits still apply and are surfaced as the network’s own error.