postiz-mcp
postiz-mcp
用于任何兼容 MCP 客户端的规范 Postiz 客户端。全面覆盖 Postiz 公共 API(集成、帖子、上传、分析、视频),具备环境变量控制的写入功能、需确认的删除操作以及内置的速率限制防护。
既可作为 stdio MCP 服务器发布,也可作为同一包中的原生 OpenClaw 插件使用。
为什么使用它
如果您自托管了 Postiz,并希望 Claude / Codex / OpenClaw / Hermes / 任何 MCP 客户端与其交互,此工具为您提供了一个类型化、经过测试的单一用途工具界面,无需在每个工作流中手动编写 HTTP 调用。
Related MCP server: Postoria MCP Server
连接前的警告
Postiz 的写入操作具有公开的副作用。 执行
postiz_create_post并设置type: "now"(或近期排程)会发布到真实的社交账号上。一旦发布,虽然可以在 Postiz 中删除帖子,但平台端的帖子依然存在——Postiz 无法撤回它。Postiz 公共 API 默认限制为每小时 30 次请求。 此服务器会在本地跟踪限制,并在预算耗尽时拒绝发送请求。如果您的 Postiz 实例配置了更高的限制,请通过
POSTIZ_RATE_LIMIT_PER_HOUR进行覆盖。写入和删除操作默认关闭。 读取功能始终可用。要启用写入,必须显式设置
POSTIZ_ENABLE_WRITE=true。要启用删除,必须额外设置POSTIZ_ENABLE_DELETE=true并在工具调用中传递confirm: true。
工具
读取(始终开启)
postiz_list_integrations— 列出已连接的频道postiz_check_integration— 验证 API 密钥postiz_find_next_slot— 查找频道的下一个空闲发布时段postiz_list_posts— 获取指定日期范围内的帖子postiz_get_missing_content— 为缺少releaseId的 Postiz 帖子恢复平台内容postiz_list_notifications— Postiz UI 通知postiz_get_platform_analytics— 粉丝数 / 展示量 / 互动率postiz_get_post_analytics— 点赞 / 评论 / 分享postiz_list_voices— AI 视频语音目录postiz_get_provider_settings_schema— 构建时打包的各提供商settings架构(X、LinkedIn、Reddit 等)
写入(需要 POSTIZ_ENABLE_WRITE=true)
postiz_create_post— 排程 / 立即发布 / 草稿postiz_connect_integration— 为新频道生成 OAuth URLpostiz_update_post_status— 切换 草稿 ↔ 队列postiz_update_post_release_id— 将 Postiz 帖子重新关联到其平台端发布 IDpostiz_upload_file— 从本地文件或 base64 进行多部分上传postiz_upload_from_url— 服务器端获取postiz_generate_video— AI 视频生成
删除(需要 POSTIZ_ENABLE_WRITE=true + POSTIZ_ENABLE_DELETE=true + confirm: true)
postiz_delete_post— 级联删除整个组postiz_delete_post_group— 删除跨平台发布组中的所有帖子postiz_delete_integration— 断开频道连接 + 删除其所有已排程的帖子
安装
npm install -g postiz-mcp或从源码安装:
git clone https://github.com/solomonneas/postiz-mcp.git
cd postiz-mcp
npm install
npm run build配置
在您的 MCP 客户端配置中设置以下环境变量:
变量 | 必需 | 默认值 | 描述 |
| 是 | — | 基础 URL,例如 |
| 是 | — | 从 Postiz 设置 → 公共 API 获取的 API 密钥 |
| 否 |
| 设置为 |
| 否 |
| 设置为 |
| 否 |
| HTTP 超时时间 (ms) |
| 否 |
| 本地防护上限。服务器在存在响应头时仍会信任响应头。 |
| 否 | — | Cloudflare Access 服务令牌客户端 ID(仅在 Postiz 位于 CF Access 后方时需要) |
| 否 | — | Cloudflare Access 服务令牌密钥 |
获取 API 密钥
以管理员身份登录 Postiz
设置 → 公共 API → 生成 API 密钥
复制该值(根据您的 Postiz 版本,以
pos_开头或为原始 UUID)
Claude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"postiz": {
"command": "postiz-mcp",
"env": {
"POSTIZ_URL": "http://localhost:5000",
"POSTIZ_API_KEY": "your-api-key-here",
"POSTIZ_ENABLE_WRITE": "true",
"POSTIZ_ENABLE_DELETE": "false"
}
}
}
}Claude Code
claude mcp add postiz \
--env POSTIZ_URL=http://localhost:5000 \
--env POSTIZ_API_KEY=your-api-key-here \
--env POSTIZ_ENABLE_WRITE=true \
-- postiz-mcp添加 --scope user 以使其在任何目录中可用,而不仅仅是当前项目。
OpenClaw
postiz-mcp 也是一个 OpenClaw 原生插件。从源码检出:
openclaw plugin add /absolute/path/to/postiz-mcp \
--config '{
"baseUrl": "http://localhost:5000",
"apiKeyEnv": "POSTIZ_API_KEY",
"enableWrite": true,
"enableDelete": false
}'然后导出 API 密钥并重启网关:
export POSTIZ_API_KEY=your-api-key-here
systemctl --user restart openclaw-gateway
openclaw plugin list # confirm "postiz" is enabled您也可以在 OpenClaw 下将其作为常规 MCP 服务器运行:
openclaw mcp set postiz '{
"command": "postiz-mcp",
"env": {
"POSTIZ_URL": "http://localhost:5000",
"POSTIZ_API_KEY": "your-api-key-here",
"POSTIZ_ENABLE_WRITE": "true"
}
}'Hermes Agent
Hermes Agent 从 ~/.hermes/config.yaml 中的 mcp_servers 读取 MCP 配置。添加条目:
mcp_servers:
postiz:
command: "postiz-mcp"
env:
POSTIZ_URL: "http://localhost:5000"
POSTIZ_API_KEY: "your-api-key-here"
POSTIZ_ENABLE_WRITE: "true"或从源码检出:
mcp_servers:
postiz:
command: "node"
args: ["/absolute/path/to/postiz-mcp/dist/mcp-server.js"]
env:
POSTIZ_URL: "http://localhost:5000"
POSTIZ_API_KEY: "your-api-key-here"
POSTIZ_ENABLE_WRITE: "true"然后在 Hermes 会话中重新加载 MCP:
/reload-mcpCodex CLI
Codex CLI 通过 codex mcp add 注册 MCP 服务器:
codex mcp add postiz \
--env POSTIZ_URL=http://localhost:5000 \
--env POSTIZ_API_KEY=your-api-key-here \
--env POSTIZ_ENABLE_WRITE=true \
-- postiz-mcp或从源码检出:
codex mcp add postiz \
--env POSTIZ_URL=http://localhost:5000 \
--env POSTIZ_API_KEY=your-api-key-here \
--env POSTIZ_ENABLE_WRITE=true \
-- node /absolute/path/to/postiz-mcp/dist/mcp-server.jsCodex 将条目写入 ~/.codex/config.toml 中的 [mcp_servers.postiz]。使用以下命令验证:
codex mcp listPostiz 位于 Cloudflare Access 后方
如果您的 Postiz 通过 Cloudflare Tunnel + Access 暴露(例如 https://postiz.example.com),请在 Cloudflare Zero Trust 仪表板中生成服务令牌并添加环境变量:
export POSTIZ_CF_ACCESS_CLIENT_ID=your-cf-id.access
export POSTIZ_CF_ACCESS_CLIENT_SECRET=your-cf-secretMCP 服务器会在每次请求时将其作为 CF-Access-Client-Id / CF-Access-Client-Secret 转发。如果您忘记了它们,您将收到明确的 PostizCfAccessChallengeError,而不是令人困惑的 HTML 响应。
示例提示词
“列出我的 Postiz 上的集成。”
“为明天上午 9 点排程一条 Bluesky 帖子:'Just shipped postiz-mcp。'”
“LinkedIn 的下一个可用时段是什么?将这 4 条推文的线程排程到那个时间,并设置回复仅限已验证用户。”
“上周发布了什么?周二的 X 帖子表现如何?”
“向我展示 X 提供商的设置架构,以便我可以构建线程负载。”
提供商设置架构
postiz_get_provider_settings_schema 返回打包的各提供商 settings 参考(解析自 docs.postiz.com/public-api/providers/{slug}.md)。当您需要特定于提供商的字段(如 X 的 who_can_reply_post 或 LinkedIn 的 audience)时,请在 postiz_create_post 之前使用它。
这些架构由 GitHub Actions 工作流每月刷新一次,如果 Postiz 更新了任何提供商文档,它会自动打开一个 PR。手动刷新:
npm run refresh-schemas开发
npm install
npm run typecheck
npm test
npm run build许可证
MIT
Available Tools
20 toolspostiz_check_integrationA
Verify the configured Postiz API key is valid and reaches the configured baseUrl. Useful as a first call before any other tool — if this returns ok, every other tool can authenticate against the same instance.
Inputs: no named parameters.
postiz_connect_integrationA
Generate the OAuth authorization URL for connecting a new social channel. Returns a url the user must open in a browser to finish the flow — Postiz redirects back to its own callback. This tool does NOT run a callback server. Requires enableWrite.
Inputs: provider (required), refresh.
postiz_create_postA
Create, schedule, or immediately publish one or more posts via POST /api/posts. PUBLIC SIDE EFFECT: with type='now' or a near-term schedule, this lands on real social accounts. Use postiz_get_provider_settings_schema first to construct valid settings blocks. Requires enableWrite.
Inputs: type (required), date (required), posts (required), shortLink, +1 more.
postiz_delete_integrationA
Disconnect a connected social channel. Cascades — Postiz also deletes every scheduled post for that integration. Requires enableWrite + enableDelete + confirm=true. Returns ok:false / not_found on 404 (already disconnected).
Inputs: integrationId (required), confirm (required).
postiz_delete_postA
Delete a Postiz post by id. CASCADES — every post in the same group is removed. Already-published platform posts remain live. Requires enableWrite + enableDelete + confirm=true.
Inputs: postId (required), confirm (required).
postiz_delete_post_groupA
Delete every post in a group (cross-post unit) via DELETE /api/posts/group/{group}. Use when you want to retract a whole cross-post in one call. Requires enableWrite + enableDelete + confirm=true.
Inputs: group (required), confirm (required).
postiz_find_next_slotA
Return the next available posting time for a given integration. The slot respects the org's configured posting schedule, so this is the right answer to use as date in postiz_create_post when you don't have a specific time in mind.
Inputs: integrationId (required).
postiz_generate_videoA
Generate an AI video via POST /api/video/generate. COST IMPLICATION: video generation may bill against the configured Postiz video integration's credit pool. Requires enableWrite. Body shape is provider-specific — see Postiz video docs.
Inputs: body (required).
postiz_get_missing_contentA
Fetch recent platform-side content for a post whose Postiz releaseId is marked missing. Pair with postiz_update_post_release_id to reattach.
Inputs: postId (required).
postiz_get_platform_analyticsA
Get follower / impression / engagement analytics for a connected channel via GET /api/analytics/platform. Available metrics depend on what the platform exposes to Postiz.
Inputs: integrationId (required), date.
postiz_get_post_analyticsA
Get per-post engagement metrics (likes, comments, shares) via GET /api/analytics/post. Returns whatever the source platform exposes — different shape per provider.
Inputs: postId (required).
postiz_get_provider_settings_schemaA
Look up the settings block schema for a Postiz provider (X, LinkedIn, Reddit, etc.) — bundled at build time from docs.postiz.com. Returns a default-settings template, the provider's __type value, and (by default) the full markdown reference. Call this before postiz_create_post when you need provider-specific fields.
Inputs: provider (required), includeMarkdown.
postiz_list_integrationsA
List every connected social-media channel for the org behind the configured Postiz API key. Returns id, name, providerIdentifier (the value used as __type in post settings), profile, and disabled state. Use this BEFORE postiz_create_post to get the integration id you need to target.
Inputs: no named parameters.
postiz_list_notificationsA
List notifications, sorted most-recent first. Useful for surfacing posting failures, OAuth re-auth prompts, and new-feature notices Postiz shows in its UI.
Inputs: page.
postiz_list_postsA
List posts in a date range via GET /api/posts. Returns scheduled, queued, and published posts with their integration, content, state, and any platform release URL.
Inputs: startDate, endDate, display, customer.
postiz_list_voicesA
List available AI voices for video generation via GET /api/video/function?functionName=voices. Required input for postiz_generate_video — pick a voice id from the returned catalog.
Inputs: integrationId.
postiz_update_post_release_idA
Update the releaseId (and optionally releaseURL) of a Postiz post via PATCH /api/posts/{id}/release-id. Use to reconcile a Postiz post with the actual platform-side release after a missing-content event. Requires enableWrite.
Inputs: postId (required), releaseId (required), releaseURL.
postiz_update_post_statusA
Transition a Postiz post between DRAFT and QUEUE via PATCH /api/posts/{id}/status. Moving DRAFT→QUEUE re-enters the schedule using the post's existing publishDate. Requires enableWrite.
Inputs: postId (required), state (required).
postiz_upload_fileA
Upload a media file (image, video) to Postiz storage via POST /api/uploads/file. Returns { id, path } that you can pass into postiz_create_post value[].image[]. Requires enableWrite.
Inputs: filePath, base64, fileName, mimeType.
postiz_upload_from_urlA
Upload a media file from a public URL via POST /api/uploads/url. Postiz fetches the URL server-side, so this works for sources the MCP host can't reach. Returns { id, path } usable in postiz_create_post value[].image[]. Requires enableWrite.
Inputs: url (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a unique action and resource type. For example, postiz_create_post, postiz_delete_post, and postiz_list_posts are clearly distinct. Even overlapping actions like postiz_delete_post and postiz_delete_post_group are differentiated by scope (single vs. group). Descriptions clarify boundaries effectively.
All tools follow a consistent 'postiz_verb_noun' pattern with underscore separation. Verbs like check, connect, create, delete, find, generate, get, list, update, and upload are used uniformly. There is no mixing of camelCase or other conventions.
With 20 tools, the set is slightly above the typical 'well-scoped' range (3-15) but still reasonable given the breadth of Postiz's functionality (post management, analytics, AI video, integrations, file uploads). Each tool serves a distinct purpose.
The tools cover the main lifecycle: integration management, post CRUD, analytics, file uploads, and AI video generation. Minor gaps include no direct 'get post by ID' (though list_posts can retrieve it) and no interaction management (comments, etc.), but core workflows are well-supported.
Maintenance
Related MCP Connectors
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
Create, schedule, and publish social posts through the hosted SocialSpool MCP connector.
Publish, schedule, and manage social media posts across major platforms via the Postproxy API.
Manage social publishing workflows through OpenPost
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with the Postiz social media management platform through MCP tools. Supports creating and managing posts, retrieving integrations, and accessing account information through multiple transport protocols.2-

Postoria MCP Serverofficial
AlicenseAqualityBmaintenanceEnables MCP-compatible clients to create, schedule, queue, inspect, and delete Postoria posts through the Postoria Public API.1483 npm1MIT- AlicenseNot gradedqualityFmaintenanceMCP server for managing social media posts across multiple platforms using the Postiz API. Supports creating, updating, deleting posts, and generating videos.3MIT

@fopost/mcpofficial
AlicenseAqualityBmaintenanceEnables managing social media posts, accounts, and AI-powered content features from any MCP client, including scheduling, publishing, analysis, and AI caption generation.1468 npmMIT