Postmcp Mcp Server

io.github.postmcp由 GitHub 帳號 postmcp 發布v1.0.1更新於 Oct 25, 2026

Publish and schedule posts to LinkedIn, X, Facebook, Instagram, Threads, Bluesky and YouTube Shorts.

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

讓 AI 助理向 LinkedIn、X、Facebook、Instagram、Threads、Bluesky 和 YouTube Shorts 發布及排程社群貼文。

可以做什麼
讀取工作區、已連結帳號及其權杖狀態、貼文佇列,以及單篇貼文或單一帳號的分析資料,可選擇付費從平台即時重新整理。起草、排程、改期、發布、重試或刪除貼文,可指定個別帳號或整個平台,並支援依帳號自訂文案。發布前執行預檢,檢查字數限制、未連結帳號、媒體規則和點數消耗,不會真的送出。透過簽章 URL 上傳本機媒體、依 URL 匯入公開檔案或生成圖片,再附加單一媒體或有序的輪播與圖集。在一次請求中依序批次執行最多 20 個工具呼叫。
適用情境
適合讓助理在多個社群平台起草、排程和發布貼文、查看成效,或管理發布佇列而不必切換到另一個後台。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js,也可架設為 HTTP 模式。需要 PostMCP AI 帳號,並在 POSTMCPAI_API_KEY 提供金鑰;POSTMCPAI_PROJECT_ID 為選用,用來指定工作區。需要能連線到 PostMCP 後端的網路。
安裝前請注意
此 API 金鑰可向已連結的社群帳號發布內容,請勿放入共用設定或 URL。發布、更新、改期和刪除貼文會直接作用於真實帳號。點數依實際投遞的帳號計費,含連結的文案另加費用,生成圖片在付費方案上消耗 20 點。重新整理分析資料也會消耗點數。貼文內容和媒體會傳送給 PostMCP,再傳送到各社群平台。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Postmcp Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

PostMCP AI Model Context Protocol (MCP) Server

[npm version] [License: MIT] [MCP Compatible]

Official PostMCP AI Model Context Protocol (MCP) Server. Connect your social media publishing pipelines directly into AI assistants, desktop applications, IDE workflows, and web environments like Claude Desktop, Claude.ai, Cursor, and ChatGPT Custom GPTs.

Supported platforms include LinkedIn, X (Twitter), Facebook, Instagram, Threads, Bluesky, and YouTube Shorts.


🚀 Features & Capabilities

  • 🤖 20 Built-in Tools: Workspaces, connected accounts and their token health, the post queue, pre-flight checks, create/schedule/reschedule/publish/retry/delete, per-post and per-profile analytics, media uploads, image generation, and batching.
  • 🖼️ Carousels & galleries: Pass mediaUrls to publish a carousel on Instagram and Threads, a multi-photo post on Facebook and LinkedIn, or a four-image gallery on X and Bluesky - one call, every network's ceiling checked up front.
  • ⚡ Dual Transport Modes: Native Stdio mode (for local desktop apps & IDEs) and Streamable HTTP mode (for web services, Claude.ai, and remote connectors).
  • 🔑 Flexible Authentication: Auto-detects API key from environment variables (POSTMCPAI_API_KEY), URL query parameters (?apikey=YOUR_KEY), or HTTP authorization headers (x-api-key, Bearer token).
  • 🗂️ Multi-Workspace Aware: The API key carries its own workspace, so a bare key is enough. To act on another one, every tool takes an optional workspaceId, also settable per connection (?projectId=..., x-project-id) or per process (POSTMCPAI_PROJECT_ID).
  • 🤖 ChatGPT Actions Compatible: Includes built-in OpenAPI 3.0 specification generator (/openapi.json) and REST endpoints (/api/tools/:name) for ChatGPT Custom GPT integration.
  • 🔒 OAuth with PKCE and RFC 9728: Per-user consent, persistent encrypted grants, rotating tokens and DCR for ChatGPT/Codex. Requires the production settings in OAUTH.md; API-key clients remain supported.
  • 🧩 Installable plugin: Account onboarding, publishing, scheduling and analytics workflows. See PLUGIN.md and run npm run package:plugin.

📁 Repository Architecture

mcp-server/├── bin/│   └── cli.js            # Executable CLI entry point (Stdio / HTTP mode runner)├── src/│   ├── config.js         # Centralized configuration & environment loader│   ├── client.js         # Backend API client, API key & workspace extraction│   ├── platforms.js      # Platform limits, credit pricing & post cost helper│   ├── tools/│   │   ├── definitions.js# MCP tool JSON schemas & parameter specifications│   │   ├── handlers.js   # MCP tool execution handlers│   │   └── index.js      # Tool definitions aggregator│   ├── server.js         # MCP Server instance factory│   ├── routes/│   │   ├── oauth.js      # OAuth 2.0 & RFC 9728 discovery endpoints│   │   ├── openapi.js    # OpenAPI 3.0 schema & ChatGPT REST endpoints│   │   ├── mcpHttp.js    # MCP Streamable HTTP transport (/mcp)│   │   └── health.js     # Health check & system metadata endpoints│   ├── app.js            # Express application factory│   └── index.js          # Main library entry point├── index.js              # Executable wrapper script├── package.json└── README.md

⚙️ Environment Configuration

Environment VariableDescriptionDefault Value
POSTMCPAI_API_KEYRequired. Your secret API key from the PostMCP AI dashboard.None
POSTMCPAI_API_URLBackend API root. Only set for a self-hosted or local backend.https://api.postmcpai.com
POSTMCPAI_PROJECT_IDOptional. Overrides the workspace the API key is bound to. Overridden in turn by a call's workspaceId.The workspace the API key was issued from
PORTSetting this launches the server in Remote Streamable HTTP Mode.None (Defaults to Stdio Mode)

🛠️ MCP Tools Reference

Every tool below also accepts an optional workspaceId (from list_workspaces) to act on a specific workspace.

Reading

Tool NameDescriptionRequiredOptional
get_user_infoAuthenticated user: plan, credit balance, active workspace and role.—workspaceId
list_workspacesEvery workspace the user belongs to, with ids, roles, and connected platforms.——
get_connected_accountsConnected social profiles with the profileId needed to target them.—workspaceId
get_account_healthConnections whose token expired or is close to it and need reconnecting.—workspaceId
get_profile_analyticsA connected profile's followers, following, post count and views from its network. Stored reading is free; refresh reads the network now for 1 credit.platform, profileIdrefresh
list_postsPost queue, newest first, with per-profile delivery status, pagination and counts.—status, page, limit, all
get_postOne post in full: which profiles received it, live URLs, and per-profile errors.id—
get_post_analyticsViews, likes, comments, shares, saves and clicks per profile, plus the raw platform metrics. Stored reading is free; refresh reads the networks now for 1 credit.idrefresh

Writing

Tool NameDescriptionRequiredOptional
preflight_postDry run: character limits, unconnected profiles, missing media, carousel ceilings, credit cost. Publishes nothing.contenttargetAccounts, platforms, mediaUrl, mediaUrls
create_postDraft, schedule, or immediately publish a post to named profiles. Each profile becomes its own post with its own id. Several mediaUrls publish as a carousel.contenttargetAccounts, variants, platforms, publishImmediately, scheduleDate, scheduleTime, timezone, mediaUrl, mediaUrls, youtube
publish_post_nowPublish an existing post immediately; also retries a failed post, skipping delivered profiles.id—
update_postUpdate content, target profiles, schedule, media, or status. mediaUrls replaces the whole attachment set.idcontent, targetAccounts, platforms, scheduleDate, scheduleTime, timezone, mediaUrl, mediaUrls, youtube, status
reschedule_postMove a post to a new slot, keeping copy and targets. Re-arms failed and draft posts.id, scheduleDate, scheduleTimetimezone
reset_stuck_postRelease a post stuck mid-publish so it can be retried. Delivered profiles keep their state.idforce
delete_postCancel and delete a scheduled or failed post.id—
generate_imageGenerate a post image and return its hosted URL for mediaUrl. Costs 20 credits; paid plans only.promptstyleImageUrl
create_media_upload_urlAuthorize a direct image/video upload; returns a signed PUT URL and the future public URL.fileName, contentType, fileSizeworkspaceId
complete_media_uploadRegister a successfully uploaded file in the media library and return mediaUrl.url, key, fileName, contentType, fileSizeworkspaceId
import_media_from_urlCopy a public image/video into storage and the media library; returns mediaUrl.urlworkspaceId

Media uploads

For a local file, the MCP client needs an HTTP upload capability:

  1. Call create_media_upload_url with fileName, contentType (MIME type), and fileSize (bytes). For example: { "fileName": "launch.png", "contentType": "image/png", "fileSize": 245760 }.
  2. PUT the raw file bytes to the returned uploadUrl with the returned headers. Do not send your PostMCP API key to storage. The URL expires after expiresIn seconds (normally 900); request another if it expires. The file is not uploaded merely by creating the URL.
  3. After the PUT succeeds, call complete_media_upload with the returned publicUrl as url, the returned key, and the same file metadata. Use the same workspaceId on both tools. This registers the file; it does not transfer or verify the bytes.
  4. Use the returned mediaUrl in create_post or update_post, or collect several URLs in mediaUrls for a carousel.

For an existing public file, call import_media_from_url with { "url": "https://example.com/launch.png" }. The backend downloads it and returns the stored mediaUrl in one call. The URL must serve the file directly without authentication; private-network URLs are rejected by the backend.

Storage supports PNG, JPEG, GIF, WebP, AVIF, HEIC, MP4, MOV, WebM and M4V, with a 25 MiB image ceiling and a 512 MiB video ceiling. Individual social platforms have stricter publishing requirements; use preflight_post before publishing. File bytes and base64 never travel through the MCP JSON request. If library registration fails after storage succeeds, the result includes librarySaved: false and a warning while preserving the usable mediaUrl.

Batching

Tool NameDescriptionRequiredOptional
multicallRun up to 20 of the tools above in one request, in order. Tool names are validated before anything executes, so a typo cannot leave half a batch written. Cannot nest.callsstopOnError, workspaceId
json
{  "calls": [    { "id": "img", "tool": "generate_image", "arguments": { "prompt": "launch banner" } },    {      "tool": "create_post",      "arguments": {        "content": "We shipped it 🚀",        "targetAccounts": [          { "platform": "linkedin", "profileId": "lin_7741903" },          { "platform": "twitter", "profileId": "tw_1293847", "content": "We shipped it 🚀" }        ],        "scheduleDate": "2026-09-01",        "scheduleTime": "10:00",        "timezone": "Asia/Kolkata"      }    }  ],  "stopOnError": true}

The reply carries one entry per call — { id, tool, ok, result } or { id, tool, ok: false, error } — plus counts and, when a failure stopped the batch, the calls that were skipped.

Carousels

mediaUrls is the ordered attachment set. One URL is an ordinary media post; two or more publish as a multi-media post on every network but YouTube, with the first URL as the cover:

PlatformItems per postVideo in a set of several?Lands as
Instagram2–10yesCarousel
Threads2–20yesCarousel
Facebookup to 10noMulti-photo post
LinkedInup to 20noMulti-image post
X / Twitterup to 4noGallery on one tweet
Blueskyup to 4noGallery on one post
YouTube1—One video per upload
json
{  "content": "Five things we learned shipping v2 👉",  "targetAccounts": [    { "platform": "instagram", "profileId": "17841400000000" },    { "platform": "threads", "profileId": "9988776655" },    { "platform": "twitter", "profileId": "tw_1293847",      "mediaUrls": ["https://cdn.example.com/v2/1.png", "https://cdn.example.com/v2/2.png", "https://cdn.example.com/v2/3.png", "https://cdn.example.com/v2/4.png"] }  ],  "mediaUrls": [    "https://cdn.example.com/v2/1.png",    "https://cdn.example.com/v2/2.png",    "https://cdn.example.com/v2/3.png",    "https://cdn.example.com/v2/4.png",    "https://cdn.example.com/v2/5.png"  ],  "scheduleDate": "2026-09-01",  "scheduleTime": "10:00",  "timezone": "Asia/Kolkata"}
  • Only Instagram and Threads mix video into a carousel; everywhere else a set of several must be images only, and a video goes out on its own.
  • create_post refuses a set a target will not take before any credits are spent, naming the profile and the rule. preflight_post with the same mediaUrls reports the same thing plus a mediaSetLimits map, so check first when one carousel goes to several networks.
  • A profile can carry its own mediaUrls on its targetAccounts entry (or in variants as { "twitter": { "mediaUrls": [...] } }), replacing the shared set - the way to give X and Bluesky a four-slide cut of a longer carousel.
  • Every slide is copied into PostMCP's own storage at write time, like a single attachment, so a host that expires the links later does not break the scheduled post. One slide failing at publish time fails that profile's post rather than publishing a shorter carousel; publish_post_now retries it.
  • update_post with mediaUrls replaces the whole set (add, remove or reorder slides); an empty array removes all media. Every post returned by list_posts / get_post carries mediaUrls alongside mediaUrl.

Notes for clients

  • Target profiles, not platforms. targetAccounts sends only to the profiles named; platforms fans out to every connected profile on each platform.
  • One post per profile. create_post stores a separate post per targeted profile, so each can be edited, retried or cancelled on its own. Give per-profile copy through targetAccounts[].content or the variants map.
  • Always pass timezone when a wall-clock time matters. The backend defaults to UTC, so a 9:00 IST post scheduled without a zone goes out at 14:30 IST.
  • Credits are charged per profile delivered to (X/Twitter costs 5, others 1), plus a one-off 50-credit surcharge when the copy contains a link. preflight_post reports this before you commit.
  • Analytics are read on request, never in the background. list_posts and get_connected_accounts carry what the last reading stored, free. get_post_analytics (one post, every network it went to) and get_profile_analytics (one connected profile: followers, posts, views) with refresh: true read the network now for 1 credit each; without it, the stored reading is free. engagements is likes + comments + shares on every network, so it compares across platforms. A null means the network does not report that metric (Bluesky has no views), an error naming reconnect means the account predates the insights permission and its owner must reconnect it, and unavailable: true means the network never answers for that kind of post (LinkedIn personal profiles).

💻 Client Integration Guides

1. Claude Desktop App (Stdio Mode)

Add the configuration below to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{  "mcpServers": {    "postmcpai": {      "command": "npx",      "args": ["-y", "@postmcpai/server"],      "env": {        "POSTMCPAI_API_KEY": "pmcp_sec_your_secret_api_key_here"      }    }  }}

2. Cursor IDE

  1. Open Cursor Settings -> Features -> MCP.
  2. Click + Add New MCP Server.
  3. Fill in the details:
    • Name: postmcpai
    • Type: command
    • Command: npx -y @postmcpai/server
  4. Under Environment Variables, add:
    • POSTMCPAI_API_KEY = pmcp_sec_your_secret_api_key_here
  5. Click Save.

3. Claude.ai & Remote Web Connectors (Streamable HTTP / SSE Mode)

Host this server on any cloud service (Render, Railway, Fly.io, Vercel) or tunnel your local machine using ngrok.

Launching in HTTP Mode:
bash
export PORT=3000# Each remote caller supplies its own API key or OAuth token.
npm run start:sse
Connecting to Claude.ai:
  1. Provide your public MCP URL with your API key attached: https://your-hosted-domain.com/mcp?apikey=pmcp_sec_your_secret_api_key_here
  2. Claude.ai will discover tool capabilities via /mcp and authenticate seamlessly.
  3. That URL is all you need: the key is bound to the workspace it was issued from, so tools act on that workspace without being told. To point the same key at a different workspace, append &projectId=YOUR_WORKSPACE_ID (or send an x-project-id header); individual tool calls can still override either with workspaceId.

4. ChatGPT Custom GPTs (REST Actions)

  1. When configuring a Custom GPT Action, specify your server URL (e.g. https://your-hosted-domain.com).
  2. Import the OpenAPI schema directly from: https://your-hosted-domain.com/openapi.json
  3. Set Authentication to API Key (Bearer Authorization or custom x-api-key). This is a GPT Actions integration, not a per-customer OAuth plugin. For the plugin, use OAUTH.md.

5. Programmatic Node.js Library Usage

You can also use @postmcpai/server as a library in your own Node.js backends:

js
import { createServer, createExpressApp, makeBackendRequest } from "@postmcpai/server";
// Create a standalone MCP Server instanceconst mcpServer = createServer(() => process.env.POSTMCPAI_API_KEY);
// Or create an Express app with all remote routes attachedconst app = createExpressApp();app.listen(3000);

🧪 Local Testing & Development

bash
# Clone the repositorygit clone https://github.com/postmcp/postmcp-mcp-server.gitcd postmcp-mcp-server
# Install dependenciesnpm install
# Start in Stdio Modenpm start
# Start in HTTP Mode with hot reloadnpm run dev

📄 License

Distributed under the MIT License. Copyright © 2026 PostMCP AI.

來源:README.md,提交 e6f2f48

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分