posterly-mcp-server 0.58.0 → 0.59.0
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/README.md +1 -1
- package/dist/lib/api-client.d.ts +29 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/connect-account.d.ts +2 -2
- package/dist/tools/get-post.js +20 -1
- package/dist/tools/list-activity.js +16 -2
- package/dist/tools/update-post.d.ts +4 -0
- package/dist/tools/update-post.js +9 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/tool-registry.json +4 -0
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
123
123
|
|
|
124
124
|
## Available tools
|
|
125
125
|
|
|
126
|
-
`posterly-mcp-server@0.
|
|
126
|
+
`posterly-mcp-server@0.59.0` exposes 74 tools covering 118 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 71 tools covering 115 actions.
|
|
127
127
|
|
|
128
128
|
Many tools pick what to do with one parameter: `view` (reads), `action` (writes), or `type`. A few pick their mode from which parameters you pass (for example `update_post` with `status` changes the status instead of editing). Every tool description names all of its views and actions.
|
|
129
129
|
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -175,12 +175,24 @@ export interface ApiPostCreator {
|
|
|
175
175
|
source: string | null;
|
|
176
176
|
source_label: string | null;
|
|
177
177
|
}
|
|
178
|
+
/** Who last edited a post: where from, and a name or API key label. Never a secret. */
|
|
179
|
+
export interface ApiPostEditor {
|
|
180
|
+
source: string;
|
|
181
|
+
source_label?: string | null;
|
|
182
|
+
name?: string | null;
|
|
183
|
+
api_key_id?: string | null;
|
|
184
|
+
api_key_name?: string | null;
|
|
185
|
+
}
|
|
178
186
|
export interface Post {
|
|
179
187
|
id: number;
|
|
180
188
|
content: string;
|
|
181
189
|
scheduled_at: string;
|
|
182
190
|
created_at?: string | null;
|
|
183
191
|
updated_at?: string | null;
|
|
192
|
+
/** Counts edits. Send it back as expected_version when updating so a newer edit is never overwritten. */
|
|
193
|
+
edit_version?: number;
|
|
194
|
+
last_edited_at?: string | null;
|
|
195
|
+
last_edited_by?: ApiPostEditor | null;
|
|
184
196
|
created_by?: ApiPostCreator | null;
|
|
185
197
|
social_account_id: string;
|
|
186
198
|
media_url?: string;
|
|
@@ -1192,6 +1204,17 @@ export interface ActivityItem {
|
|
|
1192
1204
|
metadata?: Record<string, unknown> | null;
|
|
1193
1205
|
context?: Record<string, unknown> | null;
|
|
1194
1206
|
created_at: string;
|
|
1207
|
+
/** Edit history: where the change came from and who made it. Null on older entries. */
|
|
1208
|
+
source?: string | null;
|
|
1209
|
+
source_label?: string | null;
|
|
1210
|
+
actor_type?: 'user' | 'api_key' | 'guest' | 'system' | null;
|
|
1211
|
+
actor_name?: string | null;
|
|
1212
|
+
api_key_id?: string | null;
|
|
1213
|
+
api_key_name?: string | null;
|
|
1214
|
+
changes?: Record<string, {
|
|
1215
|
+
from?: unknown;
|
|
1216
|
+
to?: unknown;
|
|
1217
|
+
}> | null;
|
|
1195
1218
|
}
|
|
1196
1219
|
export interface ActivityResponse {
|
|
1197
1220
|
items: ActivityItem[];
|
|
@@ -1799,8 +1822,14 @@ export declare class PosterlyClient {
|
|
|
1799
1822
|
reel_cover_url?: string | null;
|
|
1800
1823
|
reel_cover_method?: string | null;
|
|
1801
1824
|
reel_thumb_offset?: number | null;
|
|
1825
|
+
/** The edit_version read from get_post. If the post changed since, the update is refused with the details. */
|
|
1826
|
+
expected_version?: number;
|
|
1802
1827
|
}): Promise<{
|
|
1803
1828
|
post: Post;
|
|
1829
|
+
warnings?: Array<{
|
|
1830
|
+
code: string;
|
|
1831
|
+
message: string;
|
|
1832
|
+
}>;
|
|
1804
1833
|
}>;
|
|
1805
1834
|
deletePost(id: number, options?: {
|
|
1806
1835
|
confirmPublished?: boolean;
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const POSTERLY_MCP_VERSION = "0.
|
|
1
|
+
export declare const POSTERLY_MCP_VERSION = "0.59.0";
|
package/dist/lib/version.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
// tool set (minus the intentional pre-auth signup tools that only this stdio
|
|
6
6
|
// package exposes). `npm run check:mcp-parity` enforces both the version match
|
|
7
7
|
// and the tool-list match, and runs in the pre-commit hook.
|
|
8
|
-
export const POSTERLY_MCP_VERSION = '0.
|
|
8
|
+
export const POSTERLY_MCP_VERSION = '0.59.0';
|
|
@@ -22,6 +22,7 @@ export declare const connectAccountTool: {
|
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
platform: "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy";
|
|
24
24
|
workspace_id?: string | undefined;
|
|
25
|
+
api_key?: string | undefined;
|
|
25
26
|
username?: string | undefined;
|
|
26
27
|
connect_session_id?: string | undefined;
|
|
27
28
|
bot_token?: string | undefined;
|
|
@@ -30,13 +31,13 @@ export declare const connectAccountTool: {
|
|
|
30
31
|
app_password?: string | undefined;
|
|
31
32
|
webhook_url?: string | undefined;
|
|
32
33
|
site_url?: string | undefined;
|
|
33
|
-
api_key?: string | undefined;
|
|
34
34
|
pat?: string | undefined;
|
|
35
35
|
instance?: string | undefined;
|
|
36
36
|
password?: string | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
platform: "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy";
|
|
39
39
|
workspace_id?: string | undefined;
|
|
40
|
+
api_key?: string | undefined;
|
|
40
41
|
username?: string | undefined;
|
|
41
42
|
connect_session_id?: string | undefined;
|
|
42
43
|
bot_token?: string | undefined;
|
|
@@ -45,7 +46,6 @@ export declare const connectAccountTool: {
|
|
|
45
46
|
app_password?: string | undefined;
|
|
46
47
|
webhook_url?: string | undefined;
|
|
47
48
|
site_url?: string | undefined;
|
|
48
|
-
api_key?: string | undefined;
|
|
49
49
|
pat?: string | undefined;
|
|
50
50
|
instance?: string | undefined;
|
|
51
51
|
password?: string | undefined;
|
package/dist/tools/get-post.js
CHANGED
|
@@ -3,7 +3,7 @@ import { dashboardUrlForPost, formatIsoTimestamp, formatLocalDateTime, formatPos
|
|
|
3
3
|
import { validateArgs } from '../lib/tool-runtime.js';
|
|
4
4
|
export const getPostTool = {
|
|
5
5
|
name: 'get_post',
|
|
6
|
-
description: 'One post by ID. view=post (default): caption, status, platform, account, scheduled time, when it was created and by whom (account and channel, such as dashboard, API, or MCP), media, a link back to the post in posterly, and the failure reason when a publish failed. view=missing: each missing field (content, media, account, platform settings, or metadata) and how to fix it before the post can publish.',
|
|
6
|
+
description: 'One post by ID. view=post (default): caption, status, platform, account, scheduled time, when it was created and by whom (account and channel, such as dashboard, API, or MCP), its Version and who last edited it (pass the Version as expected_version when you update), media, a link back to the post in posterly, and the failure reason when a publish failed. view=missing: each missing field (content, media, account, platform settings, or metadata) and how to fix it before the post can publish.',
|
|
7
7
|
inputSchema: z.object({
|
|
8
8
|
post_id: z.number().describe('The post ID to look up'),
|
|
9
9
|
view: z.enum(['post', 'missing']).optional().describe('post (default) or missing.'),
|
|
@@ -52,6 +52,11 @@ async function post(client, input) {
|
|
|
52
52
|
lines.push(`• Created by: ${formatPostCreator(p.created_by)}`);
|
|
53
53
|
if ('updated_at' in p)
|
|
54
54
|
lines.push(`• Last updated: ${formatIsoTimestamp(p.updated_at)}`);
|
|
55
|
+
if (typeof p.edit_version === 'number') {
|
|
56
|
+
lines.push(`• Version: ${p.edit_version} (pass this as expected_version when you update the post)`);
|
|
57
|
+
if (p.last_edited_at)
|
|
58
|
+
lines.push(`• Last edited: ${formatIsoTimestamp(p.last_edited_at)}${formatLastEditedBy(p.last_edited_by)}`);
|
|
59
|
+
}
|
|
55
60
|
lines.push(`• View in posterly: ${dashboardUrlForPost({ id: p.id, scheduled_at: p.scheduled_at })}`);
|
|
56
61
|
for (const [label, value] of publishedLinkRows(p))
|
|
57
62
|
lines.push(`• ${label}: ${value}`);
|
|
@@ -61,6 +66,20 @@ async function post(client, input) {
|
|
|
61
66
|
lines.push(`• Media (${p.media_urls.length}): ${p.media_urls.join(', ')}`);
|
|
62
67
|
return lines.join('\n');
|
|
63
68
|
}
|
|
69
|
+
/** " by Nadia (dashboard)", " by API key Claude (MCP)", or an empty string when unknown. */
|
|
70
|
+
function formatLastEditedBy(editor) {
|
|
71
|
+
if (!editor)
|
|
72
|
+
return '';
|
|
73
|
+
const via = editor.source_label || editor.source || '';
|
|
74
|
+
const who = editor.source === 'system'
|
|
75
|
+
? 'posterly'
|
|
76
|
+
: editor.source === 'client_review'
|
|
77
|
+
? 'a client reviewer'
|
|
78
|
+
: editor.api_key_id
|
|
79
|
+
? `API key ${editor.api_key_name || '(deleted)'}`
|
|
80
|
+
: editor.name || 'a teammate';
|
|
81
|
+
return ` by ${who}${via && editor.source !== 'system' ? ` (${via})` : ''}`;
|
|
82
|
+
}
|
|
64
83
|
async function postMissing(client, input) {
|
|
65
84
|
const result = await client.getPostMissing(input.post_id);
|
|
66
85
|
if (isStructuredMissingReport(result))
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { formatPagingNote } from '../lib/format.js';
|
|
3
|
+
/** " by Nadia (dashboard)" or " by API key Claude (MCP)" for entries that record who made the change. */
|
|
4
|
+
function activityActor(item) {
|
|
5
|
+
if (!item.actor_type)
|
|
6
|
+
return '';
|
|
7
|
+
const via = item.source_label || item.source || '';
|
|
8
|
+
const who = item.actor_type === 'system'
|
|
9
|
+
? 'posterly'
|
|
10
|
+
: item.actor_type === 'guest'
|
|
11
|
+
? 'a client reviewer'
|
|
12
|
+
: item.actor_type === 'api_key' || item.api_key_id
|
|
13
|
+
? `API key ${item.api_key_name || '(deleted)'}`
|
|
14
|
+
: item.actor_name || 'a teammate';
|
|
15
|
+
return ` by ${who}${via && item.actor_type !== 'system' ? ` (${via})` : ''}`;
|
|
16
|
+
}
|
|
3
17
|
export const listActivityTool = {
|
|
4
18
|
name: 'list_activity',
|
|
5
|
-
description: 'List recent activity and publish events for posts, including status changes, publish attempts, failures, and retries, newest first. Use this as the agent notifications feed. The output says whether more events exist; page with offset (offset + limit up to 1000) or narrow with since or post_id before concluding nothing else happened.',
|
|
19
|
+
description: 'List recent activity and publish events for posts, including edits (who changed what, and from where: dashboard, API key, MCP, client review), status changes, publish attempts, failures, and retries, newest first. Use this as the agent notifications feed. The output says whether more events exist; page with offset (offset + limit up to 1000) or narrow with since or post_id before concluding nothing else happened.',
|
|
6
20
|
inputSchema: z.object({
|
|
7
21
|
workspace_id: z.string().optional().describe('Filter to a workspace ID from whoami.'),
|
|
8
22
|
post_id: z.number().int().positive().optional().describe('Filter to one post ID.'),
|
|
@@ -31,7 +45,7 @@ export const listActivityTool = {
|
|
|
31
45
|
}
|
|
32
46
|
else {
|
|
33
47
|
const label = item.description || item.action || 'activity';
|
|
34
|
-
lines.push(`- [${when}] post #${item.post_id || '?'} ${label}`);
|
|
48
|
+
lines.push(`- [${when}] post #${item.post_id || '?'} ${label}${activityActor(item)}`);
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
lines.push('', formatPagingNote({
|
|
@@ -686,6 +686,7 @@ type EditInput = {
|
|
|
686
686
|
post_type?: string;
|
|
687
687
|
account_id?: string;
|
|
688
688
|
thread_posts?: string[];
|
|
689
|
+
expected_version?: number;
|
|
689
690
|
instagram_settings?: z.infer<typeof instagramSettingsSchema>;
|
|
690
691
|
platform_settings?: z.infer<typeof platformSettingsSchema>;
|
|
691
692
|
confirm: true;
|
|
@@ -710,6 +711,7 @@ export declare const updatePostTool: {
|
|
|
710
711
|
post_type: z.ZodOptional<z.ZodString>;
|
|
711
712
|
account_id: z.ZodOptional<z.ZodString>;
|
|
712
713
|
thread_posts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
714
|
+
expected_version: z.ZodOptional<z.ZodNumber>;
|
|
713
715
|
reel_cover_url: z.ZodOptional<z.ZodString>;
|
|
714
716
|
reel_cover_method: z.ZodOptional<z.ZodString>;
|
|
715
717
|
reel_thumb_offset: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1614,6 +1616,7 @@ export declare const updatePostTool: {
|
|
|
1614
1616
|
is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
|
|
1615
1617
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
1616
1618
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1619
|
+
expected_version?: number | undefined;
|
|
1617
1620
|
approval_action?: "request" | "approve" | "request_changes" | "reject" | undefined;
|
|
1618
1621
|
approval_axis?: "asset" | "caption" | undefined;
|
|
1619
1622
|
approval_note?: string | undefined;
|
|
@@ -1835,6 +1838,7 @@ export declare const updatePostTool: {
|
|
|
1835
1838
|
is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
|
|
1836
1839
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
1837
1840
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1841
|
+
expected_version?: number | undefined;
|
|
1838
1842
|
approval_action?: "request" | "approve" | "request_changes" | "reject" | undefined;
|
|
1839
1843
|
approval_axis?: "asset" | "caption" | undefined;
|
|
1840
1844
|
approval_note?: string | undefined;
|
|
@@ -147,7 +147,8 @@ const platformSettingsSchema = z.object({
|
|
|
147
147
|
export const updatePostTool = {
|
|
148
148
|
name: 'update_post',
|
|
149
149
|
description: 'Change a scheduled or draft post. DESTRUCTIVE WRITE. Edit (default): caption, media, schedule, post_type, settings, account_id, or thread_posts; overwrites the existing post; cannot edit published or currently publishing posts. account_id moves the post to another account you can use in the same workspace and on the same brand, and the platform follows that account. thread_posts replaces an X or Threads reply chain with at least two non-empty parts, and the first part becomes the caption. If a client has already approved the post, a caption edit reopens caption approval, a media or thumbnail edit reopens asset approval, and a reschedule, account change, thread edit, or settings change reopens both. status (scheduled, paused, or draft, with scheduled_at when scheduling a draft): pause, resume, or move back to draft; send it on its own. release_id (with optional group_id): set or repair external release/group IDs; send it on its own. approval_action (request, approve, request_changes, or reject): change client approval. Only a workspace owner or admin may do this. The actor is the API key user, never a brand guest. request emails the brand reviewers. approve, request_changes, and reject are team-side decisions. request_changes needs approval_note. Optional approval_axis is asset or caption; omit it for both. Send approval_action on its own.\n\n' +
|
|
150
|
-
'REQUIRED BEFORE CALLING: Show the user a side-by-side of the CURRENT post (caption, scheduled time, media, status) and the PROPOSED change, and get explicit confirmation ("yes update it", "apply those changes") before calling. Do not auto-edit posts based on a general instruction - each change needs its own confirmation
|
|
150
|
+
'REQUIRED BEFORE CALLING: Show the user a side-by-side of the CURRENT post (caption, scheduled time, media, status) and the PROPOSED change, and get explicit confirmation ("yes update it", "apply those changes") before calling. Do not auto-edit posts based on a general instruction - each change needs its own confirmation.\n\n' +
|
|
151
|
+
'READ, THEN UPDATE: pass the Version from get_post as expected_version and send only the fields you are changing. If the post was edited since, nothing changes and the error says what changed and who changed it. Without expected_version a warning is returned when the update replaces a change made by someone else in the last 24 hours.',
|
|
151
152
|
inputSchema: z.object({
|
|
152
153
|
post_id: z.number().describe('The post ID to update'),
|
|
153
154
|
caption: z.string().optional().describe('New caption/text content'),
|
|
@@ -170,6 +171,12 @@ export const updatePostTool = {
|
|
|
170
171
|
.min(2)
|
|
171
172
|
.optional()
|
|
172
173
|
.describe('Replace an X or Threads reply chain. At least 2 non-empty parts. The first part becomes the caption.'),
|
|
174
|
+
expected_version: z
|
|
175
|
+
.number()
|
|
176
|
+
.int()
|
|
177
|
+
.min(1)
|
|
178
|
+
.optional()
|
|
179
|
+
.describe('Version from get_post. Refused if the post changed since. Send only the fields you are changing.'),
|
|
173
180
|
// Reel cover controls are also accepted top-level, matching the hosted
|
|
174
181
|
// endpoint. An agent reading the hosted schema will reach for these names,
|
|
175
182
|
// and scripts/check-mcp-schema-parity.ts enforces that both surfaces agree.
|
|
@@ -265,6 +272,7 @@ async function editPost(client, input) {
|
|
|
265
272
|
...(p.workspace_id ? [['Workspace', String(p.workspace_id)]] : []),
|
|
266
273
|
['Scheduled', formatDateTime(p.scheduled_at)],
|
|
267
274
|
['Type', p.post_type || 'unknown'],
|
|
275
|
+
...(typeof p.edit_version === 'number' ? [['Version', `${p.edit_version} (send this as expected_version on your next edit)`]] : []),
|
|
268
276
|
...(failure ? [['Failure', failure]] : []),
|
|
269
277
|
...(platformPostId ? [['Platform post ID', platformPostId]] : []),
|
|
270
278
|
...(groups.length ? [['Group', groups.join(', ')]] : []),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posterly-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"mcpName": "io.github.awpthorp/posterly",
|
|
5
5
|
"description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.awpthorp/posterly",
|
|
4
4
|
"title": "posterly",
|
|
5
5
|
"description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.59.0",
|
|
7
7
|
"websiteUrl": "https://www.poster.ly/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/awpthorp/posterly-mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "posterly-mcp-server",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.59.0",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|