postfast-mcp 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "name": "postfast",
13
13
  "description": "Schedule, manage, and analyze social media posts via PostFast. Supports Facebook, Instagram, X, TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram, and Google Business Profile.",
14
- "version": "0.14.0",
14
+ "version": "0.15.1",
15
15
  "author": {
16
16
  "name": "PostFast",
17
17
  "email": "me@peturgeorgievv.com"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "postfast",
3
3
  "description": "Schedule, manage, and analyze social media posts via PostFast. Supports Facebook, Instagram, X, TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram, and Google Business Profile. Needs POSTFAST_API_KEY set before Claude Code starts; in PostFast, open API in the sidebar and click Generate API Key.",
4
- "version": "0.14.0",
4
+ "version": "0.15.1",
5
5
  "author": {
6
6
  "name": "PostFast",
7
7
  "email": "me@peturgeorgievv.com"
@@ -13,7 +13,7 @@
13
13
  "mcpServers": {
14
14
  "postfast": {
15
15
  "command": "npx",
16
- "args": ["-y", "postfast-mcp@0.14.0"],
16
+ "args": ["-y", "postfast-mcp@0.15.1"],
17
17
  "env": {
18
18
  "POSTFAST_API_KEY": "${POSTFAST_API_KEY}"
19
19
  }
package/README.md CHANGED
@@ -167,6 +167,22 @@ Comments on your posts — TikTok, Instagram, Facebook Pages, and Threads — in
167
167
  | `set_inbox_conversation_status` | Triage: OPEN / SNOOZED / CLOSED |
168
168
  | `assign_inbox_conversation` | Assign a conversation to a workspace member (or unassign) |
169
169
 
170
+ ### Webhooks
171
+
172
+ PostFast can send a signed JSON event to your own HTTPS endpoint when a post publishes or fails for good, or when an account connects, reconnects or disconnects. Deliveries follow the [Standard Webhooks](https://www.standardwebhooks.com) spec (`webhook-id`, `webhook-timestamp` and `webhook-signature` headers), so any Standard Webhooks library verifies them. On the hosted connector, only workspace admins can use these tools.
173
+
174
+ | Tool | Description |
175
+ |------|-------------|
176
+ | `list_webhook_endpoints` | List the workspace's endpoints, turned-off ones included (`active`, `disabledReason`, last success and failure) |
177
+ | `get_webhook_endpoint` | Fetch one endpoint |
178
+ | `create_webhook_endpoint` | Register an HTTPS URL for some or all of `post.published`, `post.failed`, `account.connected` and `account.disconnected`; the answer carries the signing secret, which is never shown again |
179
+ | `update_webhook_endpoint` | Change an endpoint's URL, events or description, or turn it off and back on |
180
+ | `delete_webhook_endpoint` | Delete an endpoint together with its delivery log |
181
+ | `test_webhook_endpoint` | Send a test event, or a sample of one event type, and see how your receiver answered |
182
+ | `list_webhook_deliveries` | An endpoint's delivery log for the last 30 days: each attempt's status code, and the payload as sent |
183
+
184
+ Store the secret in your receiver as soon as the endpoint is created. An endpoint receives every event of its types from the whole workspace; to follow one account, filter on `data.post.socialMediaId` or `data.account.id`. A workspace can have 5 active endpoints.
185
+
170
186
  ## Supported Platforms
171
187
 
172
188
  Facebook, Instagram, X (Twitter), TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram, Google Business Profile
@@ -1,4 +1,4 @@
1
- import type { AnalyticsResponse, AppAction, AppCalendar, AppEntrypoint, AppPostDetail, FollowerHistory, GbpLocation, PaginatedPosts, PinterestBoard, Place, Platform, SignedUploadUrl, SocialAccount, UploadType, YouTubePlaylist } from './types.js';
1
+ import type { AnalyticsResponse, AppAction, AppCalendar, AppEntrypoint, AppPostDetail, FollowerHistory, GbpLocation, PaginatedPosts, PaginatedWebhookDeliveries, PinterestBoard, Place, Platform, SignedUploadUrl, SocialAccount, UploadType, WebhookEndpoint, WebhookEvent, WebhookTestResult, YouTubePlaylist } from './types.js';
2
2
  export interface ListPostsArgs {
3
3
  page: number;
4
4
  limit: number;
@@ -125,6 +125,30 @@ export interface LocalUploadResult {
125
125
  type: UploadType;
126
126
  contentType: string;
127
127
  }
128
+ export interface CreateWebhookEndpointArgs {
129
+ url: string;
130
+ events: WebhookEvent[];
131
+ description?: string;
132
+ }
133
+ /** Omitted fields keep their value; `description: null` removes it. */
134
+ export interface UpdateWebhookEndpointArgs {
135
+ id: string;
136
+ url?: string;
137
+ events?: WebhookEvent[];
138
+ description?: string | null;
139
+ active?: boolean;
140
+ }
141
+ export interface TestWebhookEndpointArgs {
142
+ id: string;
143
+ /** Send a sample of this event type instead of `webhook.test`. */
144
+ sampleEvent?: WebhookEvent;
145
+ }
146
+ export interface ListWebhookDeliveriesArgs {
147
+ endpointId: string;
148
+ page?: number;
149
+ limit?: number;
150
+ getCount?: boolean;
151
+ }
128
152
  /**
129
153
  * Everything the catalog tools need from a backend. The stdio bin implements
130
154
  * it over the public REST API (pf-api-key); the deployed host implements it
@@ -179,4 +203,14 @@ export interface BackendPort {
179
203
  deletedIds: string[];
180
204
  notFoundIds: string[];
181
205
  } | unknown>;
206
+ listWebhookEndpoints?(workspaceId?: string): Promise<WebhookEndpoint[] | unknown>;
207
+ getWebhookEndpoint?(id: string, workspaceId?: string): Promise<WebhookEndpoint | unknown>;
208
+ createWebhookEndpoint?(args: CreateWebhookEndpointArgs, workspaceId?: string): Promise<WebhookEndpoint | unknown>;
209
+ updateWebhookEndpoint?(args: UpdateWebhookEndpointArgs, workspaceId?: string): Promise<WebhookEndpoint | unknown>;
210
+ /** Answers `{ ok: true }`. */
211
+ deleteWebhookEndpoint?(id: string, workspaceId?: string): Promise<{
212
+ ok: true;
213
+ } | unknown>;
214
+ testWebhookEndpoint?(args: TestWebhookEndpointArgs, workspaceId?: string): Promise<WebhookTestResult | unknown>;
215
+ listWebhookDeliveries?(args: ListWebhookDeliveriesArgs, workspaceId?: string): Promise<PaginatedWebhookDeliveries | unknown>;
182
216
  }
@@ -8,7 +8,7 @@ export { APP_RESOURCE_MIME_TYPE, APP_RESOURCE_URI, appViewHtml, assertAppOptions
8
8
  export { buildTools, registerCatalogTools, runTool, toolError, toolResult, type BuildToolsOptions, type ConfirmGateOptions, type RegisterToolsOptions, } from './build-tools.js';
9
9
  export { SERVER_INSTRUCTIONS, instructionsFor } from './instructions.js';
10
10
  export { InsufficientScopeError, insufficientScopeResult, type InsufficientScopeOptions, type ScopeChallengeOptions, type SecurityScheme, } from './scope-challenge.js';
11
- export { CAPTION_MIME_TYPES, CREATE_APPROVAL_STATUSES, CREATE_STATUSES, DOCUMENT_MIME_TYPES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, jsonParse, uploadTypeFor, workspaceIdField, } from './shared.js';
11
+ export { CAPTION_MIME_TYPES, CREATE_APPROVAL_STATUSES, CREATE_STATUSES, DOCUMENT_MIME_TYPES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, WEBHOOK_EVENTS, jsonParse, uploadTypeFor, workspaceIdField, } from './shared.js';
12
12
  export type { Binding, ResolvedTool, ResolvedToolAnnotations, ToolAnnotations, ToolDef, ToolIcon, } from './tool-def.js';
13
13
  export { ALL_TOOLS } from './tools/index.js';
14
14
  export * from './types.js';
@@ -8,7 +8,7 @@ export { APP_RESOURCE_MIME_TYPE, APP_RESOURCE_URI, appViewHtml, assertAppOptions
8
8
  export { buildTools, registerCatalogTools, runTool, toolError, toolResult, } from './build-tools.js';
9
9
  export { SERVER_INSTRUCTIONS, instructionsFor } from './instructions.js';
10
10
  export { InsufficientScopeError, insufficientScopeResult, } from './scope-challenge.js';
11
- export { CAPTION_MIME_TYPES, CREATE_APPROVAL_STATUSES, CREATE_STATUSES, DOCUMENT_MIME_TYPES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, jsonParse, uploadTypeFor, workspaceIdField, } from './shared.js';
11
+ export { CAPTION_MIME_TYPES, CREATE_APPROVAL_STATUSES, CREATE_STATUSES, DOCUMENT_MIME_TYPES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, WEBHOOK_EVENTS, jsonParse, uploadTypeFor, workspaceIdField, } from './shared.js';
12
12
  export { ALL_TOOLS } from './tools/index.js';
13
13
  export * from './types.js';
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,GAEjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,UAAU,GAIX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GAIxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,GAEjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,UAAU,GAIX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GAIxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,cAAc,YAAY,CAAC"}
@@ -7,6 +7,8 @@ export declare const INBOX_ITEM_STATE_ACTIONS: readonly ["HIDE", "UNHIDE", "DELE
7
7
  export declare const CREATE_STATUSES: readonly ["DRAFT", "SCHEDULED"];
8
8
  export declare const CREATE_APPROVAL_STATUSES: readonly ["PENDING_APPROVAL", "APPROVED"];
9
9
  export declare const SET_APPROVAL_STATUSES: readonly ["PENDING_APPROVAL", "IN_PROGRESS", "APPROVED", "REJECTED", "NEEDS_WORK"];
10
+ /** The event types a webhook endpoint can receive (webhook.test can't be chosen). */
11
+ export declare const WEBHOOK_EVENTS: readonly ["post.published", "post.failed", "account.connected", "account.disconnected"];
10
12
  export declare const IMAGE_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp"];
11
13
  export declare const VIDEO_MIME_TYPES: readonly ["video/mp4", "video/webm", "video/quicktime"];
12
14
  /** Caption files (.srt, .vtt) for controls.youtubeCaptionKey; never mediaItems. */
@@ -24,6 +24,13 @@ export const SET_APPROVAL_STATUSES = [
24
24
  'REJECTED',
25
25
  'NEEDS_WORK',
26
26
  ];
27
+ /** The event types a webhook endpoint can receive (webhook.test can't be chosen). */
28
+ export const WEBHOOK_EVENTS = [
29
+ 'post.published',
30
+ 'post.failed',
31
+ 'account.connected',
32
+ 'account.disconnected',
33
+ ];
27
34
  export const IMAGE_MIME_TYPES = [
28
35
  'image/jpeg',
29
36
  'image/png',
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js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ACN,QAAQ,EAAE;KACV,QAAQ,CACP,6FAA6F,CAC9F,CAAC"}
@@ -5,6 +5,7 @@ import { inboxTools } from './inbox.js';
5
5
  import { bulkPostTools, postTools } from './posts.js';
6
6
  import { tiktokTools } from './tiktok.js';
7
7
  import { uploadTools } from './uploads.js';
8
+ import { webhookTools } from './webhooks.js';
8
9
  import { workspaceTools } from './workspaces.js';
9
10
  /**
10
11
  * Every PostFast tool, in registration order. The order filtered to a binding
@@ -22,6 +23,7 @@ export const ALL_TOOLS = [
22
23
  ...tiktokTools,
23
24
  ...inboxConfirmTools,
24
25
  ...bulkPostTools,
26
+ ...webhookTools,
25
27
  ...appTools,
26
28
  ];
27
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,GAAG,SAAS;IACZ,GAAG,YAAY;IACf,GAAG,cAAc;IACjB,GAAG,WAAW;IACd,GAAG,UAAU;IACb,GAAG,WAAW;IACd,GAAG,iBAAiB;IACpB,GAAG,aAAa;IAChB,GAAG,QAAQ;CACZ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,GAAG,SAAS;IACZ,GAAG,YAAY;IACf,GAAG,cAAc;IACjB,GAAG,WAAW;IACd,GAAG,UAAU;IACb,GAAG,WAAW;IACd,GAAG,iBAAiB;IACpB,GAAG,aAAa;IAChB,GAAG,YAAY;IACf,GAAG,QAAQ;CACZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ToolDef } from '../tool-def.js';
2
+ export declare const webhookTools: ToolDef[];
@@ -0,0 +1,191 @@
1
+ import { z } from 'zod';
2
+ import { WEBHOOK_EVENTS } from '../shared.js';
3
+ /**
4
+ * Webhook endpoints: register, change, test and delete the URLs where PostFast
5
+ * sends signed events (Standard Webhooks), and read each endpoint's delivery
6
+ * log. A model learns the delivery rules only from these descriptions: the
7
+ * secret is returned once, an endpoint receives every event of its types from
8
+ * the whole workspace, the URL rules and the cap of 5 active endpoints, the
9
+ * retry schedule and what turns an endpoint off. The backend answers errors
10
+ * with a bare code, so the descriptions say what each code means.
11
+ *
12
+ * On the remote binding only workspace admins may call these tools, whatever
13
+ * the token's scopes, and registering or changing an endpoint sends workspace
14
+ * data to another server, so that text waits for the user's yes. Every def
15
+ * carries portMethod, so an adapter that predates this wave skips the tools
16
+ * instead of shipping broken ones.
17
+ */
18
+ /** Every webhook tool's scope, reads included (the backend gates them all on it). */
19
+ const SCOPES = ['webhooks:manage'];
20
+ const REMOTE_ADMIN_ONLY = " Only workspace admins can use this tool; for anyone else it fails with webhook.forbidden, which reconnecting doesn't fix.";
21
+ /** The shared text, then what only the remote or only the stdio binding gets. */
22
+ const describe = (binding, shared, remote = '', stdio = '') => shared + (binding === 'remote' ? remote + REMOTE_ADMIN_ONLY : stdio);
23
+ const READ = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
24
+ const ENDPOINT_ID = 'Webhook endpoint id (from list_webhook_endpoints)';
25
+ const URL_RULES = "The receiver's URL: https on port 443, with a public hostname that contains a dot (no IP address, no localhost or internal name, no user:password@) and resolves to public addresses; at most 2,048 characters. A URL that breaks a rule fails with webhook.urlNotHttps, webhook.urlPortNotAllowed, webhook.urlHostNotAllowed, webhook.urlPrivateAddress (it resolves to a private address), webhook.urlResolutionFailed (the hostname doesn't resolve) or webhook.invalidUrl.";
26
+ const EVENT_TYPES = "Event types to send, each at most once: post.published (a post was published), post.failed (a post failed for good, with the reason in data.post.lastError; never sent for a failure that will still be retried), account.connected (an account was connected or reconnected; data.reconnected is true for a reconnect, and data.externalId carries the connect link's externalId when it had one) and account.disconnected (PostFast paused an account, for example because its access expired or was revoked). webhook.test can't be chosen: only test_webhook_endpoint sends it.";
27
+ export const webhookTools = [
28
+ {
29
+ name: 'list_webhook_endpoints',
30
+ binding: 'both',
31
+ title: 'List Webhook Endpoints',
32
+ description: (binding) => describe(binding, "List the workspace's webhook endpoints: the URLs where PostFast sends a signed JSON event when a post publishes or fails for good, or when an account connects or disconnects. Oldest first, turned-off ones included. Each has id, url, events, description, active, disabledReason (GONE: its receiver answered 410 Gone; FAILING: its deliveries failed for five days and the workspace owner was emailed; null while it is active, or when a user turned it off), lastSuccessAt and lastFailureAt. The signing secret is never listed: create_webhook_endpoint returns it once. To see what was sent and how the receiver answered, use list_webhook_deliveries."),
33
+ inputSchema: {},
34
+ annotations: READ,
35
+ scopes: SCOPES,
36
+ portMethod: 'listWebhookEndpoints',
37
+ run: (port, _args, workspaceId) => port.listWebhookEndpoints(workspaceId),
38
+ },
39
+ {
40
+ name: 'get_webhook_endpoint',
41
+ binding: 'both',
42
+ title: 'Get Webhook Endpoint',
43
+ description: (binding) => describe(binding, "Fetch one webhook endpoint by id, with the fields list_webhook_endpoints gives (never the signing secret). An id that isn't in this workspace, or was deleted, fails with webhook.notFound."),
44
+ inputSchema: {
45
+ id: z.uuid().describe(ENDPOINT_ID),
46
+ },
47
+ annotations: READ,
48
+ scopes: SCOPES,
49
+ portMethod: 'getWebhookEndpoint',
50
+ run: (port, args, workspaceId) => port.getWebhookEndpoint(args.id, workspaceId),
51
+ },
52
+ {
53
+ name: 'create_webhook_endpoint',
54
+ binding: 'both',
55
+ title: 'Create Webhook Endpoint',
56
+ description: (binding) => describe(binding, 'Register a webhook endpoint: a URL where PostFast sends a signed JSON POST for every event of the chosen types, { id, type, timestamp, workspaceId, data }, where data.post is a post as list_posts returns it and data.account an account as list_accounts returns it. The endpoint gets these events from the whole workspace, for every account; a receiver that wants one account checks data.post.socialMediaId (or data.post.platform) or data.account.id. A workspace can have 5 active endpoints (turned-off ones don\'t count); one more fails with webhook.limitReached. The answer is the endpoint plus secret (whsec_…), shown this once: PostFast never returns it again, so give it to the user and tell them to store it in their receiver now (if it is lost, delete the endpoint and create a new one). The receiver checks every delivery with it as Standard Webhooks specifies: the webhook-id, webhook-timestamp and webhook-signature headers, verified over the raw request body; a Standard Webhooks library such as standardwebhooks does this. A delivery counts when the receiver answers 2xx within 15 seconds; redirects are not followed. Anything else is retried up to 7 more times over about a day (after 5 s, 5 min, 30 min, 2 h, 4 h, 6 h and 7 h). A 410 Gone answer turns the endpoint off at once, and five days of failures with no success turn it off and email the workspace owner. An event can arrive twice and events can arrive out of order, so the receiver should skip an id it has already handled. Offer test_webhook_endpoint to check the receiver.', ' Use only a URL the user gave you. From then on every such event, with its post or account data, goes to that URL, so show the user the URL and the event types and call this only after they say yes in the conversation.'),
57
+ inputSchema: {
58
+ url: z.url().max(2048).describe(URL_RULES),
59
+ events: z.array(z.enum(WEBHOOK_EVENTS)).min(1).max(4).describe(EVENT_TYPES),
60
+ description: z
61
+ .string()
62
+ .max(255)
63
+ .optional()
64
+ .describe('A note to tell endpoints apart, such as what the receiver is for (max 255 characters)'),
65
+ },
66
+ // Not destructive: it adds an endpoint and changes none. Open world: from
67
+ // then on PostFast sends workspace events to the URL's server. Not
68
+ // idempotent: a second call makes a second endpoint with its own secret.
69
+ annotations: {
70
+ readOnlyHint: false,
71
+ destructiveHint: false,
72
+ idempotentHint: false,
73
+ openWorldHint: true,
74
+ },
75
+ scopes: SCOPES,
76
+ portMethod: 'createWebhookEndpoint',
77
+ run: (port, args, workspaceId) => port.createWebhookEndpoint(args, workspaceId),
78
+ },
79
+ {
80
+ name: 'update_webhook_endpoint',
81
+ binding: 'both',
82
+ title: 'Update Webhook Endpoint',
83
+ description: (binding) => describe(binding, "Change a webhook endpoint: its url, events or description, or turn it off (active false) or back on (active true). Fields you omit keep their value; description null removes the description. A new url follows the rules of create_webhook_endpoint, keeps the same signing secret, and starts the endpoint's failure count afresh. active true turns an endpoint back on, whether PostFast turned it off (disabledReason GONE or FAILING) or a user did, and resets its failure count; it fails with webhook.limitReached when the workspace already has 5 active endpoints. Events that happen while an endpoint is off are never sent to it, not even after it is turned back on. An id that isn't in this workspace fails with webhook.notFound. Returns the updated endpoint.", ' A new url must be one the user gave you. Show the user what will change and call this only after they say yes in the conversation.'),
84
+ inputSchema: {
85
+ id: z.uuid().describe(ENDPOINT_ID),
86
+ url: z
87
+ .url()
88
+ .max(2048)
89
+ .optional()
90
+ .describe('New receiver URL, under the rules of create_webhook_endpoint'),
91
+ events: z
92
+ .array(z.enum(WEBHOOK_EVENTS))
93
+ .min(1)
94
+ .max(4)
95
+ .optional()
96
+ .describe('The event types to send from now on, replacing the current ones (the values create_webhook_endpoint takes)'),
97
+ description: z
98
+ .string()
99
+ .max(255)
100
+ .nullable()
101
+ .optional()
102
+ .describe('New note (max 255 characters), or null to remove it'),
103
+ active: z
104
+ .boolean()
105
+ .optional()
106
+ .describe('false turns the endpoint off; true turns it back on and resets its failure count'),
107
+ },
108
+ // Destructive: it overwrites the endpoint's settings, and events that
109
+ // happen while an endpoint is off, or of a type taken off it, are never
110
+ // sent. Idempotent: the same change again leaves the endpoint as it is.
111
+ annotations: {
112
+ readOnlyHint: false,
113
+ destructiveHint: true,
114
+ idempotentHint: true,
115
+ openWorldHint: true,
116
+ },
117
+ scopes: SCOPES,
118
+ portMethod: 'updateWebhookEndpoint',
119
+ run: (port, args, workspaceId) => port.updateWebhookEndpoint(args, workspaceId),
120
+ },
121
+ {
122
+ name: 'delete_webhook_endpoint',
123
+ binding: 'both',
124
+ title: 'Delete Webhook Endpoint',
125
+ description: (binding) => describe(binding, "Delete a webhook endpoint by id. PostFast stops sending to it at once: deliveries still waiting are dropped, and its delivery log and signing secret are deleted with it. To pause an endpoint instead, set active false with update_webhook_endpoint. An id that isn't in this workspace fails with webhook.notFound. Returns { ok: true }.", " Deleting can't be undone, so show the user which endpoint (its url and description) and call this only after they say yes in the conversation.", ' The deletion cannot be undone.'),
126
+ inputSchema: {
127
+ id: z.uuid().describe(ENDPOINT_ID),
128
+ },
129
+ // openWorld false: it removes PostFast's record only; no call goes out.
130
+ annotations: {
131
+ readOnlyHint: false,
132
+ destructiveHint: true,
133
+ idempotentHint: true,
134
+ openWorldHint: false,
135
+ },
136
+ scopes: SCOPES,
137
+ portMethod: 'deleteWebhookEndpoint',
138
+ run: (port, args, workspaceId) => port.deleteWebhookEndpoint(args.id, workspaceId),
139
+ },
140
+ {
141
+ name: 'test_webhook_endpoint',
142
+ binding: 'both',
143
+ title: 'Test Webhook Endpoint',
144
+ description: (binding) => describe(binding, 'Send one signed test delivery to a webhook endpoint now and report how its receiver answered: { eventId, type, delivered, statusCode, latencyMs, error }. It waits up to 15 seconds for the receiver, and the call succeeds even when the receiver failed, so read delivered, statusCode and error (null when delivered; otherwise timeout, connection, tls, redirect, http_4xx, http_5xx, gone, blocked_address, payload_too_large, or internal, which is PostFast\'s own failure). Without sampleEvent it sends a webhook.test event, whose data is { webhook: { id, url }, message }. With sampleEvent it sends a fixed sample of that event type, built exactly like a real one so the receiver can be set up before any real event happens: ids of zeros, platform X, the post text "Sample post from PostFast" or the account @sample, and no real post or account data. A test counts like any delivery: it shows in list_webhook_deliveries, a failure adds to the endpoint\'s failure count, and a 410 Gone answer turns the endpoint off. webhook.disabled means PostFast has webhooks switched off for now, not that this endpoint is off.', ' The receiver may act on a test as on a real event, so send one only when the user asks.'),
145
+ inputSchema: {
146
+ id: z.uuid().describe(ENDPOINT_ID),
147
+ sampleEvent: z
148
+ .enum(WEBHOOK_EVENTS)
149
+ .optional()
150
+ .describe('Send a fixed sample of this event type instead of webhook.test'),
151
+ },
152
+ // Open world: it calls the receiver's server. Not destructive: it changes
153
+ // no setting (a 410 answer turns the endpoint off, which active true
154
+ // undoes). Not idempotent: every call is a new delivery with a new eventId.
155
+ annotations: {
156
+ readOnlyHint: false,
157
+ destructiveHint: false,
158
+ idempotentHint: false,
159
+ openWorldHint: true,
160
+ },
161
+ scopes: SCOPES,
162
+ portMethod: 'testWebhookEndpoint',
163
+ run: (port, args, workspaceId) => port.testWebhookEndpoint(args, workspaceId),
164
+ },
165
+ {
166
+ name: 'list_webhook_deliveries',
167
+ binding: 'both',
168
+ title: 'List Webhook Deliveries',
169
+ description: (binding) => describe(binding, "List a webhook endpoint's delivery log, newest first: every delivery to it from the last 30 days, with how the receiver answered. Use it to find out why an event did or didn't arrive. Each row has eventId (evt_…, the webhook-id header the receiver got), eventType, resourceId (the post id for post events, the account id for account events, the endpoint id for webhook.test, null for a sample), status, attempts (each with n, at, statusCode, latencyMs and error), lastStatusCode, lastErrorCode, nextAttemptAt, completedAt and payload (the body exactly as sent). status is SUCCEEDED, FAILED (every attempt failed, the receiver answered 410 Gone, or the event was too large to send), PENDING (still being delivered: a nextAttemptAt in the future means a retry is scheduled, up to 8 attempts over about a day) or SKIPPED (not sent because the endpoint was off when the delivery came due, possibly after failed attempts; while an endpoint is off, its PENDING rows end this way unless it is turned back on before they come due). Error codes: timeout, connection, tls, redirect (redirects are not followed), http_4xx, http_5xx, gone (410), blocked_address (PostFast refused to connect because the hostname resolved to a private address), exhausted, payload_too_large (the event was too large to send) and internal (PostFast's own failure, not the receiver's). Only the receiver's status code is kept, never its response body. totalCount and pageInfo.hasNextPage are filled only when getCount is true, so ask for it on the first page; without it, a full page may have more after it. An id that isn't in this workspace, or was deleted, gives an empty page rather than an error; get_webhook_endpoint tells whether it exists."),
170
+ inputSchema: {
171
+ endpointId: z.uuid().describe(ENDPOINT_ID),
172
+ page: z.number().int().min(0).default(0).describe('Page number (0-based)'),
173
+ limit: z
174
+ .number()
175
+ .int()
176
+ .min(1)
177
+ .max(100)
178
+ .default(10)
179
+ .describe('Deliveries per page (max 100; every row carries the full event payload)'),
180
+ getCount: z
181
+ .boolean()
182
+ .optional()
183
+ .describe('Count the whole log, which fills totalCount and pageInfo.hasNextPage. Ask for it on the first page only.'),
184
+ },
185
+ annotations: READ,
186
+ scopes: SCOPES,
187
+ portMethod: 'listWebhookDeliveries',
188
+ run: (port, args, workspaceId) => port.listWebhookDeliveries(args, workspaceId),
189
+ },
190
+ ];
191
+ //# sourceMappingURL=webhooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/core/tools/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;;;;;;;;;;GAcG;AAEH,qFAAqF;AACrF,MAAM,MAAM,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAEnC,MAAM,iBAAiB,GACrB,4HAA4H,CAAC;AAE/H,iFAAi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;QAChC,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CACvB,QAAQ,CACN,OAAO,EACP,qrDAAqrD,CACtrD;QACH,WAAW,EAAE;YACX,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAC1E,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,OAAO,CAAC,EAAE,CAAC;iBACX,QAAQ,CAAC,yEAAyE,CAAC;YACtF,QAAQ,EAAE,CAAC;iBACR,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,0GAA0G,CAAC;SACxH;QACD,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,uBAAuB;QACnC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,qBAAsB,CAAC,IAA4C,EAAE,WAAW,CAAC;KACzF;CACF,CAAC"}
@@ -229,6 +229,89 @@ export interface PostControls {
229
229
  linkedinAttachmentTitle?: string;
230
230
  threadsTopicTag?: string;
231
231
  }
232
+ /** The event types a webhook endpoint can receive. `webhook.test` is sent only by test_webhook_endpoint. */
233
+ export type WebhookEvent = 'post.published' | 'post.failed' | 'account.connected' | 'account.disconnected';
234
+ /**
235
+ * Why PostFast turned an endpoint off: GONE when its receiver answered 410,
236
+ * FAILING after five days of failed deliveries. Null while it is active or
237
+ * when a user turned it off.
238
+ */
239
+ export type WebhookDisabledReason = 'GONE' | 'FAILING';
240
+ export interface WebhookEndpoint {
241
+ id: string;
242
+ workspaceId: string;
243
+ url: string;
244
+ events: WebhookEvent[];
245
+ description: string | null;
246
+ active: boolean;
247
+ disabledReason: WebhookDisabledReason | null;
248
+ lastSuccessAt: string | null;
249
+ lastFailureAt: string | null;
250
+ createdAt: string;
251
+ updatedAt: string;
252
+ /** The signing secret (`whsec_…`): only in the answer to create_webhook_endpoint, never again. */
253
+ secret?: string;
254
+ }
255
+ /** Why a delivery attempt did not count. `internal` is PostFast's own failure, not the receiver's. */
256
+ export type WebhookDeliveryError = 'timeout' | 'connection' | 'tls' | 'redirect' | 'http_4xx' | 'http_5xx' | 'gone' | 'blocked_address' | 'exhausted' | 'internal' | 'payload_too_large';
257
+ /** One synchronous delivery, from test_webhook_endpoint. */
258
+ export interface WebhookTestResult {
259
+ /** `evt_<uuid>`: the `webhook-id` header the receiver got. */
260
+ eventId: string;
261
+ type: WebhookEvent | 'webhook.test';
262
+ delivered: boolean;
263
+ statusCode: number | null;
264
+ latencyMs: number;
265
+ error: WebhookDeliveryError | null;
266
+ }
267
+ /** The body a receiver gets, exactly as sent. */
268
+ export interface WebhookEnvelope {
269
+ id: string;
270
+ type: WebhookEvent | 'webhook.test';
271
+ timestamp: string;
272
+ workspaceId: string;
273
+ data: Record<string, unknown>;
274
+ }
275
+ export interface WebhookDeliveryAttempt {
276
+ n: number;
277
+ at: string;
278
+ statusCode: number | null;
279
+ latencyMs: number;
280
+ error: WebhookDeliveryError | null;
281
+ }
282
+ /** SKIPPED: not sent because the endpoint was off when the delivery came due, possibly after failed attempts. */
283
+ export type WebhookDeliveryStatus = 'PENDING' | 'SUCCEEDED' | 'FAILED' | 'SKIPPED';
284
+ /** One row of an endpoint's delivery log. */
285
+ export interface WebhookDelivery {
286
+ id: string;
287
+ /** `evt_<uuid>`, the same under every endpoint that got the event. */
288
+ eventId: string;
289
+ eventType: WebhookEvent | 'webhook.test';
290
+ /** The post (post events), the account (account events), the endpoint (`webhook.test`), or null (samples). */
291
+ resourceId: string | null;
292
+ socialMediaId: string | null;
293
+ status: WebhookDeliveryStatus;
294
+ attemptCount: number;
295
+ attempts: WebhookDeliveryAttempt[];
296
+ lastStatusCode: number | null;
297
+ lastErrorCode: WebhookDeliveryError | null;
298
+ lastLatencyMs: number | null;
299
+ /** When the next attempt is due, while the status is PENDING. */
300
+ nextAttemptAt: string | null;
301
+ completedAt: string | null;
302
+ createdAt: string;
303
+ payload: WebhookEnvelope;
304
+ }
305
+ /** A page of the delivery log, newest first. The count fields are set only with getCount: true. */
306
+ export interface PaginatedWebhookDeliveries {
307
+ data: WebhookDelivery[];
308
+ totalCount: number | null;
309
+ pageInfo: {
310
+ page: number | null;
311
+ hasNextPage: boolean;
312
+ perPage: number | null;
313
+ };
314
+ }
232
315
  /** Where the app was opened: the sidebar (global) or a conversation tab (thread). */
233
316
  export type AppEntrypoint = 'global' | 'thread';
234
317
  /** Buttons in the view the backend records for product analytics. */
@@ -6,7 +6,7 @@ import { instructionsFor } from '../core/instructions.js';
6
6
  import { RestAdapter } from './rest-adapter.js';
7
7
  const server = new McpServer({
8
8
  name: 'postfast',
9
- version: '0.14.0',
9
+ version: '0.15.1',
10
10
  }, { instructions: instructionsFor('stdio') });
11
11
  const port = new RestAdapter();
12
12
  registerCatalogTools(server, { binding: 'stdio', port });
@@ -1,4 +1,4 @@
1
- import type { AnalyticsArgs, ApprovePostsArgs, AssignInboxConversationArgs, BackendPort, ConnectLinkArgs, CreatePostsArgs, FollowerHistoryArgs, InboxReplyArgs, ListInboxConversationsArgs, ListInboxItemsArgs, ListPostsArgs, ListTikTokSoundsArgs, LocalUploadResult, SetInboxConversationStatusArgs, SetInboxItemStateArgs, UploadUrlsArgs } from '../core/backend-port.js';
1
+ import type { AnalyticsArgs, ApprovePostsArgs, AssignInboxConversationArgs, BackendPort, ConnectLinkArgs, CreatePostsArgs, CreateWebhookEndpointArgs, FollowerHistoryArgs, InboxReplyArgs, ListInboxConversationsArgs, ListInboxItemsArgs, ListPostsArgs, ListTikTokSoundsArgs, ListWebhookDeliveriesArgs, LocalUploadResult, SetInboxConversationStatusArgs, SetInboxItemStateArgs, TestWebhookEndpointArgs, UpdateWebhookEndpointArgs, UploadUrlsArgs } from '../core/backend-port.js';
2
2
  /** The stdio bin's BackendPort: the public PostFast REST API over pf-api-key. */
3
3
  export declare class RestAdapter implements BackendPort {
4
4
  private baseUrl;
@@ -36,4 +36,13 @@ export declare class RestAdapter implements BackendPort {
36
36
  markInboxConversationRead(conversationId: string): Promise<unknown>;
37
37
  setInboxConversationStatus(args: SetInboxConversationStatusArgs): Promise<unknown>;
38
38
  assignInboxConversation(args: AssignInboxConversationArgs): Promise<unknown>;
39
+ listWebhookEndpoints(): Promise<unknown>;
40
+ getWebhookEndpoint(id: string): Promise<unknown>;
41
+ createWebhookEndpoint(args: CreateWebhookEndpointArgs): Promise<unknown>;
42
+ updateWebhookEndpoint(args: UpdateWebhookEndpointArgs): Promise<unknown>;
43
+ deleteWebhookEndpoint(id: string): Promise<{
44
+ ok: true;
45
+ }>;
46
+ testWebhookEndpoint(args: TestWebhookEndpointArgs): Promise<unknown>;
47
+ listWebhookDeliveries(args: ListWebhookDeliveriesArgs): Promise<unknown>;
39
48
  }
@@ -245,5 +245,46 @@ export class RestAdapter {
245
245
  assigneeUserId: args.assigneeUserId,
246
246
  });
247
247
  }
248
+ listWebhookEndpoints() {
249
+ return this.get('/webhook-endpoints');
250
+ }
251
+ getWebhookEndpoint(id) {
252
+ return this.get(`/webhook-endpoints/${id}`);
253
+ }
254
+ createWebhookEndpoint(args) {
255
+ return this.post('/webhook-endpoints', {
256
+ url: args.url,
257
+ events: args.events,
258
+ description: args.description,
259
+ });
260
+ }
261
+ // JSON leaves out the fields that were not given (they keep their value) and
262
+ // keeps description: null, which removes the description.
263
+ updateWebhookEndpoint(args) {
264
+ return this.request('PATCH', `/webhook-endpoints/${args.id}`, {
265
+ url: args.url,
266
+ events: args.events,
267
+ description: args.description,
268
+ active: args.active,
269
+ });
270
+ }
271
+ // The API answers 204 with no body; return what the hosted server returns.
272
+ async deleteWebhookEndpoint(id) {
273
+ await this.request('DELETE', `/webhook-endpoints/${id}`);
274
+ return { ok: true };
275
+ }
276
+ testWebhookEndpoint(args) {
277
+ return this.post(`/webhook-endpoints/${args.id}/test`, {
278
+ sampleEvent: args.sampleEvent,
279
+ });
280
+ }
281
+ listWebhookDeliveries(args) {
282
+ const param = (value) => value === undefined ? undefined : String(value);
283
+ return this.get(`/webhook-endpoints/${args.endpointId}/deliveries`, {
284
+ page: param(args.page),
285
+ limit: param(args.limit),
286
+ getCount: param(args.getCount),
287
+ });
288
+ }
248
289
  }
249
290
  //# sourceMappingURL=rest-adapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rest-adapter.js","sourceRoot":"","sources":["../../src/stdio/rest-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD,MAAM,QAAQ,GAA2B;IACvC,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,sBAAsB;IAC9B,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,yEAAyE;IAClF,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,2EAA2E;CACrF,CAAC;AAEF,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,MAAM,WAAW,GAAG,QAAQ,CAA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SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,GAAG,CAAC,sBAAsB,IAAI,CAAC,UAAU,aAAa,EAAE;YAClE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YACtB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;YACxB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC/B,CAAC,CAAC;IACL,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postfast-mcp",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "mcpName": "io.github.peturgeorgievv-factory/postfast-mcp",
5
5
  "description": "MCP server for the PostFast API — schedule and manage social media posts via AI tools",
6
6
  "type": "module",