Social media for AI agents

PostZen's REST API reaches nine social platforms. Agents can use hosted MCP, the JSON CLI, or published Node and Python packages.

Quick start

terminal
# Install and authenticatenpm install -g @postzen/clipostzen auth:set --key pzn_live_...# Schedule a postpostzen posts:create \  --content "We shipped 🚀" \  --scheduledFor "2026-08-01T09:00:00Z" \  --platforms '[{"platform":"x","accountId":"acc_123"}]'# Success is compact JSON on stdout

Why PostZen for AI

Compact JSON output

CLI success responses go to stdout as one compact JSON line. API errors use stderr and exit code 1; usage errors exit 2.

12 MCP tools

PostZen exposes 11 generated API operations plus verifyApiKey through the hosted MCP server.

One OpenAPI contract

Generated MCP tools, CLI commands, and SDK source all start from the same OpenAPI 3.1 document.

OAuth or Bearer keys

Interactive MCP clients can use OAuth 2.1. Headless agents can send a PostZen API key in an Authorization header.

Three post modes

Agents can publish now, schedule for an ISO-8601 time, or save a draft. A create request selects one mode.

Idempotent creates

Send x-request-id with a create call. A retry with the same value returns the original post instead of creating a duplicate.

CLI

Terminal-native social publishing

Install one zero-runtime-dependency Node package. Commands map to the API, write compact JSON to stdout, and use meaningful exit codes.

terminal
# List connected accountspostzen accounts:list --status connected# Upload media and receive its public URLpostzen media:upload ./launch.mp4# Pipe compact JSON into another toolpostzen profiles:list | jq '.profiles[].name'

MCP server

Natural-language social publishing

Point a remote MCP client at mcp.postzen.dev. The server exposes 12 tools for profiles, accounts, connections, media presigning, and post creation.

.cursor/mcp.json
{  "mcpServers": {    "postzen": {      "url": "https://mcp.postzen.dev/mcp",      "headers": {        "Authorization": "Bearer pzn_live_..."      }    }  }}

REST API + SDKs

Build from your backend

Use the versioned REST API or the published Node and Python packages. This Python example uses the current 1.0.0 package and an idempotency key.

python-sdk-v1.py
from datetime import datetimeimport osimport postzenconfiguration = postzen.Configuration(    access_token=os.environ["POSTZEN_API_KEY"])with postzen.ApiClient(configuration) as api_client:    posts = postzen.PostsApi(api_client)    request = postzen.CreatePostRequest(        content="We shipped 🚀",        scheduled_for=datetime.fromisoformat(            "2026-08-01T09:00:00+00:00"        ),        platforms=[postzen.CreatePostTarget(            platform=postzen.PublicPlatformInput.X,            account_id="acc_123",        )],    )    posts.create_post(        request,        x_request_id="launch-2026-08-01",    )

AI-ready docs

Documentation built for humans and agents

Use the full text export for model context, or point tools at the API contract and focused integration guides.

Works with

MCP

Claude, Cursor, and remote MCP clients

Connect to mcp.postzen.dev over Streamable HTTP. Interactive clients can use OAuth; automation can use a Bearer API key.

CLI + JSON

Shells, CI, and custom agents

The zero-runtime-dependency CLI maps commands to the API and returns machine-readable JSON with meaningful exit codes.

REST + SDKs

Backend automation

Call the versioned REST API or use the published Node and Python packages from your own service.

Supported platforms

Give your agent a social publishing API

Start with the hosted MCP server, CLI, REST API, or an official SDK package.

Get started