Schedule social media posts with an AI agent and Postiz MCP
An agent can turn a publishing brief into a scheduled social post when it has access to a scheduling tool. Postiz provides that tool through MCP: the agent discovers your connected accounts, reads each platform’s requirements, submits structured content, and checks the result.
Documentation checked November 9, 2026. This is a documentation-based walkthrough; no live account was connected and no posts were published for this article.
What you will build
Our example schedules a text post to a connected X account for November 16, 2026 at 09:00 in Asia/Shanghai. You need a Postiz workspace, a connected social account, and an MCP host that supports remote Streamable HTTP and the chosen authentication method. Subscription access and platform requirements depend on your account and deployment.
The first pass only reads accounts and prepares a preview. After you approve the exact content, account, and date, the agent creates the scheduled post. The final check confirms the saved record. You can follow this workflow in an MCP host without writing an agent from scratch.
What MCP does between the agent and Postiz
Model Context Protocol (MCP) standardizes how a host discovers and invokes tools. The model proposes a tool call; the host’s MCP client sends it to the Postiz server. Postiz validates the request and its backend stores the post and handles publishing at the requested time.
You: publishing brief + approval
↓
Agent in an MCP host: plan, choose tools, interpret results
↓ MCP client: tools/list → tools/call
Postiz MCP server: expose schemas, authenticate, execute
↓
Postiz backend: calendar + publishing jobs
↓ at the scheduled time
Social platform: accept or reject the publication
↑
Agent checks Postiz status and reports the outcomeAfter initialization, tools/list exposes tool names and input schemas. A tools/call request identifies a tool and supplies its arguments. MCP does not write the copy, choose your editorial policy, or run the future publishing job. Those responsibilities belong to the agent, your workflow, and Postiz respectively. The agent does not have to remain online until publication.
If Claude is your host and you need help with connection setup, follow the Claude Desktop and Claude Code MCP setup guide, then return here for Postiz’s endpoint, authentication, and account discovery.
1. Connect Postiz to your MCP host
Connect your target social account in Postiz first. For a token-based connection, obtain your API key in Settings → Developers → Public API. Postiz documents the following cloud endpoint with Bearer authentication:
Transport: Streamable HTTP
URL: https://mcp.postiz.com/mcp
Authorization: Bearer YOUR_POSTIZ_API_KEYEnter these in your host’s remote MCP server settings using its supported secret storage. This is connection information, not a universal JSON configuration: hosts use different configuration formats. Postiz also advertises hosted OAuth sign-in; use the official connection flow when your host supports it. For self-hosting, follow the deployment documentation for the correct host, proxy, and authentication paths.
Keep credentials out of prompts, screenshots, and committed configuration. Postiz also supports a key embedded in the URL, but the Bearer form avoids placing the key in the endpoint URL. Treat the credential as write-capable access, and require host-side approval for publishing tools where your host supports it.
Reconnect or refresh tools, then ask: “List my connected social accounts using Postiz. Do not create, schedule, or publish anything.” A successful response should come from integrationList, rather than an account name guessed by the model.
2. Discover the actual account and platform rules
| Tool | Why the agent calls it |
|---|---|
integrationList | Find the account ID, name, and platform. Optionally filter by a group from groupList. |
integrationSchema | Read posting rules, length limits, required settings, and platform helpers. |
triggerTool | Resolve dynamic options when required, such as a destination channel or page. |
schedulePostTool | Create a draft, schedule a post, or publish immediately, according to its type. |
postsListTool | Read stored posts in a UTC date range and inspect their state. |
Call integrationSchema with the returned platform and the correct isPremium value. Confirm premium status rather than assuming it from a Postiz plan or an account name. Use the real integration ID when creating the post; a platform label such as x does not identify a particular account.
For multiple brands, select the group first and verify every destination. For multiple platforms, fetch each schema and adapt the text, media, and settings separately. A valid X post does not automatically satisfy Instagram or LinkedIn requirements.
3. Prepare a preview with an explicit timezone
Give the agent a bounded brief like this:
Prepare one text-only X post:
"Our new MCP guide is live. Learn how agents use tools to turn plans into actions."
Target: show me the connected X account name and integration ID.
Time: November 16, 2026, 09:00 Asia/Shanghai.
Read the platform rules and prepare a preview first.
Show the exact copy, destination, local time, UTC time, and settings.
Do not call schedulePostTool until I approve this specific preview.
After approval, create exactly one scheduled post, never type "now".
Return the post ID and verify the saved record.For this example, 2026-11-16 09:00 Asia/Shanghai = 2026-11-16T01:00:00.000Z. Postiz’s scheduling tool expects a UTC datetime. Replace this example with a future date when you follow the tutorial. For other zones, use a timezone-aware conversion that handles daylight saving; avoid interpreting “tomorrow morning” without a date and zone.
A preview in chat performs no Postiz write. Creating a stored draft uses the same write tool with type: "draft", which needs its own authorization. The approval pause is a workflow or host control; MCP itself does not guarantee an editorial review gate. In a custom agent, enforce the pause in code rather than relying only on a prompt.
4. Submit the approved post with schedulePostTool
The following is an illustrative MCP request body, not a shell command or a complete connection session. The client supplies the request ID. Replace the integration ID, verify premium status, choose a future date, and populate settings from the current platform schema. An empty settings array only works when no settings are required.
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "schedulePostTool",
"arguments": {
"socialPost": [
{
"integrationId": "REPLACE_WITH_VERIFIED_X_INTEGRATION_ID",
"isPremium": false,
"date": "2026-11-16T01:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [
{
"content": "<p>Our new MCP guide is live. Learn how agents use tools to turn plans into actions.</p>",
"attachments": []
}
],
"settings": []
}
]
}
}
}Postiz expects HTML content using its allowed tags; each text line should be wrapped in <p> tags. Here, one socialPost item targets one account at one time. On thread-based platforms, additional postsAndComments items become thread posts; on comment-based platforms they become comments. Keep this first example to one item.
The tool documents returned postId and integration fields on success, or validation errors on failure. Read both the MCP result and the application-level response. A response that contains errors is not a successful schedule.
5. Verify the saved record and publication state
Call postsListTool with startDate: "2026-11-16T00:00:00.000Z" and endDate: "2026-11-17T00:00:00.000Z" to cover this example’s UTC publication time. Match the returned post ID, integration ID, content, and publishDate against the approved preview. Check the Postiz calendar as well.
| State | What to report |
|---|---|
DRAFT | Saved as a draft; not queued for publication. |
QUEUE | Queued in Postiz for the saved time; publication is still pending. |
PUBLISHED | Postiz reports publication; check the destination post for delivery verification. |
ERROR | Publishing failed; inspect the error and correct its cause before retrying. |
A useful report is: “Postiz returned post ID …; the saved record targets account … at 09:00 Asia/Shanghai / 01:00 UTC and is in QUEUE.” Report that only after reading the actual results. A tool call being accepted does not establish that the social platform has already published the post.
Troubleshooting and duplicate prevention
- No accounts: check the workspace, group filter, and connected channels in Postiz. Do not invent an integration ID.
- Authentication failure: verify the endpoint and token locally. After key rotation, update the client’s stored credential and reconnect.
- Validation errors: refresh
integrationSchema, check content length, HTML, media requirements, and required settings. Do not silently switch platforms or publish immediately. - Timeout after creation: query the relevant date range and inspect the calendar before resubmitting. A timeout can occur after the backend has stored the post. The documented tool schema does not expose an idempotency key; concurrent writers need application-level duplicate protection.
- Wrong time: compare the stored UTC value with the intended local time and the calendar timezone.
- Queued but not published: inspect the job and platform error in Postiz, including account authorization and media validity. For self-hosting, also check worker and proxy health.
postSettingsTool updates provider settings only; it does not change content or the publish date. For cancellation or rescheduling, use the documented Postiz UI or API path available in your deployment. Do not assume a delete or reschedule MCP tool exists.
For Instagram-specific content preparation, see Instagram Agent Skill. That guide compares Jake Schincariol’s drafting pack with PostZen’s fork. PostZen and Postiz are different services; their connection instructions are not interchangeable.
FAQ
Does MCP replace the Postiz API?
No. MCP exposes discoverable tools to an agent host. Postiz still executes the backend work. A direct API integration can implement the same business workflow, but you would maintain its tool definitions and adapter yourself.
Can the agent publish without approval?
The scheduling tool supports type: "now" as well as drafts and scheduled posts. Configure your host or agent runtime to gate writes according to your publishing policy. Connecting the server alone does not establish a mandatory approval step.
Can this workflow reply to existing comments?
The current Postiz MCP introduction says it does not expose tools to read or reply to existing comments. The postsAndComments field creates thread parts or attached comments during post creation; it is not an inbox reply tool.
Must the agent stay running until the post goes live?
No. Once the schedule is stored, Postiz handles the future publishing job. A later agent run can check status. Self-hosted deployments need their publishing infrastructure running.
Continue with MCP fundamentals, the agent tool loop tutorial, or durable workflows and approval checkpoints.
Sources
- Postiz — product and hosted agent connections
- Postiz MCP — introduction and authentication
- Postiz MCP — client setup
- Postiz MCP — tools and parameter reference
Figures reported by vendors are labeled as such in the article and linked to their original announcement.
Was this helpful?
Your feedback stays on this page — no tracking.