postfast-mcp 0.1.15 → 0.1.16
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/accounts.js +1 -1
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/posts.js +2 -2
- package/dist/tools/posts.js.map +1 -1
- package/dist/types.d.ts +17 -0
- package/package.json +1 -1
- package/skills/social-media-post/SKILL.md +4 -2
|
@@ -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.1.
|
|
14
|
+
"version": "0.1.16",
|
|
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. After installing, tell Cowork: 'Set my PostFast API key' — get your key at https://app.postfa.st/dashboard → API.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.16",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PostFast",
|
|
7
7
|
"email": "me@peturgeorgievv.com"
|
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ Ask your AI assistant things like:
|
|
|
107
107
|
|
|
108
108
|
| Tool | Description |
|
|
109
109
|
|------|-------------|
|
|
110
|
-
| `list_accounts` | List connected social media accounts |
|
|
110
|
+
| `list_accounts` | List connected social media accounts (each with `connectionStatus` — `CONNECTED`/`DISABLED` — and `disabledReason`) |
|
|
111
111
|
| `list_posts` | List posts with filters (platform, status, date range) |
|
|
112
112
|
| `create_posts` | Create and schedule posts (batch, up to 15) |
|
|
113
113
|
| `delete_post` | Delete a post by ID |
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { registerAccountTools } from './tools/accounts.js';
|
|
|
7
7
|
import { registerFileTools } from './tools/files.js';
|
|
8
8
|
const server = new McpServer({
|
|
9
9
|
name: 'postfast',
|
|
10
|
-
version: '0.1.
|
|
10
|
+
version: '0.1.16',
|
|
11
11
|
});
|
|
12
12
|
const client = new PostFastClient();
|
|
13
13
|
registerPostTools(server, client);
|
package/dist/tools/accounts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export function registerAccountTools(server, client) {
|
|
3
|
-
server.tool('list_accounts', 'List all social media accounts connected to the workspace', {}, async () => {
|
|
3
|
+
server.tool('list_accounts', 'List all social media accounts connected to the workspace. Each account includes connectionStatus (CONNECTED or DISABLED) and disabledReason (null unless DISABLED). If connectionStatus is DISABLED, the account will not publish until the user reconnects it.', {}, async () => {
|
|
4
4
|
const data = await client.get('/social-media/my-social-accounts');
|
|
5
5
|
return {
|
|
6
6
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAsB;IAEtB,MAAM,CAAC,IAAI,CACT,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MA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AO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SAC1E,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/posts.js
CHANGED
|
@@ -28,7 +28,7 @@ function jsonParse(schema) {
|
|
|
28
28
|
}, schema);
|
|
29
29
|
}
|
|
30
30
|
export function registerPostTools(server, client) {
|
|
31
|
-
server.tool('list_posts', 'List social media posts with optional filters for platform, status, and date range', {
|
|
31
|
+
server.tool('list_posts', 'List social media posts with optional filters for platform, status, and date range. Failed or missed posts carry a lastError { message, code }; codes include MISSED_DISCONNECTED (the account was disconnected when the post was due — reconnect, then retry) and MISSED_NOT_PUBLISHED (passed its scheduled time plus a 2h grace window without publishing).', {
|
|
32
32
|
page: z.number().int().min(0).default(0).describe('Page number (0-based)'),
|
|
33
33
|
limit: z
|
|
34
34
|
.number()
|
|
@@ -66,7 +66,7 @@ export function registerPostTools(server, client) {
|
|
|
66
66
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
|
-
server.tool('create_posts', 'Create and schedule social media posts. Supports batch creation (up to 15 posts). Each post targets a specific social account.', {
|
|
69
|
+
server.tool('create_posts', 'Create and schedule social media posts. Supports batch creation (up to 15 posts). Each post targets a specific social account. Scheduling to a disconnected account (connectionStatus DISABLED in list_accounts) is rejected with HTTP 400 "socialMediaDisconnected" — pre-check connectionStatus before calling. Saving as DRAFT to a disconnected account is allowed.', {
|
|
70
70
|
posts: jsonParse(z
|
|
71
71
|
.array(z.object({
|
|
72
72
|
content: z.string().describe('Post text content'),
|
package/dist/tools/posts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/tools/posts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CA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AE,IAAI,CAAC,GAAG,CAAC;YACrC,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC;SAChD,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SAC1E,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export type Platform = 'FACEBOOK' | 'INSTAGRAM' | 'X' | 'TIKTOK' | 'LINKEDIN' | 'YOUTUBE' | 'BLUESKY' | 'THREADS' | 'PINTEREST' | 'TELEGRAM' | 'GOOGLE_BUSINESS_PROFILE';
|
|
2
2
|
export type PostStatus = 'DRAFT' | 'SCHEDULED' | 'PUBLISHED' | 'FAILED';
|
|
3
3
|
export type ApprovalStatus = 'PENDING_APPROVAL' | 'IN_PROGRESS' | 'APPROVED' | 'REJECTED' | 'NEEDS_WORK';
|
|
4
|
+
/** Health of a connected social account. CONNECTED = healthy; DISABLED = paused, needs reconnect. */
|
|
5
|
+
export type ConnectionStatus = 'CONNECTED' | 'DISABLED';
|
|
6
|
+
/**
|
|
7
|
+
* Why an account is DISABLED. Only TOKEN_REVOKED and ACCOUNT_SUSPENDED are emitted
|
|
8
|
+
* today; PERMISSION_REVOKED and MANUAL are reserved so the schema stays stable when
|
|
9
|
+
* they are wired up later.
|
|
10
|
+
*/
|
|
11
|
+
export type DisabledReason = 'TOKEN_REVOKED' | 'ACCOUNT_SUSPENDED' | 'PERMISSION_REVOKED' | 'MANUAL';
|
|
4
12
|
export interface SocialPost {
|
|
5
13
|
id: string;
|
|
6
14
|
content: string;
|
|
@@ -15,6 +23,11 @@ export interface SocialPost {
|
|
|
15
23
|
groupId: string | null;
|
|
16
24
|
firstComment: string | null;
|
|
17
25
|
firstCommentError: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Present on FAILED (and missed) posts. `code` carries platform-specific error codes
|
|
28
|
+
* plus two scheduling codes: MISSED_DISCONNECTED (account was disconnected when the
|
|
29
|
+
* post was due) and MISSED_NOT_PUBLISHED (passed scheduled time + 2h grace unpublished).
|
|
30
|
+
*/
|
|
18
31
|
lastError: {
|
|
19
32
|
message: string;
|
|
20
33
|
code: string | null;
|
|
@@ -42,6 +55,10 @@ export interface SocialAccount {
|
|
|
42
55
|
platform: Platform;
|
|
43
56
|
platformUsername: string | null;
|
|
44
57
|
displayName: string | null;
|
|
58
|
+
/** Always present. If DISABLED, the account won't publish until the user reconnects. */
|
|
59
|
+
connectionStatus: ConnectionStatus;
|
|
60
|
+
/** Non-null only when connectionStatus is DISABLED. */
|
|
61
|
+
disabledReason: DisabledReason | null;
|
|
45
62
|
}
|
|
46
63
|
export interface PinterestBoard {
|
|
47
64
|
id: string;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
15
15
|
|
|
16
16
|
## Posting Workflow
|
|
17
17
|
|
|
18
|
-
1. **List accounts** — Call `list_accounts` to see connected social media accounts. Each account has an `id`, `platform`, `platformUsername`, and `
|
|
18
|
+
1. **List accounts** — Call `list_accounts` to see connected social media accounts. Each account has an `id`, `platform`, `platformUsername`, `displayName`, and a `connectionStatus` (`CONNECTED` or `DISABLED`) with an optional `disabledReason`. If `connectionStatus` is `DISABLED`, the account won't publish until the user reconnects it — warn the user and don't schedule to it.
|
|
19
19
|
|
|
20
20
|
2. **Prepare media** (if needed) — If the user has images or videos to attach:
|
|
21
21
|
- Use `upload_media` with the local file path — it handles getting a signed URL, uploading, and returning a `key` and `type` (IMAGE or VIDEO)
|
|
@@ -31,6 +31,7 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
31
31
|
- `firstComment`: optional first comment text (supported on X, Instagram, Facebook, YouTube, Threads)
|
|
32
32
|
- `controls`: platform-specific settings (see below)
|
|
33
33
|
- You can batch up to 15 posts in a single call — great for content calendars
|
|
34
|
+
- Don't schedule to a `DISABLED` account — the API rejects it with HTTP 400 `socialMediaDisconnected`. Saving as DRAFT is still allowed. Check `connectionStatus` from step 1 first.
|
|
34
35
|
|
|
35
36
|
4. **Confirm** — Show the user a summary: which accounts, what content, when scheduled.
|
|
36
37
|
|
|
@@ -99,7 +100,7 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
99
100
|
|
|
100
101
|
## Other Actions
|
|
101
102
|
|
|
102
|
-
- **View posts**: `list_posts` — filter by `platforms` (comma-separated), `statuses` (DRAFT, SCHEDULED, PUBLISHED, FAILED), `from`/`to` dates, with pagination (`page`, `limit` up to 50)
|
|
103
|
+
- **View posts**: `list_posts` — filter by `platforms` (comma-separated), `statuses` (DRAFT, SCHEDULED, PUBLISHED, FAILED), `from`/`to` dates, with pagination (`page`, `limit` up to 50). Failed or missed posts include a `lastError` with a `code` — e.g. `MISSED_DISCONNECTED` (the account was disconnected when the post was due) or `MISSED_NOT_PUBLISHED` (missed its slot by more than the 2h grace window)
|
|
103
104
|
- **Post analytics**: `get_post_analytics` — fetch published posts with performance metrics. Requires `startDate` and `endDate` (ISO 8601). Optional filters: `platforms`, `socialMediaIds`. Returns impressions, reach, likes, comments, shares, totalInteractions, plus an `extras` object with platform-specific metrics. Supported: Instagram, Facebook, TikTok, Threads, YouTube, LinkedIn (company pages), Pinterest (Business accounts). Pinterest `extras` include `pin_clicks`, `outbound_clicks`, `saves_90d`, `save_rate_90d`; video pins also surface `mrc_views`, `views_10s`, `avg_watch_time`, `v50_watch_time`, `video_starts`, `quartile_95_views`. Note: LinkedIn personal accounts are excluded; Pinterest saves are reported as a rolling 90-day window because Pinterest's API does not expose lifetime save totals (all other Pinterest metrics are lifetime); `latestMetric` is null if metrics haven't been fetched yet; metric values are strings (bigint). Keep date ranges reasonable as there's no pagination.
|
|
104
105
|
- **Delete a post**: `delete_post` with the post ID
|
|
105
106
|
- **Connect new accounts**: `generate_connect_link` — creates a secure URL to share with clients/collaborators to connect their accounts. Set `expiryDays` (1-30) and optionally `sendEmail` with an `email` address
|
|
@@ -110,6 +111,7 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
110
111
|
## Tips
|
|
111
112
|
|
|
112
113
|
- Always confirm schedule time and target accounts with the user before creating posts.
|
|
114
|
+
- If `list_accounts` shows an account as `DISABLED`, tell the user to reconnect it before scheduling — scheduled posts to disconnected accounts are rejected, and posts already due get marked missed.
|
|
113
115
|
- For content calendars, batch multiple posts in one `create_posts` call (up to 15).
|
|
114
116
|
- When posting to Pinterest, always fetch boards first — `pinterestBoardId` is required.
|
|
115
117
|
- When posting to Google Business Profile, always fetch locations first — `gbpLocationId` is required.
|