@pofky/asc-mcp 1.1.0 → 1.3.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 +53 -10
- package/dist/elicitation.d.ts +39 -0
- package/dist/elicitation.d.ts.map +1 -0
- package/dist/elicitation.js +63 -0
- package/dist/elicitation.js.map +1 -0
- package/dist/index.js +97 -3
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +16 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +124 -0
- package/dist/prompts.js.map +1 -0
- package/dist/sampling.d.ts +53 -0
- package/dist/sampling.d.ts.map +1 -0
- package/dist/sampling.js +109 -0
- package/dist/sampling.js.map +1 -0
- package/dist/skill-installer.d.ts +10 -0
- package/dist/skill-installer.d.ts.map +1 -0
- package/dist/skill-installer.js +104 -0
- package/dist/skill-installer.js.map +1 -0
- package/dist/tools/draft-review-response.d.ts +37 -0
- package/dist/tools/draft-review-response.d.ts.map +1 -0
- package/dist/tools/draft-review-response.js +236 -0
- package/dist/tools/draft-review-response.js.map +1 -0
- package/dist/tools/triage-reviews.d.ts +35 -0
- package/dist/tools/triage-reviews.d.ts.map +1 -0
- package/dist/tools/triage-reviews.js +194 -0
- package/dist/tools/triage-reviews.js.map +1 -0
- package/package.json +3 -2
- package/skills/asc-review-triage/SKILL.md +58 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* triage_reviews tool (Pro). Uses MCP Sampling to cluster customer reviews
|
|
4
|
+
* into themes on the user's own Claude (zero cost to us).
|
|
5
|
+
*
|
|
6
|
+
* Pipeline:
|
|
7
|
+
* 1. Fetch up to `limit` reviews via the ASC API (reuses list_reviews logic)
|
|
8
|
+
* 2. If none, return empty result, skip Sampling
|
|
9
|
+
* 3. Ask the user's client to cluster via Sampling
|
|
10
|
+
* 4. Parse JSON response from the model; degrade gracefully on parse error
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.triageReviews = triageReviews;
|
|
14
|
+
exports.formatTriageForAgent = formatTriageForAgent;
|
|
15
|
+
const sampling_js_1 = require("../sampling.js");
|
|
16
|
+
const MAX_REVIEWS = 30;
|
|
17
|
+
const MIN_FOR_CLUSTERING = 3;
|
|
18
|
+
const SYSTEM_PROMPT = [
|
|
19
|
+
"You are a product-review triage assistant.",
|
|
20
|
+
"Given a list of App Store reviews, group them into 3 to 5 themes.",
|
|
21
|
+
"Each theme gets:",
|
|
22
|
+
" - a short label (3 to 7 words)",
|
|
23
|
+
" - the exact count of reviews that fit it",
|
|
24
|
+
" - an action_bucket from: bug, missing_feature, pricing, ux, content, other",
|
|
25
|
+
" - a single representative verbatim quote (must be one of the reviews, unedited)",
|
|
26
|
+
"",
|
|
27
|
+
"Rules:",
|
|
28
|
+
" - Reply ONLY with a valid JSON object matching the schema below. No prose, no markdown.",
|
|
29
|
+
" - Never invent themes with zero reviews.",
|
|
30
|
+
" - Never invent quotes; they must appear in the input verbatim.",
|
|
31
|
+
" - If fewer than 3 reviews, still produce 1 to 2 themes.",
|
|
32
|
+
"",
|
|
33
|
+
'Schema: { "themes": [{ "theme": string, "count": number, "action_bucket": string, "quote": string }] }',
|
|
34
|
+
].join("\n");
|
|
35
|
+
async function triageReviews(server, client, args, tier) {
|
|
36
|
+
if (tier !== "pro") {
|
|
37
|
+
return {
|
|
38
|
+
app_id: args.app_id,
|
|
39
|
+
reviews_analyzed: 0,
|
|
40
|
+
themes: [],
|
|
41
|
+
degraded: true,
|
|
42
|
+
note: "Review triage requires a Pro license ($9/mo). Get your license at https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu",
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const limit = Math.min(args.limit ?? 30, MAX_REVIEWS);
|
|
46
|
+
const params = {
|
|
47
|
+
"fields[customerReviews]": "rating,title,body,reviewerNickname,createdDate,territory",
|
|
48
|
+
limit: String(limit),
|
|
49
|
+
sort: "-createdDate",
|
|
50
|
+
};
|
|
51
|
+
if (args.rating && args.rating >= 1 && args.rating <= 5) {
|
|
52
|
+
params["filter[rating]"] = String(args.rating);
|
|
53
|
+
}
|
|
54
|
+
const response = await client.get(`/v1/apps/${args.app_id}/customerReviews`, params);
|
|
55
|
+
const reviews = Array.isArray(response.data) ? response.data : [response.data];
|
|
56
|
+
const total = reviews.length;
|
|
57
|
+
if (total === 0) {
|
|
58
|
+
return {
|
|
59
|
+
app_id: args.app_id,
|
|
60
|
+
reviews_analyzed: 0,
|
|
61
|
+
themes: [],
|
|
62
|
+
degraded: false,
|
|
63
|
+
note: "No reviews found for this app in the requested window.",
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (total < MIN_FOR_CLUSTERING) {
|
|
67
|
+
const themes = reviews.map((r) => {
|
|
68
|
+
const a = r.attributes;
|
|
69
|
+
return {
|
|
70
|
+
theme: (a.title || a.body.slice(0, 40) || "Untitled").slice(0, 60),
|
|
71
|
+
count: 1,
|
|
72
|
+
action_bucket: "other",
|
|
73
|
+
quote: (a.body || a.title || "").slice(0, 240),
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
app_id: args.app_id,
|
|
78
|
+
reviews_analyzed: total,
|
|
79
|
+
themes,
|
|
80
|
+
degraded: false,
|
|
81
|
+
note: `Only ${total} review(s) found; returning pass-through summary without Sampling.`,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const reviewText = reviews
|
|
85
|
+
.map((r, i) => {
|
|
86
|
+
const a = r.attributes;
|
|
87
|
+
return `[${i + 1}] ${a.rating}/5 - ${a.territory} - "${a.title || ""}" :: ${a.body || ""}`;
|
|
88
|
+
})
|
|
89
|
+
.join("\n");
|
|
90
|
+
const samplingResult = await (0, sampling_js_1.sample)(server, {
|
|
91
|
+
system: SYSTEM_PROMPT,
|
|
92
|
+
user: `Cluster these ${total} App Store reviews into 3 to 5 themes. Reply with JSON only.\n\n${reviewText}`,
|
|
93
|
+
maxTokens: 1200,
|
|
94
|
+
modelPreferences: sampling_js_1.MODEL_HINTS.fast,
|
|
95
|
+
});
|
|
96
|
+
if (!samplingResult.ok) {
|
|
97
|
+
if ("unsupported" in samplingResult && samplingResult.unsupported) {
|
|
98
|
+
return {
|
|
99
|
+
app_id: args.app_id,
|
|
100
|
+
reviews_analyzed: total,
|
|
101
|
+
themes: [],
|
|
102
|
+
degraded: true,
|
|
103
|
+
note: "Your MCP client does not support Sampling. Raw review bodies returned; ask your agent to cluster manually.",
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
app_id: args.app_id,
|
|
108
|
+
reviews_analyzed: total,
|
|
109
|
+
themes: [],
|
|
110
|
+
degraded: true,
|
|
111
|
+
note: `Sampling failed: ${"error" in samplingResult ? samplingResult.error : "unknown"}. Raw reviews returned.`,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const parsed = safeParseThemes(samplingResult.text);
|
|
115
|
+
if (!parsed) {
|
|
116
|
+
return {
|
|
117
|
+
app_id: args.app_id,
|
|
118
|
+
reviews_analyzed: total,
|
|
119
|
+
themes: [],
|
|
120
|
+
degraded: true,
|
|
121
|
+
note: `Sampling returned invalid JSON. Raw: ${samplingResult.text.slice(0, 200)}`,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
app_id: args.app_id,
|
|
126
|
+
reviews_analyzed: total,
|
|
127
|
+
themes: parsed,
|
|
128
|
+
degraded: false,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function safeParseThemes(text) {
|
|
132
|
+
let json = text.trim();
|
|
133
|
+
const fenced = json.match(/```(?:json)?\s*([\s\S]+?)```/);
|
|
134
|
+
if (fenced)
|
|
135
|
+
json = fenced[1].trim();
|
|
136
|
+
try {
|
|
137
|
+
const obj = JSON.parse(json);
|
|
138
|
+
if (!obj.themes || !Array.isArray(obj.themes))
|
|
139
|
+
return null;
|
|
140
|
+
const out = [];
|
|
141
|
+
for (const t of obj.themes) {
|
|
142
|
+
if (!t || typeof t !== "object")
|
|
143
|
+
continue;
|
|
144
|
+
const row = t;
|
|
145
|
+
const theme = String(row.theme ?? "").slice(0, 120);
|
|
146
|
+
const count = Number(row.count ?? 0);
|
|
147
|
+
const actionBucket = String(row.action_bucket ?? "other");
|
|
148
|
+
const quote = String(row.quote ?? "").slice(0, 500);
|
|
149
|
+
if (!theme || count <= 0)
|
|
150
|
+
continue;
|
|
151
|
+
out.push({
|
|
152
|
+
theme,
|
|
153
|
+
count,
|
|
154
|
+
action_bucket: validBucket(actionBucket),
|
|
155
|
+
quote,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return out.slice(0, 8);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function validBucket(s) {
|
|
165
|
+
const allowed = [
|
|
166
|
+
"bug",
|
|
167
|
+
"missing_feature",
|
|
168
|
+
"pricing",
|
|
169
|
+
"ux",
|
|
170
|
+
"content",
|
|
171
|
+
"other",
|
|
172
|
+
];
|
|
173
|
+
return allowed.includes(s) ? s : "other";
|
|
174
|
+
}
|
|
175
|
+
function formatTriageForAgent(res) {
|
|
176
|
+
if (res.themes.length === 0) {
|
|
177
|
+
return res.note ?? "No reviews to triage.";
|
|
178
|
+
}
|
|
179
|
+
const lines = [
|
|
180
|
+
`# Review triage: app ${res.app_id}`,
|
|
181
|
+
`Reviews analyzed: ${res.reviews_analyzed}${res.degraded ? " (degraded)" : ""}`,
|
|
182
|
+
"",
|
|
183
|
+
];
|
|
184
|
+
for (const t of res.themes) {
|
|
185
|
+
lines.push(`## ${t.theme} (${t.count}, ${t.action_bucket})`);
|
|
186
|
+
lines.push(`> ${t.quote}`);
|
|
187
|
+
lines.push("");
|
|
188
|
+
}
|
|
189
|
+
if (res.note) {
|
|
190
|
+
lines.push(`_${res.note}_`);
|
|
191
|
+
}
|
|
192
|
+
return lines.join("\n");
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=triage-reviews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triage-reviews.js","sourceRoot":"","sources":["../../src/tools/triage-reviews.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAoDH,sCAiHC;AA2CD,oDAkBC;AA7ND,gDAAqD;AA0BrD,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,aAAa,GAAG;IACpB,4CAA4C;IAC5C,mEAAmE;IACnE,kBAAkB;IAClB,kCAAkC;IAClC,4CAA4C;IAC5C,8EAA8E;IAC9E,mFAAmF;IACnF,EAAE;IACF,QAAQ;IACR,2FAA2F;IAC3F,4CAA4C;IAC5C,kEAAkE;IAClE,2DAA2D;IAC3D,EAAE;IACF,wGAAwG;CACzG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEN,KAAK,UAAU,aAAa,CACjC,MAAiB,EACjB,MAAiB,EACjB,IAAwE,EACxE,IAAU;IAEV,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,6IAA6I;SACpJ,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,WAAW,CAAC,CAAC;IACtD,MAAM,MAAM,GAA2B;QACrC,yBAAyB,EAAE,0DAA0D;QACrF,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;QACpB,IAAI,EAAE,cAAc;KACrB,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,CA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,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE;QAC/E,EAAE;KACH,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;QAC9D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pofky/asc-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "The App Store Connect intelligence layer for your coding agent. 13 tools (including Sampling-powered review triage and locale-aware response drafts), 3 slash-command Prompts, and a bundled Claude Skill. Works with Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP-compatible client. Free tier included.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asc-mcp": "dist/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"files": [
|
|
59
59
|
"dist/",
|
|
60
|
+
"skills/",
|
|
60
61
|
"README.md",
|
|
61
62
|
"LICENSE"
|
|
62
63
|
]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asc-review-triage
|
|
3
|
+
description: Use this skill whenever the user asks about App Store reviews, ratings, customer feedback, low-star reviews, reviewer sentiment, or what users are saying about an iOS or macOS app. Queries the asc-mcp server to pull and analyze reviews. Trigger on phrases like "any bad reviews", "what do my users say", "reviews this week", "1-star", "2-star", "3-star", "customer feedback", "ratings trend", "reviewer sentiment".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# App Store review triage
|
|
7
|
+
|
|
8
|
+
When the user asks about reviews, ratings, or customer feedback for their App Store apps, follow this procedure using the `asc-mcp` tools.
|
|
9
|
+
|
|
10
|
+
## Step 1. Identify the app
|
|
11
|
+
|
|
12
|
+
If the user specified an app name or ID, use it. Otherwise:
|
|
13
|
+
|
|
14
|
+
1. Call `list_apps` to get the full list.
|
|
15
|
+
2. If there is only one app, use it.
|
|
16
|
+
3. If there are several, ask the user which app they mean. Do not guess.
|
|
17
|
+
|
|
18
|
+
## Step 2. Pull reviews
|
|
19
|
+
|
|
20
|
+
Call `list_reviews` with:
|
|
21
|
+
|
|
22
|
+
- `app_id`: the app ID from step 1
|
|
23
|
+
- `rating`: 3 (covers 1, 2, and 3 star reviews when sorted correctly)
|
|
24
|
+
- `sort`: `newest`
|
|
25
|
+
- `limit`: 20 for a quick scan, up to 100 for a deep dive
|
|
26
|
+
|
|
27
|
+
If the user specifically asked about 1-star reviews only, set `rating: 1`. If they asked about all reviews (positive and negative), call `list_reviews` without a rating filter.
|
|
28
|
+
|
|
29
|
+
## Step 3. Confirm review status
|
|
30
|
+
|
|
31
|
+
Call `review_status` with the same `app_id`. This tells the user whether a new version is in review or waiting, which often correlates with review-score dips.
|
|
32
|
+
|
|
33
|
+
## Step 4. Summarize
|
|
34
|
+
|
|
35
|
+
Produce a concise summary with:
|
|
36
|
+
|
|
37
|
+
- Total reviews in the window
|
|
38
|
+
- Breakdown by rating (1, 2, 3, 4, 5)
|
|
39
|
+
- 3 to 5 themes, each with a review-count and one representative quote
|
|
40
|
+
- Any single review flagged as potentially actionable (specific bug report, feature request, competitor mention)
|
|
41
|
+
- The current review-queue status from step 3
|
|
42
|
+
|
|
43
|
+
## Guardrails
|
|
44
|
+
|
|
45
|
+
- Do not invent reviews. Quote only what `list_reviews` returned.
|
|
46
|
+
- Do not post a reply. This skill reads only. Drafting or posting responses is a separate Pro feature not in this skill.
|
|
47
|
+
- If `list_reviews` returns nothing, say so plainly.
|
|
48
|
+
- If the user does not have a Pro license (free tier), `list_reviews` will error. Explain the free-tier limit and link to https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu.
|
|
49
|
+
|
|
50
|
+
## Example usage
|
|
51
|
+
|
|
52
|
+
User: "Any bad reviews on my meditation app this week?"
|
|
53
|
+
|
|
54
|
+
Claude:
|
|
55
|
+
1. Calls `list_apps`, finds one app called "Meditation Timer".
|
|
56
|
+
2. Calls `list_reviews` with that app ID, rating 3, newest first, limit 20.
|
|
57
|
+
3. Calls `review_status`.
|
|
58
|
+
4. Returns: "7 reviews in the last 7 days, average 2.3 stars. 3 themes: crashes on iOS 18.2 (4 reviews), missing dark mode (2 reviews), confusion over premium tier (1 review). The version 2.4.1 submission is currently In Review (submitted 2 days ago)."
|