posterly-mcp-server 0.8.1 → 0.8.2
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 +2 -2
- package/dist/lib/api-client.d.ts +5 -0
- package/dist/tools/get-account-analytics.js +9 -1
- package/dist/tools/get-post-analytics.js +7 -1
- package/package.json +1 -1
- package/src/lib/api-client.ts +5 -0
- package/src/tools/get-account-analytics.ts +8 -1
- package/src/tools/get-post-analytics.ts +7 -1
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
93
93
|
|
|
94
94
|
## Available tools
|
|
95
95
|
|
|
96
|
-
`posterly-mcp-server@0.8.
|
|
96
|
+
`posterly-mcp-server@0.8.2` exposes 16 tools:
|
|
97
97
|
|
|
98
98
|
- `whoami`
|
|
99
99
|
- `list_accounts`
|
|
@@ -112,7 +112,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
112
112
|
- `get_account_analytics`
|
|
113
113
|
- `get_post_analytics`
|
|
114
114
|
|
|
115
|
-
Analytics tools currently support Instagram, LinkedIn, Google Business Profile, and
|
|
115
|
+
Analytics tools currently support Instagram, LinkedIn, Google Business Profile, Pinterest, and YouTube.
|
|
116
116
|
|
|
117
117
|
## What the brand tools are for
|
|
118
118
|
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ export interface AccountAnalyticsSummary {
|
|
|
119
119
|
total_direction_requests: number | null;
|
|
120
120
|
total_conversations: number | null;
|
|
121
121
|
total_bookings: number | null;
|
|
122
|
+
total_watch_minutes?: number | null;
|
|
123
|
+
total_likes?: number | null;
|
|
122
124
|
}
|
|
123
125
|
export interface AccountAnalyticsSnapshot {
|
|
124
126
|
date: string;
|
|
@@ -163,8 +165,11 @@ export interface PostAnalyticsRow {
|
|
|
163
165
|
shares: number;
|
|
164
166
|
plays: number;
|
|
165
167
|
total_interactions: number;
|
|
168
|
+
avg_watch_time_ms?: number | null;
|
|
169
|
+
total_watch_time_ms?: number | null;
|
|
166
170
|
url_link_clicks?: number;
|
|
167
171
|
user_profile_clicks?: number;
|
|
172
|
+
engagements?: number;
|
|
168
173
|
media_type: string | null;
|
|
169
174
|
media_url: string | null;
|
|
170
175
|
permalink: string | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const getAccountAnalyticsTool = {
|
|
3
3
|
name: 'get_account_analytics',
|
|
4
|
-
description: 'Get daily analytics snapshots and a period summary for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, and
|
|
4
|
+
description: 'Get daily analytics snapshots and a period summary for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, Pinterest, and YouTube. Returns follower growth, reach, views, engagement rate, and platform-specific metrics.',
|
|
5
5
|
inputSchema: z.object({
|
|
6
6
|
account_id: z
|
|
7
7
|
.number()
|
|
@@ -59,6 +59,14 @@ export const getAccountAnalyticsTool = {
|
|
|
59
59
|
lines.push(`• Outbound clicks: ${summary.total_website_clicks.toLocaleString()}`);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
else if (account.platform === 'youtube') {
|
|
63
|
+
if (summary.total_watch_minutes != null) {
|
|
64
|
+
lines.push(`• Watch minutes: ${summary.total_watch_minutes.toLocaleString()}`);
|
|
65
|
+
}
|
|
66
|
+
if (summary.total_likes != null) {
|
|
67
|
+
lines.push(`• Likes: ${summary.total_likes.toLocaleString()}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
62
70
|
return lines.join('\n');
|
|
63
71
|
},
|
|
64
72
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const getPostAnalyticsTool = {
|
|
3
3
|
name: 'get_post_analytics',
|
|
4
|
-
description: 'Get per-post engagement metrics (likes, comments, reach, impressions, saves, shares, plays, clicks) for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, and
|
|
4
|
+
description: 'Get per-post engagement metrics (likes, comments, reach, impressions, saves, shares, plays, clicks, watch time) for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, Pinterest, and YouTube. Returns the most recent posts first.',
|
|
5
5
|
inputSchema: z.object({
|
|
6
6
|
account_id: z
|
|
7
7
|
.number()
|
|
@@ -55,6 +55,12 @@ export const getPostAnalyticsTool = {
|
|
|
55
55
|
metrics.push(`${p.shares} shares`);
|
|
56
56
|
if (p.plays)
|
|
57
57
|
metrics.push(`${p.plays.toLocaleString()} plays`);
|
|
58
|
+
if (account.platform === 'youtube' && p.total_watch_time_ms) {
|
|
59
|
+
metrics.push(`${Math.round(p.total_watch_time_ms / 60000).toLocaleString()} watch minutes`);
|
|
60
|
+
}
|
|
61
|
+
if (account.platform === 'youtube' && p.avg_watch_time_ms) {
|
|
62
|
+
metrics.push(`${Math.round(p.avg_watch_time_ms / 1000)}s avg view`);
|
|
63
|
+
}
|
|
58
64
|
if (p.url_link_clicks) {
|
|
59
65
|
metrics.push(account.platform === 'pinterest'
|
|
60
66
|
? `${p.url_link_clicks.toLocaleString()} outbound clicks`
|
package/package.json
CHANGED
package/src/lib/api-client.ts
CHANGED
|
@@ -117,6 +117,8 @@ export interface AccountAnalyticsSummary {
|
|
|
117
117
|
total_direction_requests: number | null;
|
|
118
118
|
total_conversations: number | null;
|
|
119
119
|
total_bookings: number | null;
|
|
120
|
+
total_watch_minutes?: number | null;
|
|
121
|
+
total_likes?: number | null;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
export interface AccountAnalyticsSnapshot {
|
|
@@ -157,8 +159,11 @@ export interface PostAnalyticsRow {
|
|
|
157
159
|
shares: number;
|
|
158
160
|
plays: number;
|
|
159
161
|
total_interactions: number;
|
|
162
|
+
avg_watch_time_ms?: number | null;
|
|
163
|
+
total_watch_time_ms?: number | null;
|
|
160
164
|
url_link_clicks?: number;
|
|
161
165
|
user_profile_clicks?: number;
|
|
166
|
+
engagements?: number;
|
|
162
167
|
media_type: string | null;
|
|
163
168
|
media_url: string | null;
|
|
164
169
|
permalink: string | null;
|
|
@@ -4,7 +4,7 @@ import type { PosterlyClient } from '../lib/api-client.js';
|
|
|
4
4
|
export const getAccountAnalyticsTool = {
|
|
5
5
|
name: 'get_account_analytics',
|
|
6
6
|
description:
|
|
7
|
-
'Get daily analytics snapshots and a period summary for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, and
|
|
7
|
+
'Get daily analytics snapshots and a period summary for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, Pinterest, and YouTube. Returns follower growth, reach, views, engagement rate, and platform-specific metrics.',
|
|
8
8
|
inputSchema: z.object({
|
|
9
9
|
account_id: z
|
|
10
10
|
.number()
|
|
@@ -68,6 +68,13 @@ export const getAccountAnalyticsTool = {
|
|
|
68
68
|
if (summary.total_website_clicks !== null) {
|
|
69
69
|
lines.push(`• Outbound clicks: ${summary.total_website_clicks.toLocaleString()}`);
|
|
70
70
|
}
|
|
71
|
+
} else if (account.platform === 'youtube') {
|
|
72
|
+
if (summary.total_watch_minutes != null) {
|
|
73
|
+
lines.push(`• Watch minutes: ${summary.total_watch_minutes.toLocaleString()}`);
|
|
74
|
+
}
|
|
75
|
+
if (summary.total_likes != null) {
|
|
76
|
+
lines.push(`• Likes: ${summary.total_likes.toLocaleString()}`);
|
|
77
|
+
}
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
return lines.join('\n');
|
|
@@ -4,7 +4,7 @@ import type { PosterlyClient } from '../lib/api-client.js';
|
|
|
4
4
|
export const getPostAnalyticsTool = {
|
|
5
5
|
name: 'get_post_analytics',
|
|
6
6
|
description:
|
|
7
|
-
'Get per-post engagement metrics (likes, comments, reach, impressions, saves, shares, plays, clicks) for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, and
|
|
7
|
+
'Get per-post engagement metrics (likes, comments, reach, impressions, saves, shares, plays, clicks, watch time) for a connected social account. Supports Instagram, LinkedIn, Google Business Profile, Pinterest, and YouTube. Returns the most recent posts first.',
|
|
8
8
|
inputSchema: z.object({
|
|
9
9
|
account_id: z
|
|
10
10
|
.number()
|
|
@@ -67,6 +67,12 @@ export const getPostAnalyticsTool = {
|
|
|
67
67
|
if (p.saved) metrics.push(`${p.saved} saved`);
|
|
68
68
|
if (p.shares) metrics.push(`${p.shares} shares`);
|
|
69
69
|
if (p.plays) metrics.push(`${p.plays.toLocaleString()} plays`);
|
|
70
|
+
if (account.platform === 'youtube' && p.total_watch_time_ms) {
|
|
71
|
+
metrics.push(`${Math.round(p.total_watch_time_ms / 60000).toLocaleString()} watch minutes`);
|
|
72
|
+
}
|
|
73
|
+
if (account.platform === 'youtube' && p.avg_watch_time_ms) {
|
|
74
|
+
metrics.push(`${Math.round(p.avg_watch_time_ms / 1000)}s avg view`);
|
|
75
|
+
}
|
|
70
76
|
if (p.url_link_clicks) {
|
|
71
77
|
metrics.push(
|
|
72
78
|
account.platform === 'pinterest'
|