Custom GPT Actions · OpenAPI 3.0

Turn a Custom GPT into a social media publisher

Import one generated schema and your GPT can read your queue, draft copy per network, generate an image, dry-run against limits and schedule to seven platforms — over plain REST, no protocol work required.

GPT builder → Actions → Import from URL
https://your-host.example.com/openapi.json
  • 16 operations imported
  • Schemas typed and validated
  • Auth: API Key · x-api-key

Four steps, about ten minutes

01

Host the server in HTTP mode

Run @postmcpai/server with a PORT set, on Render, Railway, Fly.io, a VPS, or behind an ngrok tunnel while you experiment. HTTP mode is what exposes the REST surface a GPT Action needs.

export POSTMCPAI_API_KEY="pmcp_sec_•••"
export PORT=3000
npx -y @postmcpai/server
02

Import the generated OpenAPI schema

The server generates a complete OpenAPI 3.0 document at /openapi.json covering every tool. In the Custom GPT builder, choose “Import from URL” and paste it — no hand-writing schemas, and no drift when tools change.

https://your-host.example.com/openapi.json
03

Set API key authentication

Authentication type: API Key. Header name x-api-key (Authorization with a Bearer token also works). The key stays in the GPT’s action config; the model never sees it in a message.

Auth type:  API Key
Header:     x-api-key
Value:      pmcp_sec_•••
04

Give the GPT its instructions

Tell it to call get_connected_accounts before targeting anything, to run preflight_post before create_post, and to confirm with you before publishing. That short prompt is what turns a capable GPT into a safe one.

"Always preflight before creating.
 Always confirm before publishing.
 Target profileIds, never whole platforms."
The operations that matter most

Six of the sixteen do most of the work

All operations
  • POST /api/tools/preflight_postCheck limits, targets and cost. Publishes nothing.
  • POST /api/tools/create_postDraft, schedule or publish immediately.
  • POST /api/tools/list_postsRead the queue with per-profile status.
  • POST /api/tools/get_connected_accountsProfiles and the profileIds to target.
  • POST /api/tools/generate_imageGenerate an image, get a hosted URL back.
  • POST /api/tools/multicallBatch up to 20 calls in one request.

A word on where the key lives

A Custom GPT Action stores its credential in the GPT configuration, not in the chat, so the key is not exposed to conversation history. Still — treat a hosted HTTP instance as a production surface: give it its own API key rather than reusing your dashboard one, scope it to a single workspace, and rotate it from the dashboard when you hand a GPT to someone else. Your social OAuth tokens are never involved; they stay encrypted in the PostMCP vault regardless of who calls the API.

ChatGPT integration FAQ

Can ChatGPT post to social media?
Not on its own — but a Custom GPT with Actions can, once you give it an API to call. PostMCP generates the OpenAPI 3.0 schema for you, so importing one URL turns every publishing tool into an Action the GPT can invoke.
Do I need to write the OpenAPI schema myself?
No. The server serves a complete, current schema at /openapi.json. Import it by URL in the GPT builder and it stays in step with the tools rather than rotting in a copy-pasted YAML file.
How does authentication work for a Custom GPT?
Set the Action’s auth type to API Key and send your PostMCP key as the x-api-key header, or as an Authorization bearer token. The key is stored in the GPT configuration, not in the conversation, and your social OAuth tokens never leave the PostMCP backend at all.
What is the difference between this and the MCP integration?
Same server, two surfaces. MCP is the native protocol used by Claude and Cursor. GPT Actions speak plain REST against an OpenAPI schema, which is what ChatGPT expects. The tools, limits and behaviour are identical either way.
Will the GPT publish something without asking?
That is down to your instructions and the Action confirmation settings. Every mutating call is a distinct Action, so you can require confirmation on it, and preflight_post exists specifically so a GPT can validate a post without publishing it.
Can one GPT handle several clients or brands?
Yes. Every tool accepts a workspaceId, and list_workspaces tells the GPT which ones exist. An agency GPT can therefore read the right brand kit and post to the right client accounts within one configuration.