@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 CHANGED
@@ -1,14 +1,17 @@
1
1
  # App Store Connect MCP Server
2
2
 
3
- > **Not another API wrapper.** This MCP server catches rejections before you submit, gives you a morning briefing across all your apps, and writes your release notes from git history. The 5 free tools cover basics. The 3 Pro tools are things no other ASC server does.
3
+ > **The App Store Connect intelligence layer for your coding agent.** 11 tools that think, 3 slash-command workflows, and a bundled Claude Skill. Not another API wrapper.
4
+
5
+ Maintained successor to [JoshuaRileyDev/app-store-connect-mcp-server](https://github.com/JoshuaRileyDev/app-store-connect-mcp-server) (archived Feb 2026). Different angle, same API surface plus more.
4
6
 
5
7
  ```bash
6
8
  npm install -g @pofky/asc-mcp
9
+ asc-mcp install-skill # one-line, optional, for auto-routed review questions
7
10
  ```
8
11
 
9
12
  ## What Makes This Different
10
13
 
11
- Other ASC MCP servers wrap the API and give you 80-293 raw endpoints. This one gives you 8 tools that think:
14
+ Other ASC MCP servers wrap the API and give you 80 to 293 raw endpoints. This one gives you 13 opinionated tools, 3 slash-command Prompts, and a Claude Skill that all think. Two of the tools use MCP Sampling: your own client's model does the LLM work, so there is no extra cost from this server.
12
15
 
13
16
  | You say | What happens |
14
17
  |---------|-------------|
@@ -72,11 +75,48 @@ Works with **Claude Code**, **Cursor**, **Windsurf**, **Cline**, and any MCP-com
72
75
  | `release_preflight` | Pre-submission audit: metadata, char limits, screenshots, builds | Catches 40%+ of common rejection causes before you submit |
73
76
  | `daily_briefing` | Morning summary across all apps: status, reviews, rejections | One call replaces 10 minutes of portal clicking |
74
77
  | `release_notes` | Git commits since last tag, categorized for writing "What's New" | Your AI agent writes release notes from your actual changes |
78
+ | `keyword_insights` | Analyze keywords against iTunes search competition, difficulty ratings | See which keywords are worth targeting at a glance |
79
+ | `competitor_snapshot` | Look up any app: ratings, reviews, version, price, release notes | Competitive intelligence without leaving your editor |
80
+ | `metadata_diff` | Compare live vs pending version metadata across all locales | Verify exactly what changed before submitting |
81
+ | `triage_reviews` | Pulls recent reviews and clusters them into 3 to 5 themes with counts, action buckets, and quotes, using MCP Sampling | Zero extra cost: your client's model does the clustering |
82
+ | `draft_review_response` | Drafts a public reply to a single review in the review's locale, via Sampling. Elicits tone if your client supports it. Never auto-posts. | Apple guideline 1.2 respected; you paste into ASC yourself |
75
83
 
76
- **Coming next:** review response drafting, keyword/ASO insights, competitor snapshots.
84
+ **Coming next (Week 3):** rejection-risk scoring against the 2026 corpus (guideline 2.3 metadata, 4.0 design, privacy-AI 5.1.2).
77
85
 
78
86
  [Get Pro](https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu) | [Retrieve your license key](https://asc-mcp-license.remewdy.workers.dev/key)
79
87
 
88
+ ## How Sampling works (zero extra cost)
89
+
90
+ `triage_reviews` and `draft_review_response` use the MCP Sampling primitive. When you call one of these tools, this server sends a `sampling/createMessage` request back to your own MCP client. Your client runs the LLM locally (Claude Desktop uses your account; Claude Code uses its session). We never call Anthropic from our side.
91
+
92
+ Outcome: review clustering and reply drafting cost you exactly what you would pay for any other Claude request, not a penny more from this server.
93
+
94
+ If your MCP client does not support Sampling yet, both tools return a structured `degraded: true` result with a clear explanation. Upgrade Claude Desktop or Claude Code to a recent version for full functionality.
95
+
96
+ ## Slash Commands (Prompts)
97
+
98
+ Type these in Claude Desktop or Claude Code and the agent runs a pre-built multi-tool workflow:
99
+
100
+ | Slash command | What it does |
101
+ |---------------|--------------|
102
+ | `/asc-weekly-review` | Calls `daily_briefing` then `list_reviews` (low-rating, last 7 days) for every app, clusters themes, returns a single digest with 3-bullet action list. |
103
+ | `/asc-rejection-audit` | Given an `app_id`, calls `release_preflight` + `metadata_diff` + `review_status`, reads the result against the top 2026 rejection drivers (guideline 2.3 metadata, 4.0 design, privacy-AI 5.1.2). Produces Blocking / Likely-flagged / Safe sections. |
104
+ | `/asc-release-go-no-go` | Given an `app_id`, combines preflight + review queue + metadata diff + top competitors in the same category. Returns a direct GO or NO-GO with three supporting reasons. |
105
+
106
+ These are MCP Prompts per the [spec](https://modelcontextprotocol.io/docs/concepts/prompts/). Zero other App Store Connect MCP ships with them.
107
+
108
+ ## Claude Skill (one-line install)
109
+
110
+ After installing the MCP, run:
111
+
112
+ ```bash
113
+ asc-mcp install-skill
114
+ ```
115
+
116
+ This copies a small `asc-review-triage` Skill to `~/.claude/skills/` so Claude automatically picks up review-related questions ("any bad reviews lately?", "what do my users say?", "ratings this week?") and calls the right ASC tools without you having to explain the workflow each time.
117
+
118
+ Works on macOS, Linux, and Windows. To remove: `asc-mcp uninstall-skill`.
119
+
80
120
  ## Real Output Examples
81
121
 
82
122
  **"Run a preflight check before I submit"**
@@ -141,13 +181,16 @@ Lead with the most impactful change. Keep under 4000 chars.
141
181
 
142
182
  | | Raw API wrappers (free) | This server |
143
183
  |---|---|---|
144
- | **Tool count** | 80-293 | 8 |
145
- | **Pre-submission audit** | No | Yes - catches rejections before you submit |
146
- | **Cross-app briefings** | No | Yes - one call, all apps |
147
- | **Git-aware release notes** | No | Yes - reads your project's commit history |
148
- | **Smart review summaries** | No | Yes - sentiment grouping, action items |
149
- | **Setup** | Build from source (Swift/macOS) | `npm install -g` (any OS) |
150
- | **Free tier** | Some | Yes - 3 tools, no account needed |
184
+ | **Tool count** | 80 to 293 | 13 opinionated tools |
185
+ | **MCP Prompts (slash commands)** | No | Yes, 3 pre-built workflows |
186
+ | **MCP Sampling (zero server-side LLM cost)** | No | Yes, review triage + response drafts |
187
+ | **Claude Skill bundled** | No | Yes, one-line install |
188
+ | **Pre-submission audit** | No | Yes, catches rejections before you submit |
189
+ | **Cross-app briefings** | No | Yes, one call, all apps |
190
+ | **Git-aware release notes** | No | Yes, reads your project's commit history |
191
+ | **Smart review summaries** | No | Yes, theme clustering, action items |
192
+ | **Setup** | Build from source (Swift or Node) | `npm install -g` (any OS) |
193
+ | **Free tier** | Some | Yes, 3 tools, no account needed |
151
194
 
152
195
  Raw wrappers give you endpoints. This gives you answers.
153
196
 
@@ -0,0 +1,39 @@
1
+ /**
2
+ * MCP Elicitation helper.
3
+ *
4
+ * Lets a tool ask the user structured questions mid-call via
5
+ * `server.elicitInput(...)`. The client renders a dialog with the schema.
6
+ *
7
+ * Capability detection: if the client does not advertise elicitation, we
8
+ * return `{ unsupported: true }` so the caller can fall back to a default.
9
+ */
10
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
11
+ export type ElicitationResult = {
12
+ ok: true;
13
+ values: Record<string, unknown>;
14
+ } | {
15
+ ok: false;
16
+ unsupported: true;
17
+ } | {
18
+ ok: false;
19
+ declined: true;
20
+ } | {
21
+ ok: false;
22
+ cancelled: true;
23
+ } | {
24
+ ok: false;
25
+ error: string;
26
+ };
27
+ export interface ElicitationSchema {
28
+ type: "object";
29
+ properties: Record<string, unknown>;
30
+ required?: string[];
31
+ }
32
+ export interface ElicitationRequest {
33
+ message: string;
34
+ schema: ElicitationSchema;
35
+ timeoutMs?: number;
36
+ }
37
+ export declare function clientSupportsElicitation(server: McpServer): boolean;
38
+ export declare function elicit(server: McpServer, req: ElicitationRequest): Promise<ElicitationResult>;
39
+ //# sourceMappingURL=elicitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elicitation.d.ts","sourceRoot":"","sources":["../src/elicitation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,IAAI,CAAA;CAAE,GAChC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,GAC7B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,IAAI,CAAA;CAAE,GAC9B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAOpE;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,kBAAkB,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA2B5B"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Elicitation helper.
4
+ *
5
+ * Lets a tool ask the user structured questions mid-call via
6
+ * `server.elicitInput(...)`. The client renders a dialog with the schema.
7
+ *
8
+ * Capability detection: if the client does not advertise elicitation, we
9
+ * return `{ unsupported: true }` so the caller can fall back to a default.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.clientSupportsElicitation = clientSupportsElicitation;
13
+ exports.elicit = elicit;
14
+ const DEFAULT_TIMEOUT_MS = 60_000;
15
+ function clientSupportsElicitation(server) {
16
+ try {
17
+ const caps = server.server.getClientCapabilities();
18
+ return Boolean(caps?.elicitation);
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ }
24
+ async function elicit(server, req) {
25
+ if (!clientSupportsElicitation(server)) {
26
+ return { ok: false, unsupported: true };
27
+ }
28
+ const timeoutMs = req.timeoutMs ?? DEFAULT_TIMEOUT_MS;
29
+ try {
30
+ const result = (await withTimeout(server.server.elicitInput({
31
+ mode: "form",
32
+ message: req.message,
33
+ requestedSchema: req.schema,
34
+ }), timeoutMs));
35
+ if (result.action === "decline")
36
+ return { ok: false, declined: true };
37
+ if (result.action === "cancel")
38
+ return { ok: false, cancelled: true };
39
+ if (result.action !== "accept") {
40
+ return { ok: false, error: `Unknown elicit action: ${result.action}` };
41
+ }
42
+ return { ok: true, values: result.content ?? {} };
43
+ }
44
+ catch (err) {
45
+ const msg = err instanceof Error ? err.message : String(err);
46
+ return { ok: false, error: msg };
47
+ }
48
+ }
49
+ function withTimeout(promise, ms) {
50
+ return new Promise((resolve, reject) => {
51
+ const timer = setTimeout(() => {
52
+ reject(new Error(`Elicitation timed out after ${ms}ms`));
53
+ }, ms);
54
+ promise.then((v) => {
55
+ clearTimeout(timer);
56
+ resolve(v);
57
+ }, (e) => {
58
+ clearTimeout(timer);
59
+ reject(e);
60
+ });
61
+ });
62
+ }
63
+ //# sourceMappingURL=elicitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elicitation.js","sourceRoot":"","sources":["../src/elicitation.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAyBH,8DAOC;AAED,wBA8BC;AAzCD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,SAAgB,yBAAyB,CAAC,MAAiB;IACzD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;QACnD,OAAO,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAAiB,EACjB,GAAuB;IAEvB,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;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5B,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,EAAE,IAAI,CAAC,CAAC,CAAC;QAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,OAAO,CAAC,IAAI,CACV,CAAC,CAAC,EAAE,EAAE;YACJ,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC;QACb,CAAC,EACD,CAAC,CAAC,EAAE,EAAE;YACJ,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,CAAC,CAAC,CAAC;QACZ,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
6
6
  const zod_1 = require("zod");
7
7
  const client_js_1 = require("./client.js");
8
8
  const license_js_1 = require("./license.js");
9
+ const prompts_js_1 = require("./prompts.js");
10
+ const skill_installer_js_1 = require("./skill-installer.js");
9
11
  const list_apps_js_1 = require("./tools/list-apps.js");
10
12
  const app_details_js_1 = require("./tools/app-details.js");
11
13
  const review_status_js_1 = require("./tools/review-status.js");
@@ -17,6 +19,9 @@ const release_notes_js_1 = require("./tools/release-notes.js");
17
19
  const keyword_insights_js_1 = require("./tools/keyword-insights.js");
18
20
  const competitor_snapshot_js_1 = require("./tools/competitor-snapshot.js");
19
21
  const metadata_diff_js_1 = require("./tools/metadata-diff.js");
22
+ const triage_reviews_js_1 = require("./tools/triage-reviews.js");
23
+ const draft_review_response_js_1 = require("./tools/draft-review-response.js");
24
+ const SERVER_VERSION = "1.3.0";
20
25
  function getConfig() {
21
26
  const keyId = process.env.ASC_KEY_ID;
22
27
  const issuerId = process.env.ASC_ISSUER_ID;
@@ -42,14 +47,20 @@ async function main() {
42
47
  const client = new client_js_1.ASCClient(config);
43
48
  const tier = await (0, license_js_1.validateLicense)(config.licenseKey);
44
49
  if (tier === "pro") {
45
- console.error("asc-mcp: Pro license active. All tools available.");
50
+ console.error(`asc-mcp ${SERVER_VERSION}: Pro license active. All tools available.`);
46
51
  }
47
52
  else {
48
- console.error("asc-mcp: Free tier (3 tools). Upgrade at https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu");
53
+ console.error(`asc-mcp ${SERVER_VERSION}: Free tier (3 tools). Upgrade at https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu`);
49
54
  }
50
55
  const server = new mcp_js_1.McpServer({
51
56
  name: "asc-mcp",
52
- version: "0.1.0",
57
+ version: SERVER_VERSION,
58
+ }, {
59
+ capabilities: {
60
+ tools: {},
61
+ prompts: {},
62
+ },
63
+ instructions: "App Store Connect MCP. Tools query the ASC API. Slash-command Prompts seed multi-tool workflows. triage_reviews and draft_review_response use MCP Sampling (your own client's model, zero extra cost). draft_review_response never auto-posts: it returns a draft only.",
53
64
  });
54
65
  // --- Free tools ---
55
66
  /** Wrap a tool handler so API errors return messages instead of crashing. */
@@ -101,8 +112,91 @@ async function main() {
101
112
  server.tool("metadata_diff", "Compare metadata between your live and pending app versions. Shows what changed in descriptions, keywords, and release notes across locales.", {
102
113
  app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
103
114
  }, safe((args) => (0, metadata_diff_js_1.metadataDiff)(client, args, tier)));
115
+ // --- Sampling-powered tools (Pro) ---
116
+ server.registerTool("triage_reviews", {
117
+ title: "Triage reviews into themes (Sampling)",
118
+ description: "Pull recent App Store reviews and use MCP Sampling to cluster them into 3 to 5 themes with counts, representative quotes, and action buckets (bug, missing_feature, pricing, ux, content). Sampling uses your own MCP client's model, so there is no extra cost from this server. Pro feature.",
119
+ inputSchema: {
120
+ app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
121
+ rating: zod_1.z.number().min(1).max(5).optional().describe("Filter by star rating (1 to 5). Omit for all."),
122
+ limit: zod_1.z.number().min(1).max(30).optional().describe("Max reviews (default 30, hard cap 30)"),
123
+ days: zod_1.z.number().min(1).max(90).optional().describe("Look-back window in days (default 30)"),
124
+ },
125
+ }, async (args) => {
126
+ try {
127
+ const result = await (0, triage_reviews_js_1.triageReviews)(server, client, args, tier);
128
+ return {
129
+ content: [{ type: "text", text: (0, triage_reviews_js_1.formatTriageForAgent)(result) }],
130
+ structuredContent: result,
131
+ };
132
+ }
133
+ catch (err) {
134
+ const msg = err instanceof Error ? err.message : String(err);
135
+ return { content: [{ type: "text", text: `Error: ${msg}` }] };
136
+ }
137
+ });
138
+ server.registerTool("draft_review_response", {
139
+ title: "Draft a public response to a review (Sampling + Elicitation)",
140
+ description: "Draft a public reply to a single App Store review via MCP Sampling, in the review's locale. Uses Elicitation (if your client supports it) to ask for tone. NEVER auto-posts. Always returns a draft that you must post via App Store Connect yourself. Pro feature.",
141
+ inputSchema: {
142
+ app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
143
+ review_id: zod_1.z.string().min(1).describe("Customer review ID (from list_reviews)"),
144
+ tone: zod_1.z.enum(["apologetic", "factual", "promotional", "curious"]).optional()
145
+ .describe("Tone; if omitted and the client supports Elicitation, the user will be asked interactively."),
146
+ include_support_link: zod_1.z.boolean().optional()
147
+ .describe("Mention that users can reach support (no phone/email, per Apple guideline 1.2)."),
148
+ context_note: zod_1.z.string().max(500).optional()
149
+ .describe("Optional context to weave in (e.g. 'fix ships in v2.5')."),
150
+ },
151
+ }, async (args) => {
152
+ try {
153
+ const result = await (0, draft_review_response_js_1.draftReviewResponse)(server, client, args, tier);
154
+ return {
155
+ content: [{ type: "text", text: (0, draft_review_response_js_1.formatDraftForAgent)(result) }],
156
+ structuredContent: result,
157
+ };
158
+ }
159
+ catch (err) {
160
+ const msg = err instanceof Error ? err.message : String(err);
161
+ return { content: [{ type: "text", text: `Error: ${msg}` }] };
162
+ }
163
+ });
164
+ // --- Prompts (slash commands in Claude Desktop / Code) ---
165
+ const prompts = (0, prompts_js_1.registerPrompts)(server);
166
+ console.error(`asc-mcp: ${prompts.length} prompt(s) registered: ${prompts.map((p) => "/" + p.name).join(", ")}`);
104
167
  const transport = new stdio_js_1.StdioServerTransport();
105
168
  await server.connect(transport);
169
+ // Sampling/Elicitation capability is only known after initialize; per-tool
170
+ // degradation handles the mismatch (see triage_reviews + draft_review_response).
171
+ }
172
+ function dispatchCli(argv) {
173
+ const cmd = argv[2];
174
+ if (!cmd)
175
+ return null;
176
+ if (cmd === "install-skill")
177
+ return (0, skill_installer_js_1.installSkill)();
178
+ if (cmd === "uninstall-skill")
179
+ return (0, skill_installer_js_1.uninstallSkill)();
180
+ if (cmd === "--version" || cmd === "-v" || cmd === "version") {
181
+ console.log(SERVER_VERSION);
182
+ return 0;
183
+ }
184
+ if (cmd === "--help" || cmd === "-h" || cmd === "help") {
185
+ console.log(`asc-mcp ${SERVER_VERSION}
186
+
187
+ Usage:
188
+ asc-mcp Run as an MCP server on stdio (for Claude Desktop/Code).
189
+ asc-mcp install-skill Install the asc-review-triage Claude Skill.
190
+ asc-mcp uninstall-skill Remove the asc-review-triage Claude Skill.
191
+ asc-mcp version Print version.
192
+ asc-mcp help This help.`);
193
+ return 0;
194
+ }
195
+ return null;
196
+ }
197
+ const cliResult = dispatchCli(process.argv);
198
+ if (cliResult !== null) {
199
+ process.exit(cliResult);
106
200
  }
107
201
  main().catch((err) => {
108
202
  console.error("Fatal error:", err);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,2CAAwC;AACxC,6CAA+C;AAG/C,uDAAgD;AAChD,2DAAoD;AACpD,+DAAwD;AACxD,6DAAsD;AACtD,6DAAsD;AACtD,uEAAgE;AAChE,iEAA0D;AAC1D,+DAAwD;AACxD,qEAA8D;AAC9D,2EAAoE;AACp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WAAW,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC5B,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,WAAW,cAAc;;;;;;;sCAOH,CAAC,CAAC;QACpC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;IACvB,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC1B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * MCP Prompts for @pofky/asc-mcp.
3
+ *
4
+ * Prompts appear as slash commands in Claude Desktop and Claude Code.
5
+ * Each prompt seeds the conversation with a message that coaches Claude
6
+ * on the exact ASC tool sequence to run. This is the "procedural
7
+ * knowledge" layer competing MCPs skip.
8
+ */
9
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
10
+ export interface PromptRegistration {
11
+ name: string;
12
+ title: string;
13
+ description: string;
14
+ }
15
+ export declare function registerPrompts(server: McpServer): PromptRegistration[];
16
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAOD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,EAAE,CA6HvE"}
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Prompts for @pofky/asc-mcp.
4
+ *
5
+ * Prompts appear as slash commands in Claude Desktop and Claude Code.
6
+ * Each prompt seeds the conversation with a message that coaches Claude
7
+ * on the exact ASC tool sequence to run. This is the "procedural
8
+ * knowledge" layer competing MCPs skip.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.registerPrompts = registerPrompts;
12
+ const zod_1 = require("zod");
13
+ const APP_ID_SCHEMA = zod_1.z
14
+ .string()
15
+ .regex(/^\d+$/, "App ID must be numeric. Use `list_apps` if you don't know it.")
16
+ .describe("App Store Connect app ID, numeric (use list_apps if unknown)");
17
+ function registerPrompts(server) {
18
+ const registered = [];
19
+ const weekly = server.registerPrompt("asc-weekly-review", {
20
+ title: "Weekly App Store review",
21
+ description: "One-click weekly summary across all your App Store Connect apps: version status, new low-rating reviews in the last 7 days, rejections, and action items. Calls daily_briefing then list_reviews (rating<=3) and synthesizes.",
22
+ }, () => ({
23
+ description: "Weekly review across all apps",
24
+ messages: [
25
+ {
26
+ role: "user",
27
+ content: {
28
+ type: "text",
29
+ text: [
30
+ "Give me a weekly App Store review across all my apps. Use the asc-mcp tools in this exact order and present a single concise summary at the end:",
31
+ "",
32
+ "1. Call `daily_briefing` with `days: 7` to get the situational overview (review status, rejections, action items).",
33
+ "2. Call `list_apps` to get the full list of app IDs if the briefing did not cover every app.",
34
+ "3. For each app that has `status: in_review` or that the briefing flagged, call `review_status` to confirm the current state.",
35
+ "4. For each app, call `list_reviews` with `rating: 3`, `sort: newest`, `limit: 20` to pull low-rating reviews from the last 7 days.",
36
+ "5. Cluster low-rating reviews by theme (bugs, pricing, missing feature, etc.). Keep to 3 to 5 clusters.",
37
+ "6. Produce a final digest with: apps in review, apps rejected, top 3 review themes with counts, and a 3-bullet action list for the coming week.",
38
+ "",
39
+ "Do not invent numbers. If a tool fails, say so and continue with the rest.",
40
+ ].join("\n"),
41
+ },
42
+ },
43
+ ],
44
+ }));
45
+ registered.push({
46
+ name: "asc-weekly-review",
47
+ title: weekly.title ?? "",
48
+ description: weekly.description ?? "",
49
+ });
50
+ const audit = server.registerPrompt("asc-rejection-audit", {
51
+ title: "Pre-submission rejection audit",
52
+ description: "Catch likely rejection causes before you submit. Runs release_preflight, then metadata_diff, then review_status, and reads results against the top 2026 rejection drivers (guideline 2.3 metadata, 4.0 design, privacy-AI 5.1.2).",
53
+ argsSchema: { app_id: APP_ID_SCHEMA },
54
+ }, ({ app_id }) => ({
55
+ description: `Rejection audit for app ${app_id}`,
56
+ messages: [
57
+ {
58
+ role: "user",
59
+ content: {
60
+ type: "text",
61
+ text: [
62
+ `Run a pre-submission rejection audit for App Store Connect app ${app_id}. Use the asc-mcp tools in this order:`,
63
+ "",
64
+ `1. Call \`release_preflight\` with \`app_id: "${app_id}"\` to audit metadata, character limits, screenshots, and build status.`,
65
+ `2. Call \`metadata_diff\` with \`app_id: "${app_id}"\` to see exactly what is changing between the live and pending version across all locales.`,
66
+ `3. Call \`review_status\` with \`app_id: "${app_id}"\` to confirm the current submission state.`,
67
+ "",
68
+ "Read the combined output against the top 2026 rejection drivers:",
69
+ "- Guideline 2.3 (inaccurate metadata: broken links, stale screenshots, placeholder text)",
70
+ "- Guideline 4.0 (design: minimum content, broken flows, missing signup)",
71
+ "- Guideline 5.1.2 (data use, privacy-AI: missing SDK disclosures, tracking permissions)",
72
+ "",
73
+ "Produce a report with three sections: (a) Blocking issues (fix before submit), (b) Likely-flagged items (judgment call), (c) Safe. Quote exact metadata lines that trigger each concern.",
74
+ "",
75
+ "Do not invent rejection reasons. If preflight finds zero issues and metadata_diff is clean, say 'no blocking issues found'.",
76
+ ].join("\n"),
77
+ },
78
+ },
79
+ ],
80
+ }));
81
+ registered.push({
82
+ name: "asc-rejection-audit",
83
+ title: audit.title ?? "",
84
+ description: audit.description ?? "",
85
+ });
86
+ const goNoGo = server.registerPrompt("asc-release-go-no-go", {
87
+ title: "Release go/no-go",
88
+ description: "Decide whether to ship a release today. Combines release_preflight, review_status, metadata_diff, and competitor_snapshot to produce a single GO or NO-GO recommendation with reasoning.",
89
+ argsSchema: { app_id: APP_ID_SCHEMA },
90
+ }, ({ app_id }) => ({
91
+ description: `Go/no-go decision for app ${app_id}`,
92
+ messages: [
93
+ {
94
+ role: "user",
95
+ content: {
96
+ type: "text",
97
+ text: [
98
+ `Decide whether to ship a release today for App Store Connect app ${app_id}. Use the asc-mcp tools in this order:`,
99
+ "",
100
+ `1. Call \`release_preflight\` with \`app_id: "${app_id}"\`.`,
101
+ `2. Call \`review_status\` with \`app_id: "${app_id}"\`.`,
102
+ `3. Call \`metadata_diff\` with \`app_id: "${app_id}"\`.`,
103
+ `4. Call \`app_details\` with \`app_id: "${app_id}"\` to read category and name.`,
104
+ "5. Call `competitor_snapshot` with the same category's top two competitors (use what you know) to see if anyone else just shipped a bigger release today.",
105
+ "",
106
+ "Produce a single GO or NO-GO with three supporting bullets:",
107
+ "- Preflight verdict (blocking issues y/n)",
108
+ "- Queue verdict (is the existing version still in review? if yes, hold)",
109
+ "- Market window (did a big competitor ship today? if yes, consider holding one day)",
110
+ "",
111
+ "Be direct. If unsure, say NO-GO and explain why. Do not hedge.",
112
+ ].join("\n"),
113
+ },
114
+ },
115
+ ],
116
+ }));
117
+ registered.push({
118
+ name: "asc-release-go-no-go",
119
+ title: goNoGo.title ?? "",
120
+ description: goNoGo.description ?? "",
121
+ });
122
+ return registered;
123
+ }
124
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot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BACzE,qFAAqF;wBACrF,EAAE;wBACF,gEAAgE;qBACjE,CAAC,IAAI,CAAC,IAAI,CAAC;iBACb;aACF;SACF;KACF,CAAC,CACH,CAAC;IACF,UAAU,CAAC,IAAI,CAAC;QACd,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE;KACtC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * MCP Sampling helper.
3
+ *
4
+ * Calls `server.createMessage(...)` on the underlying MCP Server so the
5
+ * user's own client runs the LLM request. Zero cost to us (we do not pay
6
+ * for the user's Anthropic tokens).
7
+ *
8
+ * Capability detection: we check the client's declared capabilities at
9
+ * initialize time. If sampling is not advertised, the caller gets a
10
+ * structured `{ unsupported: true }` response and must degrade gracefully.
11
+ */
12
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
13
+ import type { ModelPreferences } from "@modelcontextprotocol/sdk/types.js";
14
+ export type SamplingResult = {
15
+ ok: true;
16
+ text: string;
17
+ model: string;
18
+ stopReason: string | undefined;
19
+ } | {
20
+ ok: false;
21
+ unsupported: true;
22
+ } | {
23
+ ok: false;
24
+ error: string;
25
+ };
26
+ export interface SamplingRequest {
27
+ system?: string;
28
+ user: string;
29
+ maxTokens: number;
30
+ temperature?: number;
31
+ modelPreferences?: ModelPreferences;
32
+ timeoutMs?: number;
33
+ }
34
+ export declare function clientSupportsSampling(server: McpServer): boolean;
35
+ export declare function sample(server: McpServer, req: SamplingRequest): Promise<SamplingResult>;
36
+ export declare const MODEL_HINTS: {
37
+ fast: {
38
+ speedPriority: number;
39
+ costPriority: number;
40
+ intelligencePriority: number;
41
+ };
42
+ balanced: {
43
+ speedPriority: number;
44
+ costPriority: number;
45
+ intelligencePriority: number;
46
+ };
47
+ smart: {
48
+ speedPriority: number;
49
+ costPriority: number;
50
+ intelligencePriority: number;
51
+ };
52
+ };
53
+ //# sourceMappingURL=sampling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampling.d.ts","sourceRoot":"","sources":["../src/sampling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACzE;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,IAAI,CAAA;CAAE,GAChC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAOjE;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,CAuCzB;AAuCD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;CAgBvB,CAAC"}