postfast-mcp 0.1.17 → 0.1.19
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 +4 -2
- package/dist/index.js +1 -1
- package/dist/tools/accounts.js +81 -33
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/files.js +21 -15
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/posts.js +151 -135
- package/dist/tools/posts.js.map +1 -1
- package/dist/types.d.ts +38 -0
- package/package.json +4 -4
- package/skills/social-media-post/SKILL.md +2 -1
|
@@ -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.19",
|
|
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.19",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PostFast",
|
|
7
7
|
"email": "me@peturgeorgievv.com"
|
package/README.md
CHANGED
|
@@ -116,8 +116,10 @@ Ask your AI assistant things like:
|
|
|
116
116
|
| `list_pinterest_boards` | Get Pinterest boards for an account |
|
|
117
117
|
| `list_youtube_playlists` | Get YouTube playlists for an account |
|
|
118
118
|
| `list_gbp_locations` | Get Google Business Profile locations for an account |
|
|
119
|
+
| `search_places` | Find a place to tag posts (the `id` works for both `facebookPlaceId` and `instagramLocationId`) |
|
|
119
120
|
| `generate_connect_link` | Generate a link for clients to connect accounts |
|
|
120
121
|
| `get_post_analytics` | Fetch published posts with performance metrics — Instagram, Facebook, TikTok, Threads, YouTube, LinkedIn (company pages), Pinterest (Business accounts) |
|
|
122
|
+
| `get_follower_history` | Daily follower-count history for an account (current count + `delta` over a date range) — Facebook Pages, Instagram, YouTube, Pinterest, Threads, Bluesky, Telegram, LinkedIn (company pages) |
|
|
121
123
|
|
|
122
124
|
## Supported Platforms
|
|
123
125
|
|
|
@@ -130,8 +132,8 @@ When creating posts, you can pass platform-specific settings via the `controls`
|
|
|
130
132
|
| Platform | Controls |
|
|
131
133
|
|----------|----------|
|
|
132
134
|
| **X (Twitter)** | `xRetweetUrl` |
|
|
133
|
-
| **Instagram** | `instagramPublishType` (TIMELINE/STORY/REEL), `instagramPostToGrid`, `instagramCollaborators` |
|
|
134
|
-
| **Facebook** | `facebookContentType` (POST/REEL/STORY), `facebookAllowComments`, `facebookPrivacy`, `facebookReelsCollaborators` |
|
|
135
|
+
| **Instagram** | `instagramPublishType` (TIMELINE/STORY/REEL), `instagramPostToGrid`, `instagramCollaborators`, `instagramLocationId`/`instagramLocationName` (geotag from `search_places`) |
|
|
136
|
+
| **Facebook** | `facebookContentType` (POST/REEL/STORY), `facebookAllowComments`, `facebookPrivacy`, `facebookReelsCollaborators`, `facebookTargetCountries` (ISO alpha-2, max 25), `facebookPlaceId`/`facebookPlaceName` (geotag from `search_places`) |
|
|
135
137
|
| **TikTok** | `tiktokPrivacy` (PUBLIC/MUTUAL_FRIENDS/FOLLOWER_OF_CREATOR/ONLY_ME), `tiktokIsDraft`, `tiktokAllowComments`, `tiktokAllowDuet`, `tiktokAllowStitch`, `tiktokBrandOrganic`, `tiktokBrandContent`, `tiktokAutoAddMusic`, `tiktokIsAigc` |
|
|
136
138
|
| **YouTube** | `youtubeTitle`, `youtubePrivacy` (PUBLIC/PRIVATE/UNLISTED), `youtubeTags`, `youtubeCategoryId`, `youtubeIsShort`, `youtubeMadeForKids`, `youtubePlaylistId`, `youtubeThumbnailKey` |
|
|
137
139
|
| **Pinterest** | `pinterestBoardId` (required), `pinterestLink` |
|
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.19',
|
|
11
11
|
});
|
|
12
12
|
const client = new PostFastClient();
|
|
13
13
|
registerPostTools(server, client);
|
package/dist/tools/accounts.js
CHANGED
|
@@ -1,61 +1,109 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export function registerAccountTools(server, client) {
|
|
3
|
-
server.
|
|
3
|
+
server.registerTool('list_accounts', {
|
|
4
|
+
description: '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.',
|
|
5
|
+
inputSchema: {},
|
|
6
|
+
}, async () => {
|
|
4
7
|
const data = await client.get('/social-media/my-social-accounts');
|
|
5
8
|
return {
|
|
6
9
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
7
10
|
};
|
|
8
11
|
});
|
|
9
|
-
server.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
server.registerTool('list_pinterest_boards', {
|
|
13
|
+
description: 'List Pinterest boards for a connected Pinterest account',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
socialMediaId: z
|
|
16
|
+
.uuid()
|
|
17
|
+
.describe('Pinterest account ID (from list_accounts)'),
|
|
18
|
+
},
|
|
14
19
|
}, async (input) => {
|
|
15
20
|
const data = await client.get(`/social-media/${input.socialMediaId}/pinterest-boards`);
|
|
16
21
|
return {
|
|
17
22
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
18
23
|
};
|
|
19
24
|
});
|
|
20
|
-
server.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
server.registerTool('list_youtube_playlists', {
|
|
26
|
+
description: 'List YouTube playlists for a connected YouTube account',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
socialMediaId: z
|
|
29
|
+
.uuid()
|
|
30
|
+
.describe('YouTube account ID (from list_accounts)'),
|
|
31
|
+
},
|
|
25
32
|
}, async (input) => {
|
|
26
33
|
const data = await client.get(`/social-media/${input.socialMediaId}/youtube-playlists`);
|
|
27
34
|
return {
|
|
28
35
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
29
36
|
};
|
|
30
37
|
});
|
|
31
|
-
server.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
server.registerTool('list_gbp_locations', {
|
|
39
|
+
description: 'List Google Business Profile locations for a connected GBP account',
|
|
40
|
+
inputSchema: {
|
|
41
|
+
socialMediaId: z
|
|
42
|
+
.uuid()
|
|
43
|
+
.describe('GBP account ID (from list_accounts)'),
|
|
44
|
+
},
|
|
36
45
|
}, async (input) => {
|
|
37
46
|
const data = await client.get(`/social-media/${input.socialMediaId}/gbp-locations`);
|
|
38
47
|
return {
|
|
39
48
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
40
49
|
};
|
|
41
50
|
});
|
|
42
|
-
server.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
server.registerTool('get_follower_history', {
|
|
52
|
+
description: 'Daily follower-count snapshots for a connected account, plus the current count (currentFollowerCount) and the net change (delta) over the range. Date range via from/to (ISO 8601); defaults to the last 90 days, capped at 365. Tracking is forward-only: data starts at trackingStartedAt (when PostFast began recording this account), with no snapshots before then. All counts are strings (bigint); currentFollowerCount, delta, and trackingStartedAt may be absent until the account has its first snapshot. Coverage: Facebook Pages, Instagram, YouTube, Pinterest, Threads, Bluesky, Telegram, LinkedIn company pages. Not available: X, TikTok, personal Facebook.',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
socialMediaId: z
|
|
55
|
+
.uuid()
|
|
56
|
+
.describe('Account ID (from list_accounts)'),
|
|
57
|
+
from: z
|
|
58
|
+
.string()
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Range start (ISO 8601, e.g. 2026-03-01T00:00:00.000Z). Defaults to 90 days ago.'),
|
|
61
|
+
to: z
|
|
62
|
+
.string()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe('Range end (ISO 8601). Defaults to now. Range is capped at 365 days.'),
|
|
65
|
+
},
|
|
66
|
+
}, async (input) => {
|
|
67
|
+
const data = await client.get(`/social-media/${input.socialMediaId}/follower-history`, { from: input.from, to: input.to });
|
|
68
|
+
return {
|
|
69
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
server.registerTool('search_places', {
|
|
73
|
+
description: 'Find a place to tag. The returned id works for both facebookPlaceId and instagramLocationId.',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
query: z
|
|
76
|
+
.string()
|
|
77
|
+
.min(2)
|
|
78
|
+
.describe('Place name to search, e.g. "Eiffel Tower"'),
|
|
79
|
+
},
|
|
80
|
+
}, async (input) => {
|
|
81
|
+
const data = await client.get('/social-media/search-places', {
|
|
82
|
+
q: input.query,
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
server.registerTool('generate_connect_link', {
|
|
89
|
+
description: 'Generate a shareable link for external clients to connect their social accounts to the workspace',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
expiryDays: z
|
|
92
|
+
.number()
|
|
93
|
+
.int()
|
|
94
|
+
.min(1)
|
|
95
|
+
.max(30)
|
|
96
|
+
.default(7)
|
|
97
|
+
.describe('Link expiry in days (1-30, default 7)'),
|
|
98
|
+
sendEmail: z
|
|
99
|
+
.boolean()
|
|
100
|
+
.default(false)
|
|
101
|
+
.describe('Send the link via email'),
|
|
102
|
+
email: z
|
|
103
|
+
.email()
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Recipient email (required if sendEmail is true)'),
|
|
106
|
+
},
|
|
59
107
|
}, async (input) => {
|
|
60
108
|
const data = await client.post('/social-media/connect-link', {
|
|
61
109
|
expiryDays: input.expiryDays,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAsB;IAEtB,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,WAAW,EACT,kQAAkQ;QACpQ,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,kCAAkC,CACnC,CAAC;QAEF,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;IAEF,MAAM,C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dist/tools/files.js
CHANGED
|
@@ -27,17 +27,20 @@ function detectContentType(filePath) {
|
|
|
27
27
|
return mime;
|
|
28
28
|
}
|
|
29
29
|
export function registerFileTools(server, client) {
|
|
30
|
-
server.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
server.registerTool('get_upload_urls', {
|
|
31
|
+
description: 'Get signed upload URLs for media files. Upload your file to the returned URL via PUT, then use the key in create_posts mediaItems.',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
contentType: z
|
|
34
|
+
.string()
|
|
35
|
+
.describe(`MIME type of the file. Supported: ${[...IMAGE_TYPES, ...VIDEO_TYPES].join(', ')}`),
|
|
36
|
+
count: z
|
|
37
|
+
.number()
|
|
38
|
+
.int()
|
|
39
|
+
.min(1)
|
|
40
|
+
.max(8)
|
|
41
|
+
.default(1)
|
|
42
|
+
.describe('Number of upload URLs (1-8 for images, 1 for videos)'),
|
|
43
|
+
},
|
|
41
44
|
}, async (input) => {
|
|
42
45
|
const data = await client.post('/file/get-signed-upload-urls', {
|
|
43
46
|
contentType: input.contentType,
|
|
@@ -49,10 +52,13 @@ export function registerFileTools(server, client) {
|
|
|
49
52
|
],
|
|
50
53
|
};
|
|
51
54
|
});
|
|
52
|
-
server.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
server.registerTool('upload_media', {
|
|
56
|
+
description: 'Upload a local file to PostFast and get back a media key for use in create_posts. Handles the full flow: detects content type, gets a signed URL, uploads the file, and returns the key and type.',
|
|
57
|
+
inputSchema: {
|
|
58
|
+
filePath: z
|
|
59
|
+
.string()
|
|
60
|
+
.describe('Absolute path to the local file (e.g. /Users/me/photo.jpg)'),
|
|
61
|
+
},
|
|
56
62
|
}, async (input) => {
|
|
57
63
|
const contentType = detectContentType(input.filePath);
|
|
58
64
|
const isVideo = contentType.startsWith('video/');
|
package/dist/tools/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/tools/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,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;CAC1B,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;CACJ,CAAC;AACX,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAU,CAAC;AAE5E,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,+BAA+B,GAAG,iBAAiB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAsB;IACzE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/tools/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAA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,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,kBAAkB,cAAc,CAAC,MAAM,MAAM,MAAM,cAAc,CAAC,IAAI,EAAE,EAAE,CAC3E,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG;YACb,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;YACjC,WAAW;SACZ,CAAC;QAEF,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;aACjE;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/posts.js
CHANGED
|
@@ -28,36 +28,39 @@ function jsonParse(schema) {
|
|
|
28
28
|
}, schema);
|
|
29
29
|
}
|
|
30
30
|
export function registerPostTools(server, client) {
|
|
31
|
-
server.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
.number()
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
31
|
+
server.registerTool('list_posts', {
|
|
32
|
+
description: 'List social media posts with optional filters for specific IDs, 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).',
|
|
33
|
+
inputSchema: {
|
|
34
|
+
page: z.number().int().min(0).default(0).describe('Page number (0-based)'),
|
|
35
|
+
limit: z
|
|
36
|
+
.number()
|
|
37
|
+
.int()
|
|
38
|
+
.min(1)
|
|
39
|
+
.max(50)
|
|
40
|
+
.default(20)
|
|
41
|
+
.describe('Posts per page (max 50)'),
|
|
42
|
+
ids: z
|
|
43
|
+
.array(z.uuid())
|
|
44
|
+
.max(100)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Fetch only these post IDs (workspace-scoped; max 100)'),
|
|
47
|
+
platforms: z
|
|
48
|
+
.array(z.enum(PLATFORMS))
|
|
49
|
+
.optional()
|
|
50
|
+
.describe('Filter by platforms'),
|
|
51
|
+
statuses: z
|
|
52
|
+
.array(z.enum(STATUSES))
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('Filter by post statuses'),
|
|
55
|
+
from: z
|
|
56
|
+
.string()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Start date filter (ISO 8601, e.g. 2025-01-01T00:00:00.000Z)'),
|
|
59
|
+
to: z
|
|
60
|
+
.string()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe('End date filter (ISO 8601, e.g. 2025-01-31T23:59:59.999Z)'),
|
|
63
|
+
},
|
|
61
64
|
}, async (input) => {
|
|
62
65
|
const data = await client.get('/social-posts', {
|
|
63
66
|
page: String(input.page),
|
|
@@ -72,97 +75,104 @@ export function registerPostTools(server, client) {
|
|
|
72
75
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
73
76
|
};
|
|
74
77
|
});
|
|
75
|
-
server.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
firstComment: z.string().optional().describe('First comment to add after publishing'),
|
|
80
|
-
mediaItems: z
|
|
78
|
+
server.registerTool('create_posts', {
|
|
79
|
+
description: '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.',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
posts: jsonParse(z
|
|
81
82
|
.array(z.object({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
content: z.string().describe('Post text content'),
|
|
84
|
+
firstComment: z.string().optional().describe('First comment to add after publishing'),
|
|
85
|
+
mediaItems: z
|
|
86
|
+
.array(z.object({
|
|
87
|
+
key: z.string().describe('S3 media key from get_upload_urls'),
|
|
88
|
+
type: z.enum(['IMAGE', 'VIDEO']),
|
|
89
|
+
sortOrder: z.number().int().min(0),
|
|
90
|
+
coverImageKey: z.string().optional().describe('S3 key of a custom cover/thumbnail image for video posts (upload via get_upload_urls first). Supported on Instagram Reels, Facebook Reels, Pinterest video pins.'),
|
|
91
|
+
coverTimestamp: z.string().optional().describe('Video cover timestamp in milliseconds (e.g. "5000" = 5s). Fallback when coverImageKey is also provided.'),
|
|
92
|
+
}))
|
|
93
|
+
.optional()
|
|
94
|
+
.describe('Media attachments'),
|
|
95
|
+
scheduledAt: z
|
|
96
|
+
.string()
|
|
97
|
+
.optional()
|
|
98
|
+
.describe('Schedule time (ISO 8601). Required when status is SCHEDULED.'),
|
|
99
|
+
socialMediaId: z
|
|
100
|
+
.uuid()
|
|
101
|
+
.describe('Target social account ID (from list_accounts)'),
|
|
87
102
|
}))
|
|
103
|
+
.min(1)
|
|
104
|
+
.max(15)
|
|
105
|
+
.describe('Array of posts to create')),
|
|
106
|
+
status: z
|
|
107
|
+
.enum(['DRAFT', 'SCHEDULED'])
|
|
108
|
+
.default('SCHEDULED')
|
|
109
|
+
.describe('Post status. SCHEDULED requires scheduledAt on all posts.'),
|
|
110
|
+
approvalStatus: z
|
|
111
|
+
.enum(['PENDING_APPROVAL', 'APPROVED'])
|
|
112
|
+
.default('APPROVED')
|
|
113
|
+
.describe('Approval workflow status'),
|
|
114
|
+
controls: jsonParse(z.object({
|
|
115
|
+
// X/Twitter
|
|
116
|
+
xRetweetUrl: z.string().optional(),
|
|
117
|
+
// TikTok
|
|
118
|
+
tiktokPrivacy: z.enum(['PUBLIC', 'MUTUAL_FRIENDS', 'FOLLOWER_OF_CREATOR', 'ONLY_ME']).optional(),
|
|
119
|
+
tiktokIsDraft: z.boolean().optional(),
|
|
120
|
+
tiktokAllowComments: z.boolean().optional(),
|
|
121
|
+
tiktokAllowDuet: z.boolean().optional(),
|
|
122
|
+
tiktokAllowStitch: z.boolean().optional(),
|
|
123
|
+
tiktokBrandOrganic: z.boolean().optional(),
|
|
124
|
+
tiktokBrandContent: z.boolean().optional(),
|
|
125
|
+
tiktokAutoAddMusic: z.boolean().optional(),
|
|
126
|
+
tiktokIsAigc: z.boolean().optional().describe('Declare video as AI-generated content'),
|
|
127
|
+
// Instagram
|
|
128
|
+
instagramPostToGrid: z.boolean().optional(),
|
|
129
|
+
instagramPublishType: z.enum(['TIMELINE', 'STORY', 'REEL']).optional(),
|
|
130
|
+
instagramCollaborators: z.array(z.string()).optional(),
|
|
131
|
+
instagramLocationId: z.string().optional().describe('Geotag: same FB Page id from search_places. Single media only, not carousels.'),
|
|
132
|
+
instagramLocationName: z.string().optional().describe('Display-only location name (not sent to Meta).'),
|
|
133
|
+
// YouTube
|
|
134
|
+
youtubePrivacy: z.enum(['PUBLIC', 'PRIVATE', 'UNLISTED']).optional(),
|
|
135
|
+
youtubeTags: z.array(z.string()).optional(),
|
|
136
|
+
youtubeCategoryId: z.string().optional(),
|
|
137
|
+
youtubeIsShort: z.boolean().optional(),
|
|
138
|
+
youtubeMadeForKids: z.boolean().optional(),
|
|
139
|
+
youtubeTitle: z.string().optional(),
|
|
140
|
+
youtubePlaylistId: z.string().optional(),
|
|
141
|
+
youtubeThumbnailKey: z.string().optional().describe('S3 media key for custom YouTube video thumbnail (image, max 2MB, min 640px wide, 1280x720 recommended)'),
|
|
142
|
+
// Facebook
|
|
143
|
+
facebookContentType: z.enum(['POST', 'REEL', 'STORY']).optional(),
|
|
144
|
+
facebookAllowComments: z.boolean().optional(),
|
|
145
|
+
facebookPrivacy: z
|
|
146
|
+
.enum(['PUBLIC', 'FRIENDS_OF_FRIENDS', 'FRIENDS', 'SELF'])
|
|
147
|
+
.optional(),
|
|
148
|
+
facebookCarouselMainLink: z.string().optional(),
|
|
149
|
+
facebookCarouselShowEndCard: z.boolean().optional(),
|
|
150
|
+
facebookReelsCoverImageKey: z.string().optional(),
|
|
151
|
+
facebookReelsCollaborators: z.array(z.string()).optional(),
|
|
152
|
+
facebookTargetCountries: z.array(z.string()).optional().describe('Facebook only: ISO 3166-1 alpha-2 codes (max 25). Limits who can see the post; also hidden from logged-out viewers. Feed posts only, not Reels/Stories.'),
|
|
153
|
+
facebookPlaceId: z.string().optional().describe('Geotag: FB Page id (with location) from search_places. Feed posts only.'),
|
|
154
|
+
facebookPlaceName: z.string().optional().describe('Display-only place name (not sent to Meta).'),
|
|
155
|
+
// Google Business Profile
|
|
156
|
+
gbpLocationId: z.string().optional().describe('GBP location resource name (from list_gbp_locations)'),
|
|
157
|
+
gbpTopicType: z.enum(['STANDARD', 'EVENT', 'OFFER']).optional().describe('Post type'),
|
|
158
|
+
gbpCallToActionType: z.enum(['BOOK', 'ORDER', 'LEARN_MORE', 'SIGN_UP', 'CALL', 'SHOP']).optional(),
|
|
159
|
+
gbpCallToActionUrl: z.string().optional().describe('CTA button URL (not needed for CALL, ignored for OFFER)'),
|
|
160
|
+
gbpEventTitle: z.string().optional().describe('Title for EVENT/OFFER posts (max 58 chars)'),
|
|
161
|
+
gbpEventStartDate: z.string().optional().describe('Start date for EVENT/OFFER (ISO 8601)'),
|
|
162
|
+
gbpEventEndDate: z.string().optional().describe('End date for EVENT/OFFER (ISO 8601)'),
|
|
163
|
+
gbpOfferCouponCode: z.string().optional().describe('Coupon code (OFFER only)'),
|
|
164
|
+
gbpOfferRedeemUrl: z.string().optional().describe('Redemption URL (OFFER only)'),
|
|
165
|
+
gbpOfferTerms: z.string().optional().describe('Terms and conditions (OFFER only)'),
|
|
166
|
+
// Pinterest
|
|
167
|
+
pinterestBoardId: z.string().optional(),
|
|
168
|
+
pinterestLink: z.string().optional(),
|
|
169
|
+
// LinkedIn
|
|
170
|
+
linkedinAttachmentKey: z.string().optional(),
|
|
171
|
+
linkedinAttachmentTitle: z.string().optional(),
|
|
172
|
+
})
|
|
88
173
|
.optional()
|
|
89
|
-
.describe('
|
|
90
|
-
|
|
91
|
-
.string()
|
|
92
|
-
.optional()
|
|
93
|
-
.describe('Schedule time (ISO 8601). Required when status is SCHEDULED.'),
|
|
94
|
-
socialMediaId: z
|
|
95
|
-
.string()
|
|
96
|
-
.uuid()
|
|
97
|
-
.describe('Target social account ID (from list_accounts)'),
|
|
98
|
-
}))
|
|
99
|
-
.min(1)
|
|
100
|
-
.max(15)
|
|
101
|
-
.describe('Array of posts to create')),
|
|
102
|
-
status: z
|
|
103
|
-
.enum(['DRAFT', 'SCHEDULED'])
|
|
104
|
-
.default('SCHEDULED')
|
|
105
|
-
.describe('Post status. SCHEDULED requires scheduledAt on all posts.'),
|
|
106
|
-
approvalStatus: z
|
|
107
|
-
.enum(['PENDING_APPROVAL', 'APPROVED'])
|
|
108
|
-
.default('APPROVED')
|
|
109
|
-
.describe('Approval workflow status'),
|
|
110
|
-
controls: jsonParse(z.object({
|
|
111
|
-
// X/Twitter
|
|
112
|
-
xRetweetUrl: z.string().optional(),
|
|
113
|
-
// TikTok
|
|
114
|
-
tiktokPrivacy: z.enum(['PUBLIC', 'MUTUAL_FRIENDS', 'FOLLOWER_OF_CREATOR', 'ONLY_ME']).optional(),
|
|
115
|
-
tiktokIsDraft: z.boolean().optional(),
|
|
116
|
-
tiktokAllowComments: z.boolean().optional(),
|
|
117
|
-
tiktokAllowDuet: z.boolean().optional(),
|
|
118
|
-
tiktokAllowStitch: z.boolean().optional(),
|
|
119
|
-
tiktokBrandOrganic: z.boolean().optional(),
|
|
120
|
-
tiktokBrandContent: z.boolean().optional(),
|
|
121
|
-
tiktokAutoAddMusic: z.boolean().optional(),
|
|
122
|
-
tiktokIsAigc: z.boolean().optional().describe('Declare video as AI-generated content'),
|
|
123
|
-
// Instagram
|
|
124
|
-
instagramPostToGrid: z.boolean().optional(),
|
|
125
|
-
instagramPublishType: z.enum(['TIMELINE', 'STORY', 'REEL']).optional(),
|
|
126
|
-
instagramCollaborators: z.array(z.string()).optional(),
|
|
127
|
-
// YouTube
|
|
128
|
-
youtubePrivacy: z.enum(['PUBLIC', 'PRIVATE', 'UNLISTED']).optional(),
|
|
129
|
-
youtubeTags: z.array(z.string()).optional(),
|
|
130
|
-
youtubeCategoryId: z.string().optional(),
|
|
131
|
-
youtubeIsShort: z.boolean().optional(),
|
|
132
|
-
youtubeMadeForKids: z.boolean().optional(),
|
|
133
|
-
youtubeTitle: z.string().optional(),
|
|
134
|
-
youtubePlaylistId: z.string().optional(),
|
|
135
|
-
youtubeThumbnailKey: z.string().optional().describe('S3 media key for custom YouTube video thumbnail (image, max 2MB, min 640px wide, 1280x720 recommended)'),
|
|
136
|
-
// Facebook
|
|
137
|
-
facebookContentType: z.enum(['POST', 'REEL', 'STORY']).optional(),
|
|
138
|
-
facebookAllowComments: z.boolean().optional(),
|
|
139
|
-
facebookPrivacy: z
|
|
140
|
-
.enum(['PUBLIC', 'FRIENDS_OF_FRIENDS', 'FRIENDS', 'SELF'])
|
|
141
|
-
.optional(),
|
|
142
|
-
facebookCarouselMainLink: z.string().optional(),
|
|
143
|
-
facebookCarouselShowEndCard: z.boolean().optional(),
|
|
144
|
-
facebookReelsCoverImageKey: z.string().optional(),
|
|
145
|
-
facebookReelsCollaborators: z.array(z.string()).optional(),
|
|
146
|
-
// Google Business Profile
|
|
147
|
-
gbpLocationId: z.string().optional().describe('GBP location resource name (from list_gbp_locations)'),
|
|
148
|
-
gbpTopicType: z.enum(['STANDARD', 'EVENT', 'OFFER']).optional().describe('Post type'),
|
|
149
|
-
gbpCallToActionType: z.enum(['BOOK', 'ORDER', 'LEARN_MORE', 'SIGN_UP', 'CALL', 'SHOP']).optional(),
|
|
150
|
-
gbpCallToActionUrl: z.string().optional().describe('CTA button URL (not needed for CALL, ignored for OFFER)'),
|
|
151
|
-
gbpEventTitle: z.string().optional().describe('Title for EVENT/OFFER posts (max 58 chars)'),
|
|
152
|
-
gbpEventStartDate: z.string().optional().describe('Start date for EVENT/OFFER (ISO 8601)'),
|
|
153
|
-
gbpEventEndDate: z.string().optional().describe('End date for EVENT/OFFER (ISO 8601)'),
|
|
154
|
-
gbpOfferCouponCode: z.string().optional().describe('Coupon code (OFFER only)'),
|
|
155
|
-
gbpOfferRedeemUrl: z.string().optional().describe('Redemption URL (OFFER only)'),
|
|
156
|
-
gbpOfferTerms: z.string().optional().describe('Terms and conditions (OFFER only)'),
|
|
157
|
-
// Pinterest
|
|
158
|
-
pinterestBoardId: z.string().optional(),
|
|
159
|
-
pinterestLink: z.string().optional(),
|
|
160
|
-
// LinkedIn
|
|
161
|
-
linkedinAttachmentKey: z.string().optional(),
|
|
162
|
-
linkedinAttachmentTitle: z.string().optional(),
|
|
163
|
-
})
|
|
164
|
-
.optional()
|
|
165
|
-
.describe('Platform-specific controls (shared across all posts in the batch)')),
|
|
174
|
+
.describe('Platform-specific controls (shared across all posts in the batch)')),
|
|
175
|
+
},
|
|
166
176
|
}, async (input) => {
|
|
167
177
|
const data = await client.post('/social-posts', {
|
|
168
178
|
posts: input.posts,
|
|
@@ -174,29 +184,35 @@ export function registerPostTools(server, client) {
|
|
|
174
184
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
175
185
|
};
|
|
176
186
|
});
|
|
177
|
-
server.
|
|
178
|
-
|
|
187
|
+
server.registerTool('delete_post', {
|
|
188
|
+
description: 'Delete a social media post by ID',
|
|
189
|
+
inputSchema: {
|
|
190
|
+
id: z.uuid().describe('Post ID to delete'),
|
|
191
|
+
},
|
|
179
192
|
}, async (input) => {
|
|
180
193
|
const data = await client.delete(`/social-posts/${input.id}`);
|
|
181
194
|
return {
|
|
182
195
|
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
183
196
|
};
|
|
184
197
|
});
|
|
185
|
-
server.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
server.registerTool('get_post_analytics', {
|
|
199
|
+
description: 'Fetch published posts with their latest performance metrics (impressions, reach, likes, comments, shares). Only returns published posts that have a platform post ID. LinkedIn personal accounts are excluded. Supported: Instagram, Facebook, TikTok, Threads, YouTube, LinkedIn (company pages), Pinterest (Business accounts). Pinterest extras include pin_clicks, outbound_clicks, saves_90d, save_rate_90d (saves are 90-day rolling because Pinterest API does not expose lifetime totals); video pins additionally surface mrc_views, views_10s, avg_watch_time, v50_watch_time, video_starts, quartile_95_views. Video posts also include normalized watch-time on latestMetric: avgWatchTimeSeconds, totalWatchTimeSeconds, videoViews (Facebook, Instagram Reels, YouTube, Pinterest, LinkedIn company pages).',
|
|
200
|
+
inputSchema: {
|
|
201
|
+
startDate: z
|
|
202
|
+
.string()
|
|
203
|
+
.describe('Start of date range (ISO 8601, e.g. 2026-01-01T00:00:00.000Z)'),
|
|
204
|
+
endDate: z
|
|
205
|
+
.string()
|
|
206
|
+
.describe('End of date range (ISO 8601, e.g. 2026-01-31T23:59:59.999Z)'),
|
|
207
|
+
platforms: z
|
|
208
|
+
.array(z.enum(PLATFORMS))
|
|
209
|
+
.optional()
|
|
210
|
+
.describe('Filter by platforms'),
|
|
211
|
+
socialMediaIds: z
|
|
212
|
+
.array(z.uuid())
|
|
213
|
+
.optional()
|
|
214
|
+
.describe('Filter by specific social media account IDs'),
|
|
215
|
+
},
|
|
200
216
|
}, async (input) => {
|
|
201
217
|
const data = await client.get('/social-posts/analytics', {
|
|
202
218
|
startDate: input.startDate,
|
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,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,SAAS,GAAG;IAChB,UAAU;IACV,WAAW;IACX,GAAG;IACH,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,yBAAyB;CACjB,CAAC;AAEX,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAExE,qFAAqF;AACrF,SAAS,SAAS,CAAyB,MAAS;IAClD,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE;QAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,MAAM,CAAC,CAAC;AACb,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAsB;IACzE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/tools/posts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,SAAS,GAAG;IAChB,UAAU;IACV,WAAW;IACX,GAAG;IACH,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,yBAAyB;CACjB,CAAC;AAEX,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAExE,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E,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
|
@@ -81,6 +81,18 @@ export interface GbpLocation {
|
|
|
81
81
|
address: string | null;
|
|
82
82
|
mapsUri: string | null;
|
|
83
83
|
}
|
|
84
|
+
/** A taggable place from search_places. The id works for both facebookPlaceId and instagramLocationId. */
|
|
85
|
+
export interface Place {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
/** The place's Facebook Page URL. Usually present, but treat as optional. */
|
|
89
|
+
link: string | null;
|
|
90
|
+
city: string | null;
|
|
91
|
+
country: string | null;
|
|
92
|
+
street: string | null;
|
|
93
|
+
zip: string | null;
|
|
94
|
+
pictureUrl: string | null;
|
|
95
|
+
}
|
|
84
96
|
export interface SignedUploadUrl {
|
|
85
97
|
key: string;
|
|
86
98
|
signedUrl: string;
|
|
@@ -94,6 +106,9 @@ export interface PostMetric {
|
|
|
94
106
|
totalInteractions: string;
|
|
95
107
|
fetchedAt: string;
|
|
96
108
|
extras: Record<string, unknown>;
|
|
109
|
+
avgWatchTimeSeconds?: number;
|
|
110
|
+
totalWatchTimeSeconds?: number;
|
|
111
|
+
videoViews?: number;
|
|
97
112
|
}
|
|
98
113
|
export interface AnalyticsPost {
|
|
99
114
|
id: string;
|
|
@@ -106,6 +121,24 @@ export interface AnalyticsPost {
|
|
|
106
121
|
export interface AnalyticsResponse {
|
|
107
122
|
data: AnalyticsPost[];
|
|
108
123
|
}
|
|
124
|
+
export interface FollowerSnapshot {
|
|
125
|
+
/** Day of the snapshot (ISO 8601). */
|
|
126
|
+
capturedAt: string;
|
|
127
|
+
/** Follower count on that day (string bigint); absent for a gap day. */
|
|
128
|
+
followerCount?: string;
|
|
129
|
+
}
|
|
130
|
+
/** Daily follower-count history for one social account, from get_follower_history. */
|
|
131
|
+
export interface FollowerHistory {
|
|
132
|
+
socialMediaId: string;
|
|
133
|
+
/** Daily snapshots, oldest first (may be empty). */
|
|
134
|
+
series: FollowerSnapshot[];
|
|
135
|
+
/** Most recent follower count (string bigint); absent until the first snapshot exists. */
|
|
136
|
+
currentFollowerCount?: string;
|
|
137
|
+
/** Net change across the returned series, signed, e.g. "+57" or "-12"; absent with no baseline. */
|
|
138
|
+
delta?: string;
|
|
139
|
+
/** When follower tracking began for this account (ISO 8601); absent until tracking starts. */
|
|
140
|
+
trackingStartedAt?: string;
|
|
141
|
+
}
|
|
109
142
|
export interface CreatePostInput {
|
|
110
143
|
content: string;
|
|
111
144
|
firstComment?: string;
|
|
@@ -127,6 +160,8 @@ export interface PostControls {
|
|
|
127
160
|
instagramPostToGrid?: boolean;
|
|
128
161
|
instagramPublishType?: 'TIMELINE' | 'STORY' | 'REEL';
|
|
129
162
|
instagramCollaborators?: string[];
|
|
163
|
+
instagramLocationId?: string;
|
|
164
|
+
instagramLocationName?: string;
|
|
130
165
|
youtubePrivacy?: 'PUBLIC' | 'PRIVATE' | 'UNLISTED';
|
|
131
166
|
youtubeTags?: string[];
|
|
132
167
|
youtubeCategoryId?: string;
|
|
@@ -142,6 +177,9 @@ export interface PostControls {
|
|
|
142
177
|
facebookCarouselShowEndCard?: boolean;
|
|
143
178
|
facebookReelsCoverImageKey?: string;
|
|
144
179
|
facebookReelsCollaborators?: string[];
|
|
180
|
+
facebookTargetCountries?: string[];
|
|
181
|
+
facebookPlaceId?: string;
|
|
182
|
+
facebookPlaceName?: string;
|
|
145
183
|
gbpLocationId?: string;
|
|
146
184
|
gbpTopicType?: 'STANDARD' | 'EVENT' | 'OFFER';
|
|
147
185
|
gbpCallToActionType?: 'BOOK' | 'ORDER' | 'LEARN_MORE' | 'SIGN_UP' | 'CALL' | 'SHOP';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postfast-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
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",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"node": ">=18"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"typescript": "^5.
|
|
46
|
-
"@types/node": "^22.
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"@types/node": "^22.19.21"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -101,7 +101,8 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
101
101
|
## Other Actions
|
|
102
102
|
|
|
103
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)
|
|
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
|
+
- **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`. Video posts also include normalized watch-time on `latestMetric`: `avgWatchTimeSeconds`, `totalWatchTimeSeconds`, `videoViews` (Facebook, Instagram Reels, YouTube, Pinterest, LinkedIn company pages). 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.
|
|
105
|
+
- **Follower history**: `get_follower_history` — daily follower-count snapshots for one account (`socialMediaId`), plus `currentFollowerCount` and a signed `delta` over the range. Optional `from`/`to` (ISO 8601); defaults to the last 90 days, capped at 365. Tracking is forward-only — `trackingStartedAt` marks when recording began, with no data before it; counts are strings (bigint). Coverage: Facebook Pages, Instagram, YouTube, Pinterest, Threads, Bluesky, Telegram, LinkedIn company pages (not X, TikTok, or personal Facebook)
|
|
105
106
|
- **Delete a post**: `delete_post` with the post ID
|
|
106
107
|
- **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
|
|
107
108
|
- **Pinterest boards**: `list_pinterest_boards` — get board IDs before creating Pinterest posts
|