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.
PostZen's REST API reaches nine social platforms. Agents can use hosted MCP, the JSON CLI, or published Node and Python packages.
# 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 stdoutCLI success responses go to stdout as one compact JSON line. API errors use stderr and exit code 1; usage errors exit 2.
PostZen exposes 11 generated API operations plus verifyApiKey through the hosted MCP server.
Generated MCP tools, CLI commands, and SDK source all start from the same OpenAPI 3.1 document.
Interactive MCP clients can use OAuth 2.1. Headless agents can send a PostZen API key in an Authorization header.
Agents can publish now, schedule for an ISO-8601 time, or save a draft. A create request selects one mode.
Send x-request-id with a create call. A retry with the same value returns the original post instead of creating a duplicate.
CLI
Install one zero-runtime-dependency Node package. Commands map to the API, write compact JSON to stdout, and use meaningful exit codes.
# 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
Point a remote MCP client at mcp.postzen.dev. The server exposes 12 tools for profiles, accounts, connections, media presigning, and post creation.
{ "mcpServers": { "postzen": { "url": "https://mcp.postzen.dev/mcp", "headers": { "Authorization": "Bearer pzn_live_..." } } }}REST API + SDKs
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.
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", )Use the full text export for model context, or point tools at the API contract and focused integration guides.
Agent guide: sign up and mint an API key via device authorization.
Agent guide: install the SDK and publish a first post.
Full PostZen documentation in one text file for model context.
The machine-readable OpenAPI 3.1 contract for the public API.
Install, authentication, command reference, JSON output, and examples.
Remote server setup, authentication, and the 12-tool reference.
Published Node and Python package setup, source links, and examples.
MCP
Connect to mcp.postzen.dev over Streamable HTTP. Interactive clients can use OAuth; automation can use a Bearer API key.
CLI + JSON
The zero-runtime-dependency CLI maps commands to the API and returns machine-readable JSON with meaningful exit codes.
REST + SDKs
Call the versioned REST API or use the published Node and Python packages from your own service.
Start with the hosted MCP server, CLI, REST API, or an official SDK package.
Get started