@pofky/asc-mcp 1.3.0 → 1.8.1
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/LIMITATIONS.md +41 -0
- package/README.md +82 -10
- package/USER_GUIDE.md +185 -0
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +58 -1
- package/dist/client.js.map +1 -1
- package/dist/doctor.d.ts +28 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +178 -0
- package/dist/doctor.js.map +1 -0
- package/dist/editable.d.ts +9 -0
- package/dist/editable.d.ts.map +1 -0
- package/dist/editable.js +20 -0
- package/dist/editable.js.map +1 -0
- package/dist/gate.d.ts +8 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +17 -0
- package/dist/gate.js.map +1 -0
- package/dist/index.js +276 -21
- package/dist/index.js.map +1 -1
- package/dist/license.js +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +101 -0
- package/dist/prompts.js.map +1 -1
- package/dist/setup.d.ts +19 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +153 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/age-rating.d.ts +14 -0
- package/dist/tools/age-rating.d.ts.map +1 -0
- package/dist/tools/age-rating.js +125 -0
- package/dist/tools/age-rating.js.map +1 -0
- package/dist/tools/app-details.js +2 -2
- package/dist/tools/availability.d.ts +20 -0
- package/dist/tools/availability.d.ts.map +1 -0
- package/dist/tools/availability.js +96 -0
- package/dist/tools/availability.js.map +1 -0
- package/dist/tools/builds.d.ts +26 -0
- package/dist/tools/builds.d.ts.map +1 -0
- package/dist/tools/builds.js +108 -0
- package/dist/tools/builds.js.map +1 -0
- package/dist/tools/eu-trader.d.ts +12 -0
- package/dist/tools/eu-trader.d.ts.map +1 -0
- package/dist/tools/eu-trader.js +25 -0
- package/dist/tools/eu-trader.js.map +1 -0
- package/dist/tools/guide.d.ts +38 -0
- package/dist/tools/guide.d.ts.map +1 -0
- package/dist/tools/guide.js +273 -0
- package/dist/tools/guide.js.map +1 -0
- package/dist/tools/iap.d.ts +43 -0
- package/dist/tools/iap.d.ts.map +1 -0
- package/dist/tools/iap.js +360 -0
- package/dist/tools/iap.js.map +1 -0
- package/dist/tools/list-apps.js +1 -1
- package/dist/tools/list-reviews.js +2 -2
- package/dist/tools/local-build.d.ts +26 -0
- package/dist/tools/local-build.d.ts.map +1 -0
- package/dist/tools/local-build.js +100 -0
- package/dist/tools/local-build.js.map +1 -0
- package/dist/tools/privacy.d.ts +15 -0
- package/dist/tools/privacy.d.ts.map +1 -0
- package/dist/tools/privacy.js +32 -0
- package/dist/tools/privacy.js.map +1 -0
- package/dist/tools/release-control.d.ts +22 -0
- package/dist/tools/release-control.d.ts.map +1 -0
- package/dist/tools/release-control.js +85 -0
- package/dist/tools/release-control.js.map +1 -0
- package/dist/tools/release-preflight.d.ts.map +1 -1
- package/dist/tools/release-preflight.js +139 -0
- package/dist/tools/release-preflight.js.map +1 -1
- package/dist/tools/review-screenshot.d.ts +14 -0
- package/dist/tools/review-screenshot.d.ts.map +1 -0
- package/dist/tools/review-screenshot.js +72 -0
- package/dist/tools/review-screenshot.js.map +1 -0
- package/dist/tools/review-status.js +2 -2
- package/dist/tools/sales-report.js +3 -3
- package/dist/tools/sales-report.js.map +1 -1
- package/dist/tools/screenshots.d.ts +15 -0
- package/dist/tools/screenshots.d.ts.map +1 -0
- package/dist/tools/screenshots.js +106 -0
- package/dist/tools/screenshots.js.map +1 -0
- package/dist/tools/signing.d.ts +21 -0
- package/dist/tools/signing.d.ts.map +1 -0
- package/dist/tools/signing.js +101 -0
- package/dist/tools/signing.js.map +1 -0
- package/dist/tools/submission.d.ts +47 -0
- package/dist/tools/submission.d.ts.map +1 -0
- package/dist/tools/submission.js +199 -0
- package/dist/tools/submission.js.map +1 -0
- package/dist/tools/testflight.d.ts +20 -0
- package/dist/tools/testflight.d.ts.map +1 -0
- package/dist/tools/testflight.js +75 -0
- package/dist/tools/testflight.js.map +1 -0
- package/dist/tools/update-version-metadata.d.ts +17 -0
- package/dist/tools/update-version-metadata.d.ts.map +1 -0
- package/dist/tools/update-version-metadata.js +148 -0
- package/dist/tools/update-version-metadata.js.map +1 -0
- package/dist/tools/version-control.d.ts +21 -0
- package/dist/tools/version-control.d.ts.map +1 -0
- package/dist/tools/version-control.js +144 -0
- package/dist/tools/version-control.js.map +1 -0
- package/package.json +13 -2
package/dist/doctor.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Self-diagnosis for setup. The #1 newbie failure mode is "it doesn't work" with
|
|
4
|
+
* no idea why: missing .p8, wrong Issuer ID, a key without the right role, or an
|
|
5
|
+
* unset license. `runDoctor` checks each link in the chain and, for every
|
|
6
|
+
* failure, prints the exact next step. Powers both `asc-mcp doctor` (CLI, runs
|
|
7
|
+
* before the server is even configured) and the free `asc_setup_check` MCP tool.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.runDoctor = runDoctor;
|
|
11
|
+
exports.formatDoctor = formatDoctor;
|
|
12
|
+
const node_fs_1 = require("node:fs");
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
|
+
const node_os_1 = require("node:os");
|
|
15
|
+
const auth_js_1 = require("./auth.js");
|
|
16
|
+
const license_js_1 = require("./license.js");
|
|
17
|
+
const setup_js_1 = require("./setup.js");
|
|
18
|
+
const INTEGRATIONS_URL = "https://appstoreconnect.apple.com/access/integrations/api";
|
|
19
|
+
function resolvePath(p) {
|
|
20
|
+
return p.startsWith("~") ? (0, node_path_1.resolve)((0, node_os_1.homedir)(), p.slice(2)) : (0, node_path_1.resolve)(p);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Run the full setup diagnosis. Reads env + the standard .p8 path, then attempts
|
|
24
|
+
* a real authenticated API call so "looks configured" and "actually works" are
|
|
25
|
+
* never confused.
|
|
26
|
+
*/
|
|
27
|
+
async function runDoctor() {
|
|
28
|
+
const checks = [];
|
|
29
|
+
// 1. Private key (.p8) discovery / path.
|
|
30
|
+
const discovered = (0, setup_js_1.discoverPrivateKey)();
|
|
31
|
+
const keyPath = process.env.ASC_PRIVATE_KEY_PATH || discovered?.path;
|
|
32
|
+
if (!keyPath) {
|
|
33
|
+
checks.push({
|
|
34
|
+
name: "API key file (.p8)",
|
|
35
|
+
status: "fail",
|
|
36
|
+
detail: "No .p8 found in ~/.appstoreconnect/private_keys/ and ASC_PRIVATE_KEY_PATH is unset.",
|
|
37
|
+
fix: `Create a key at ${INTEGRATIONS_URL} (role: App Manager), download the .p8 once, and drop it into ~/.appstoreconnect/private_keys/.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else if (!(0, node_fs_1.existsSync)(resolvePath(keyPath))) {
|
|
41
|
+
checks.push({
|
|
42
|
+
name: "API key file (.p8)",
|
|
43
|
+
status: "fail",
|
|
44
|
+
detail: `Path is set but the file does not exist: ${keyPath}`,
|
|
45
|
+
fix: "Check the path, or move the .p8 to ~/.appstoreconnect/private_keys/ and unset ASC_PRIVATE_KEY_PATH to auto-detect it.",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
checks.push({
|
|
50
|
+
name: "API key file (.p8)",
|
|
51
|
+
status: "ok",
|
|
52
|
+
detail: `Found ${keyPath}`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// 2. Key ID.
|
|
56
|
+
const keyId = process.env.ASC_KEY_ID || discovered?.keyId;
|
|
57
|
+
if (!keyId) {
|
|
58
|
+
checks.push({
|
|
59
|
+
name: "Key ID",
|
|
60
|
+
status: "fail",
|
|
61
|
+
detail: "No Key ID. It is normally read from the .p8 filename (AuthKey_XXXXXXXXXX.p8).",
|
|
62
|
+
fix: "Either name the file AuthKey_<KeyID>.p8 in the standard folder, or set ASC_KEY_ID.",
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
checks.push({ name: "Key ID", status: "ok", detail: keyId });
|
|
67
|
+
}
|
|
68
|
+
// 3. Issuer ID.
|
|
69
|
+
const issuerId = process.env.ASC_ISSUER_ID;
|
|
70
|
+
if (!issuerId) {
|
|
71
|
+
checks.push({
|
|
72
|
+
name: "Issuer ID",
|
|
73
|
+
status: "fail",
|
|
74
|
+
detail: "ASC_ISSUER_ID is unset.",
|
|
75
|
+
fix: `Copy the Issuer ID (a UUID at the top of ${INTEGRATIONS_URL}) and set ASC_ISSUER_ID. Run \`asc-mcp init\` to generate the config.`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
checks.push({ name: "Issuer ID", status: "ok", detail: issuerId });
|
|
80
|
+
}
|
|
81
|
+
// 4. Live authentication: only attempt if the three inputs are present.
|
|
82
|
+
if (keyId && issuerId && keyPath && (0, node_fs_1.existsSync)(resolvePath(keyPath))) {
|
|
83
|
+
try {
|
|
84
|
+
(0, auth_js_1.clearTokenCache)();
|
|
85
|
+
const token = await (0, auth_js_1.getToken)(keyId, issuerId, keyPath);
|
|
86
|
+
const res = await fetch("https://api.appstoreconnect.apple.com/v1/apps?limit=1", { headers: { Authorization: `Bearer ${token}` } });
|
|
87
|
+
if (res.ok) {
|
|
88
|
+
checks.push({
|
|
89
|
+
name: "Live connection",
|
|
90
|
+
status: "ok",
|
|
91
|
+
detail: "Authenticated against App Store Connect and listed apps.",
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
else if (res.status === 401) {
|
|
95
|
+
checks.push({
|
|
96
|
+
name: "Live connection",
|
|
97
|
+
status: "fail",
|
|
98
|
+
detail: "Apple rejected the credentials (401).",
|
|
99
|
+
fix: "Issuer ID, Key ID, or .p8 mismatch. Recheck the Issuer ID UUID and confirm the .p8 matches the Key ID. Regenerate the key if unsure.",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else if (res.status === 403) {
|
|
103
|
+
checks.push({
|
|
104
|
+
name: "Live connection",
|
|
105
|
+
status: "fail",
|
|
106
|
+
detail: "Authenticated but not authorized (403).",
|
|
107
|
+
fix: "The key's role is too low. Give it App Manager (or higher) at the Integrations page, or generate a new key with that role.",
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
checks.push({
|
|
112
|
+
name: "Live connection",
|
|
113
|
+
status: "fail",
|
|
114
|
+
detail: `App Store Connect returned ${res.status}.`,
|
|
115
|
+
fix: "Transient Apple error or network issue. Retry; if it persists, regenerate the key.",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
121
|
+
checks.push({
|
|
122
|
+
name: "Live connection",
|
|
123
|
+
status: "fail",
|
|
124
|
+
detail: `Could not sign or send the request: ${msg}`,
|
|
125
|
+
fix: "Usually a malformed .p8 (must be the downloaded PKCS#8 file, unchanged) or no network. Re-download the key if needed.",
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
checks.push({
|
|
131
|
+
name: "Live connection",
|
|
132
|
+
status: "warn",
|
|
133
|
+
detail: "Skipped: fix the credential checks above first.",
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// 5. License tier.
|
|
137
|
+
const licenseKey = process.env.ASC_LICENSE_KEY;
|
|
138
|
+
if (!licenseKey) {
|
|
139
|
+
checks.push({
|
|
140
|
+
name: "License",
|
|
141
|
+
status: "warn",
|
|
142
|
+
detail: "Free tier: read + intelligence tools only.",
|
|
143
|
+
fix: "To unlock write/control tools (edit metadata, screenshots, builds, submit, IAP/subs), set ASC_LICENSE_KEY. Get one at https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu",
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const tier = await (0, license_js_1.validateLicense)(licenseKey);
|
|
148
|
+
if (tier === "pro") {
|
|
149
|
+
checks.push({ name: "License", status: "ok", detail: "Pro: all tools unlocked." });
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
checks.push({
|
|
153
|
+
name: "License",
|
|
154
|
+
status: "fail",
|
|
155
|
+
detail: "A license key is set but did not validate as Pro.",
|
|
156
|
+
fix: "Check the key (retrieve it at https://asc-mcp-license.remewdy.workers.dev/key). Network issues fall back to free; retry if you are online.",
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const healthy = !checks.some((c) => c.status === "fail");
|
|
161
|
+
return { checks, healthy };
|
|
162
|
+
}
|
|
163
|
+
const ICON = { ok: "[OK] ", warn: "[WARN]", fail: "[FAIL]" };
|
|
164
|
+
/** Human-readable report for the CLI and the MCP tool. */
|
|
165
|
+
function formatDoctor(report) {
|
|
166
|
+
const lines = ["App Store Connect MCP, setup check", "=".repeat(40), ""];
|
|
167
|
+
for (const c of report.checks) {
|
|
168
|
+
lines.push(`${ICON[c.status]} ${c.name}: ${c.detail}`);
|
|
169
|
+
if (c.fix && c.status !== "ok")
|
|
170
|
+
lines.push(` Fix: ${c.fix}`);
|
|
171
|
+
}
|
|
172
|
+
lines.push("");
|
|
173
|
+
lines.push(report.healthy
|
|
174
|
+
? "Ready. Try `list_apps`, then `asc_guide` (topic:overview) to see every flow."
|
|
175
|
+
: "Not ready yet. Fix the [FAIL] lines above, then run this again.");
|
|
176
|
+
return lines.join("\n");
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAoCH,8BAqIC;AAKD,oCAaC;AAzLD,qCAAmD;AACnD,yCAAoC;AACpC,qCAAkC;AAClC,uCAAsD;AACtD,6CAA+C;AAC/C,yCAAgD;A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,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,MAAM,CAAC,OAAO;QACZ,CAAC,CAAC,8EAA8E;QAChF,CAAC,CAAC,iEAAiE,CACtE,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single definition of which App Store version states are still editable
|
|
3
|
+
* (metadata writable, build attachable, submittable). Previously each tool kept
|
|
4
|
+
* its own copy and they drifted (INVALID_BINARY was in one but not the others),
|
|
5
|
+
* so a rejected-binary version could be edited but not re-attached/submitted.
|
|
6
|
+
* Import this everywhere instead of redefining.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EDITABLE_VERSION_STATES: Set<string>;
|
|
9
|
+
//# sourceMappingURL=editable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,aAQlC,CAAC"}
|
package/dist/editable.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EDITABLE_VERSION_STATES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The single definition of which App Store version states are still editable
|
|
6
|
+
* (metadata writable, build attachable, submittable). Previously each tool kept
|
|
7
|
+
* its own copy and they drifted (INVALID_BINARY was in one but not the others),
|
|
8
|
+
* so a rejected-binary version could be edited but not re-attached/submitted.
|
|
9
|
+
* Import this everywhere instead of redefining.
|
|
10
|
+
*/
|
|
11
|
+
exports.EDITABLE_VERSION_STATES = new Set([
|
|
12
|
+
"PREPARE_FOR_SUBMISSION",
|
|
13
|
+
"DEVELOPER_REJECTED",
|
|
14
|
+
"REJECTED",
|
|
15
|
+
"METADATA_REJECTED",
|
|
16
|
+
// Binary was rejected; the version is still editable so a new build can be
|
|
17
|
+
// attached and the version resubmitted.
|
|
18
|
+
"INVALID_BINARY",
|
|
19
|
+
]);
|
|
20
|
+
//# sourceMappingURL=editable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable.js","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,wBAAwB;IACxB,oBAAoB;IACpB,UAAU;IACV,mBAAmB;IACnB,2EAA2E;IAC3E,wCAAwC;IACxC,gBAAgB;CACjB,CAAC,CAAC"}
|
package/dist/gate.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Tier } from "./types.js";
|
|
2
|
+
export declare const UPGRADE_URL = "https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu";
|
|
3
|
+
/**
|
|
4
|
+
* Returns an upgrade message string when the tier is not Pro, otherwise null.
|
|
5
|
+
* Write/control tools call this first and early-return the message.
|
|
6
|
+
*/
|
|
7
|
+
export declare function requirePro(tier: Tier, capability: string): string | null;
|
|
8
|
+
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,eAAO,MAAM,WAAW,8EACqD,CAAC;AAE9E;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOxE"}
|
package/dist/gate.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UPGRADE_URL = void 0;
|
|
4
|
+
exports.requirePro = requirePro;
|
|
5
|
+
exports.UPGRADE_URL = "https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu";
|
|
6
|
+
/**
|
|
7
|
+
* Returns an upgrade message string when the tier is not Pro, otherwise null.
|
|
8
|
+
* Write/control tools call this first and early-return the message.
|
|
9
|
+
*/
|
|
10
|
+
function requirePro(tier, capability) {
|
|
11
|
+
if (tier === "pro")
|
|
12
|
+
return null;
|
|
13
|
+
return (`${capability} requires a Pro license ($9/mo).\n` +
|
|
14
|
+
`Get your license at: ${exports.UPGRADE_URL}\n\n` +
|
|
15
|
+
"Set ASC_LICENSE_KEY in your MCP server config to unlock.");
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=gate.js.map
|
package/dist/gate.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":";;;AASA,gCAOC;AAdY,QAAA,WAAW,GACtB,2EAA2E,CAAC;AAE9E;;;GAGG;AACH,SAAgB,UAAU,CAAC,IAAU,EAAE,UAAkB;IACvD,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,CACL,GAAG,UAAU,oCAAoC;QACjD,wBAAwB,mBAAW,MAAM;QACzC,0DAA0D,CAC3D,CAAC;AACJ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,20 +21,42 @@ const competitor_snapshot_js_1 = require("./tools/competitor-snapshot.js");
|
|
|
21
21
|
const metadata_diff_js_1 = require("./tools/metadata-diff.js");
|
|
22
22
|
const triage_reviews_js_1 = require("./tools/triage-reviews.js");
|
|
23
23
|
const draft_review_response_js_1 = require("./tools/draft-review-response.js");
|
|
24
|
-
const
|
|
24
|
+
const update_version_metadata_js_1 = require("./tools/update-version-metadata.js");
|
|
25
|
+
const version_control_js_1 = require("./tools/version-control.js");
|
|
26
|
+
const builds_js_1 = require("./tools/builds.js");
|
|
27
|
+
const screenshots_js_1 = require("./tools/screenshots.js");
|
|
28
|
+
const release_control_js_1 = require("./tools/release-control.js");
|
|
29
|
+
const testflight_js_1 = require("./tools/testflight.js");
|
|
30
|
+
const local_build_js_1 = require("./tools/local-build.js");
|
|
31
|
+
const age_rating_js_1 = require("./tools/age-rating.js");
|
|
32
|
+
const privacy_js_1 = require("./tools/privacy.js");
|
|
33
|
+
const eu_trader_js_1 = require("./tools/eu-trader.js");
|
|
34
|
+
const iap_js_1 = require("./tools/iap.js");
|
|
35
|
+
const review_screenshot_js_1 = require("./tools/review-screenshot.js");
|
|
36
|
+
const submission_js_1 = require("./tools/submission.js");
|
|
37
|
+
const availability_js_1 = require("./tools/availability.js");
|
|
38
|
+
const signing_js_1 = require("./tools/signing.js");
|
|
39
|
+
const guide_js_1 = require("./tools/guide.js");
|
|
40
|
+
const doctor_js_1 = require("./doctor.js");
|
|
41
|
+
const setup_js_1 = require("./setup.js");
|
|
42
|
+
const SERVER_VERSION = "1.8.1";
|
|
43
|
+
const MISSING_CREDS_MESSAGE = "Missing App Store Connect credentials.\n\n" +
|
|
44
|
+
"Fastest path: run `asc-mcp init` (auto-detects your .p8, prints a paste-ready config).\n\n" +
|
|
45
|
+
"Or set manually:\n" +
|
|
46
|
+
" ASC_KEY_ID - Your API key ID (auto-detected from a .p8 in ~/.appstoreconnect/private_keys)\n" +
|
|
47
|
+
" ASC_ISSUER_ID - Your team's issuer ID\n" +
|
|
48
|
+
" ASC_PRIVATE_KEY_PATH - Path to your .p8 (auto-detected from the standard path)\n\n" +
|
|
49
|
+
"Create an API key at:\n" +
|
|
50
|
+
" https://appstoreconnect.apple.com/access/integrations/api";
|
|
25
51
|
function getConfig() {
|
|
26
|
-
|
|
52
|
+
// Auto-discover the .p8 in Apple's standard path so a dropped key + Issuer ID
|
|
53
|
+
// is enough - no need to hand-set ASC_KEY_ID / ASC_PRIVATE_KEY_PATH.
|
|
54
|
+
const discovered = (0, setup_js_1.discoverPrivateKey)();
|
|
55
|
+
const keyId = process.env.ASC_KEY_ID || discovered?.keyId;
|
|
27
56
|
const issuerId = process.env.ASC_ISSUER_ID;
|
|
28
|
-
const privateKeyPath = process.env.ASC_PRIVATE_KEY_PATH;
|
|
29
|
-
if (!keyId || !issuerId || !privateKeyPath)
|
|
30
|
-
|
|
31
|
-
" ASC_KEY_ID — Your API key ID from App Store Connect\n" +
|
|
32
|
-
" ASC_ISSUER_ID — Your team's issuer ID\n" +
|
|
33
|
-
" ASC_PRIVATE_KEY_PATH — Path to your .p8 private key file\n\n" +
|
|
34
|
-
"Create an API key at:\n" +
|
|
35
|
-
" https://appstoreconnect.apple.com/access/integrations/api");
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
57
|
+
const privateKeyPath = process.env.ASC_PRIVATE_KEY_PATH || discovered?.path;
|
|
58
|
+
if (!keyId || !issuerId || !privateKeyPath)
|
|
59
|
+
return null;
|
|
38
60
|
return {
|
|
39
61
|
keyId,
|
|
40
62
|
issuerId,
|
|
@@ -42,15 +64,33 @@ function getConfig() {
|
|
|
42
64
|
licenseKey: process.env.ASC_LICENSE_KEY,
|
|
43
65
|
};
|
|
44
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Credential-less start: connect anyway with the two free orientation tools so
|
|
69
|
+
* the client shows a working server that can explain the fix, instead of a
|
|
70
|
+
* "server disconnected" with the reason buried in a log file.
|
|
71
|
+
*/
|
|
72
|
+
async function runSetupMode() {
|
|
73
|
+
console.error(`asc-mcp ${SERVER_VERSION}: setup mode. ${MISSING_CREDS_MESSAGE}`);
|
|
74
|
+
const server = new mcp_js_1.McpServer({ name: "asc-mcp", version: SERVER_VERSION }, {
|
|
75
|
+
capabilities: { tools: {}, prompts: {} },
|
|
76
|
+
instructions: "App Store Connect MCP, running in SETUP MODE: no credentials found, so only asc_setup_check and asc_guide are available. Call asc_setup_check first and relay the fix it prints, then the user restarts this server to get all 40 tools.",
|
|
77
|
+
});
|
|
78
|
+
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
79
|
+
server.tool("asc_setup_check", "Diagnose your setup: checks the .p8 key, Key ID, Issuer ID, a LIVE authenticated connection to App Store Connect, and your license tier. For anything wrong, returns the exact fix. Run this first if something isn't working. Free.", {}, async () => text((0, doctor_js_1.formatDoctor)(await (0, doctor_js_1.runDoctor)())));
|
|
80
|
+
server.tool("asc_guide", "START HERE. Returns the exact end-to-end playbook for an App Store task, with every manual ASC-website/Xcode step that no API can do flagged inline. Free.", { topic: zod_1.z.string().optional().describe("Which playbook. Omit for the overview + topic list.") }, async (args) => text(await (0, guide_js_1.ascGuide)(args)));
|
|
81
|
+
await server.connect(new stdio_js_1.StdioServerTransport());
|
|
82
|
+
}
|
|
45
83
|
async function main() {
|
|
46
84
|
const config = getConfig();
|
|
85
|
+
if (!config)
|
|
86
|
+
return runSetupMode();
|
|
47
87
|
const client = new client_js_1.ASCClient(config);
|
|
48
88
|
const tier = await (0, license_js_1.validateLicense)(config.licenseKey);
|
|
49
89
|
if (tier === "pro") {
|
|
50
90
|
console.error(`asc-mcp ${SERVER_VERSION}: Pro license active. All tools available.`);
|
|
51
91
|
}
|
|
52
92
|
else {
|
|
53
|
-
console.error(`asc-mcp ${SERVER_VERSION}: Free tier
|
|
93
|
+
console.error(`asc-mcp ${SERVER_VERSION}: Free tier. Read/intelligence tools active; write/control tools require Pro. Upgrade at https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu`);
|
|
54
94
|
}
|
|
55
95
|
const server = new mcp_js_1.McpServer({
|
|
56
96
|
name: "asc-mcp",
|
|
@@ -75,9 +115,28 @@ async function main() {
|
|
|
75
115
|
}
|
|
76
116
|
};
|
|
77
117
|
}
|
|
118
|
+
server.tool("asc_guide", "START HERE. Returns the exact end-to-end playbook for an App Store task, with every manual ASC-website/Xcode step that no API can do flagged inline. Call with topic to orient before any multi-step flow. Free.", {
|
|
119
|
+
topic: zod_1.z
|
|
120
|
+
.enum([
|
|
121
|
+
"overview",
|
|
122
|
+
"setup",
|
|
123
|
+
"first-app",
|
|
124
|
+
"update",
|
|
125
|
+
"screenshots",
|
|
126
|
+
"iap",
|
|
127
|
+
"subscriptions",
|
|
128
|
+
"reviews",
|
|
129
|
+
"testflight",
|
|
130
|
+
"binary",
|
|
131
|
+
"limitations",
|
|
132
|
+
])
|
|
133
|
+
.optional()
|
|
134
|
+
.describe("Which playbook. Omit for the overview + topic list."),
|
|
135
|
+
}, safe((args) => (0, guide_js_1.ascGuide)(args)));
|
|
136
|
+
server.tool("asc_setup_check", "Diagnose your setup: checks the .p8 key, Key ID, Issuer ID, a LIVE authenticated connection to App Store Connect, and your license tier. For anything wrong, returns the exact fix. Run this first if something isn't working. Free.", {}, safe(async () => (0, doctor_js_1.formatDoctor)(await (0, doctor_js_1.runDoctor)())));
|
|
78
137
|
server.tool("list_apps", "List all apps in your App Store Connect account with name, bundle ID, and platform.", { limit: zod_1.z.number().optional().describe("Max apps to return (default 50, max 200)") }, safe((args) => (0, list_apps_js_1.listApps)(client, args)));
|
|
79
138
|
server.tool("app_details", "Get detailed info about an app including versions, build status, and release state.", { app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID (use list_apps to find it)") }, safe((args) => (0, app_details_js_1.appDetails)(client, args)));
|
|
80
|
-
server.tool("review_status", "Check the current App Store review status
|
|
139
|
+
server.tool("review_status", "Check the current App Store review status - in review, waiting, approved, or rejected.", { app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID") }, safe((args) => (0, review_status_js_1.reviewStatus)(client, args)));
|
|
81
140
|
// --- Pro tools (gated) ---
|
|
82
141
|
server.tool("list_reviews", "List customer reviews for an app. Filter by rating. Pro feature.", {
|
|
83
142
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
@@ -161,6 +220,175 @@ async function main() {
|
|
|
161
220
|
return { content: [{ type: "text", text: `Error: ${msg}` }] };
|
|
162
221
|
}
|
|
163
222
|
});
|
|
223
|
+
// --- Control / write tools (Pro, gated) ---
|
|
224
|
+
server.tool("update_version_metadata", "Edit App Store metadata on the editable version: description, keywords, what's-new, promotional text, marketing/support/privacy-policy URLs, plus app name and subtitle. Validates Apple character limits before writing. Pro feature.", {
|
|
225
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
226
|
+
locale: zod_1.z.string().optional().describe("Locale to edit (e.g. en-US). Default: first/primary locale."),
|
|
227
|
+
description: zod_1.z.string().optional().describe("App description (max 4000 chars)"),
|
|
228
|
+
keywords: zod_1.z.string().optional().describe("Comma-separated keywords (max 100 chars total)"),
|
|
229
|
+
whats_new: zod_1.z.string().optional().describe("What's New / release notes (max 4000 chars)"),
|
|
230
|
+
promotional_text: zod_1.z.string().optional().describe("Promotional text (max 170 chars)"),
|
|
231
|
+
marketing_url: zod_1.z.string().optional().describe("Marketing URL"),
|
|
232
|
+
support_url: zod_1.z.string().optional().describe("Support URL"),
|
|
233
|
+
name: zod_1.z.string().optional().describe("App name (max 30 chars)"),
|
|
234
|
+
subtitle: zod_1.z.string().optional().describe("App subtitle (max 30 chars)"),
|
|
235
|
+
privacy_policy_url: zod_1.z.string().optional().describe("Privacy policy URL (shown on the App Store listing)"),
|
|
236
|
+
}, safe((args) => (0, update_version_metadata_js_1.updateVersionMetadata)(client, args, tier)));
|
|
237
|
+
server.tool("create_version", "Create a new editable App Store version to prepare your next release. Pro feature.", {
|
|
238
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
239
|
+
version_string: zod_1.z.string().describe("Version number, e.g. 2.5.0"),
|
|
240
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Platform (default IOS)"),
|
|
241
|
+
copyright: zod_1.z.string().optional().describe("Copyright line, e.g. 2026 Your Company"),
|
|
242
|
+
}, safe((args) => (0, version_control_js_1.createVersion)(client, args, tier)));
|
|
243
|
+
server.tool("submit_for_review", "Submit the editable version to Apple App Review. First submits any READY_TO_SUBMIT in-app purchases/subscriptions, then the version. If the app's FIRST in-app purchase is detected (which Apple requires be bundled with the version in the website), it ABORTS without submitting and returns the manual steps, so nothing is orphaned. Outward-facing action: requires confirm:true. Pro feature.", {
|
|
244
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
245
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Platform (default IOS)"),
|
|
246
|
+
confirm: zod_1.z.boolean().optional().describe("Must be true to actually submit to App Review."),
|
|
247
|
+
}, safe((args) => (0, version_control_js_1.submitForReview)(client, args, tier)));
|
|
248
|
+
server.tool("list_builds", "List recent builds for an app with processing state (VALID = ready to use). Pro feature.", {
|
|
249
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
250
|
+
limit: zod_1.z.number().optional().describe("Max builds (default 10, max 50)"),
|
|
251
|
+
}, safe((args) => (0, builds_js_1.listBuilds)(client, args, tier)));
|
|
252
|
+
server.tool("wait_for_build", "Poll until the newest uploaded build finishes processing (VALID), so the ship flow is one call. Pro feature.", {
|
|
253
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
254
|
+
max_wait_seconds: zod_1.z.number().optional().describe("Max seconds to wait (default 1800, cap 3600)"),
|
|
255
|
+
poll_seconds: zod_1.z.number().optional().describe("Seconds between polls (default 30, min 10)"),
|
|
256
|
+
}, safe((args) => (0, builds_js_1.waitForBuild)(client, args, tier)));
|
|
257
|
+
server.tool("attach_build", "Attach a build to the editable version (defaults to the newest processed build). Pro feature.", {
|
|
258
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
259
|
+
build_id: zod_1.z.string().optional().describe("Specific build ID (from list_builds). Omit for newest VALID build."),
|
|
260
|
+
}, safe((args) => (0, builds_js_1.attachBuild)(client, args, tier)));
|
|
261
|
+
server.tool("upload_screenshots", "Upload screenshots to a version localization for a device display type (e.g. APP_IPHONE_67). Handles Apple's reserve/upload/commit flow. Pro feature.", {
|
|
262
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
263
|
+
display_type: zod_1.z.string().describe("Device display type, e.g. APP_IPHONE_67, APP_IPHONE_65, APP_IPAD_PRO_129"),
|
|
264
|
+
files: zod_1.z.array(zod_1.z.string()).describe("Absolute paths to PNG/JPEG screenshot files, in order"),
|
|
265
|
+
locale: zod_1.z.string().optional().describe("Locale (e.g. en-US). Default: first/primary locale."),
|
|
266
|
+
}, safe((args) => (0, screenshots_js_1.uploadScreenshots)(client, args, tier)));
|
|
267
|
+
server.tool("release_version", "Release an approved version (state PENDING_DEVELOPER_RELEASE) to the public App Store. Outward-facing: requires confirm:true. Pro feature.", {
|
|
268
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
269
|
+
confirm: zod_1.z.boolean().optional().describe("Must be true to actually release."),
|
|
270
|
+
}, safe((args) => (0, release_control_js_1.releaseVersion)(client, args, tier)));
|
|
271
|
+
server.tool("manage_phased_release", "Control the 7-day phased rollout: start, pause, resume, or complete (release to 100%). Pro feature.", {
|
|
272
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
273
|
+
action: zod_1.z.enum(["start", "pause", "resume", "complete"]).describe("Phased release action"),
|
|
274
|
+
}, safe((args) => (0, release_control_js_1.managePhasedRelease)(client, args, tier)));
|
|
275
|
+
server.tool("list_beta_groups", "List TestFlight beta groups for an app. Pro feature.", { app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID") }, safe((args) => (0, testflight_js_1.listBetaGroups)(client, args, tier)));
|
|
276
|
+
server.tool("assign_build_to_group", "Assign a build to a TestFlight beta group so testers can install it (defaults to newest processed build). Pro feature.", {
|
|
277
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
278
|
+
group_id: zod_1.z.string().describe("Beta group ID (from list_beta_groups)"),
|
|
279
|
+
build_id: zod_1.z.string().optional().describe("Specific build ID. Omit for newest VALID build."),
|
|
280
|
+
}, safe((args) => (0, testflight_js_1.assignBuildToGroup)(client, args, tier)));
|
|
281
|
+
server.tool("invite_beta_tester", "Invite an external tester by email and add them to a beta group. Apple sends the TestFlight invite. Pro feature.", {
|
|
282
|
+
group_id: zod_1.z.string().describe("Beta group ID (from list_beta_groups)"),
|
|
283
|
+
email: zod_1.z.string().describe("Tester email address"),
|
|
284
|
+
first_name: zod_1.z.string().optional().describe("Tester first name"),
|
|
285
|
+
last_name: zod_1.z.string().optional().describe("Tester last name"),
|
|
286
|
+
}, safe((args) => (0, testflight_js_1.inviteBetaTester)(client, args, tier)));
|
|
287
|
+
server.tool("build_and_archive", "Build, archive, and export a signed .ipa via xcodebuild (requires Xcode on this Mac). Needs a scheme and an ExportOptions.plist. Pro feature.", {
|
|
288
|
+
project_path: zod_1.z.string().describe("Path to .xcodeproj or .xcworkspace"),
|
|
289
|
+
scheme: zod_1.z.string().describe("Xcode scheme to build"),
|
|
290
|
+
export_options_plist: zod_1.z.string().describe("Path to ExportOptions.plist (method app-store-connect)"),
|
|
291
|
+
workspace: zod_1.z.boolean().optional().describe("Set true if project_path is a .xcworkspace"),
|
|
292
|
+
configuration: zod_1.z.string().optional().describe("Build configuration (default Release)"),
|
|
293
|
+
output_dir: zod_1.z.string().optional().describe("Output directory (default ./build)"),
|
|
294
|
+
}, safe((args) => (0, local_build_js_1.buildAndArchive)(args, tier)));
|
|
295
|
+
server.tool("upload_binary", "Upload a signed .ipa to App Store Connect via altool, using your API key. Outward-facing: requires confirm:true. Pro feature.", {
|
|
296
|
+
ipa_path: zod_1.z.string().describe("Absolute path to the .ipa to upload"),
|
|
297
|
+
platform: zod_1.z.string().optional().describe("Platform: ios, macos, or tvos (default ios)"),
|
|
298
|
+
confirm: zod_1.z.boolean().optional().describe("Must be true to actually upload."),
|
|
299
|
+
}, safe((args) => (0, local_build_js_1.uploadBinary)({ keyId: config.keyId, issuerId: config.issuerId }, args, tier)));
|
|
300
|
+
server.tool("set_age_rating", "Set the app's age-rating content declarations (Apple computes 4+/9+/12+/17+). Pass a declarations map, e.g. { medicalOrTreatmentInformation: \"INFREQUENT_OR_MILD\" }. Pro feature.", {
|
|
301
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
302
|
+
declarations: zod_1.z
|
|
303
|
+
.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.boolean()]))
|
|
304
|
+
.describe("Map of declaration key to value. Frequency keys take NONE/INFREQUENT_OR_MILD/FREQUENT_OR_INTENSE (also INFREQUENT/FREQUENT for the few keys Apple uses those on); capability keys take true/false."),
|
|
305
|
+
}, safe((args) => (0, age_rating_js_1.setAgeRating)(client, args, tier)));
|
|
306
|
+
server.tool("set_privacy_nutrition", "Configure the App Privacy nutrition label. Apple does not expose this via API; returns the exact steps + deep link. Pass data_not_collected:true for the 'Data Not Collected' path. Pro feature.", {
|
|
307
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
308
|
+
data_not_collected: zod_1.z.boolean().optional().describe("Set true if the app collects no data at all."),
|
|
309
|
+
}, safe((args) => (0, privacy_js_1.setPrivacyNutrition)(args, tier)));
|
|
310
|
+
server.tool("set_eu_trader_status", "Declare EU Digital Services Act trader status. Not API-addressable; returns the exact steps + deep link. Pro feature.", {
|
|
311
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
312
|
+
}, safe((args) => (0, eu_trader_js_1.setEUTraderStatus)(args, tier)));
|
|
313
|
+
server.tool("create_subscription", "Create (idempotently) an auto-renewable subscription inside a group, with USA price and an optional free trial. Sets territory availability automatically. Pro feature.", {
|
|
314
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
315
|
+
group_reference_name: zod_1.z.string().describe("Subscription group reference name (created if absent)"),
|
|
316
|
+
group_display_name: zod_1.z.string().describe("Customer-facing group name"),
|
|
317
|
+
product_id: zod_1.z.string().describe("Subscription product ID, e.g. com.app.plus.monthly"),
|
|
318
|
+
reference_name: zod_1.z.string().describe("Internal reference name"),
|
|
319
|
+
display_name: zod_1.z.string().describe("Customer-facing name (max 30 chars)"),
|
|
320
|
+
description: zod_1.z.string().describe("Customer-facing description (max 45 chars)"),
|
|
321
|
+
period: zod_1.z.enum(["ONE_WEEK", "ONE_MONTH", "TWO_MONTHS", "THREE_MONTHS", "SIX_MONTHS", "ONE_YEAR"]).describe("Billing period"),
|
|
322
|
+
price_usd: zod_1.z.number().describe("USA price in dollars, e.g. 4.99"),
|
|
323
|
+
free_trial: zod_1.z
|
|
324
|
+
.enum(["THREE_DAYS", "ONE_WEEK", "TWO_WEEKS", "ONE_MONTH", "TWO_MONTHS", "THREE_MONTHS", "SIX_MONTHS", "ONE_YEAR"])
|
|
325
|
+
.optional()
|
|
326
|
+
.describe("Free-trial length. Omit for no trial."),
|
|
327
|
+
locale: zod_1.z.string().optional().describe("Localization locale (default en-US)"),
|
|
328
|
+
group_level: zod_1.z.number().optional().describe("Rank within the group (1 = top tier; default 1). Higher-value plans get a lower number."),
|
|
329
|
+
family_sharable: zod_1.z.boolean().optional().describe("Allow Family Sharing of this subscription (default false)."),
|
|
330
|
+
review_note: zod_1.z.string().optional().describe("Notes for App Review: how to reach the paywall, test instructions"),
|
|
331
|
+
}, safe((args) => (0, iap_js_1.createSubscription)(client, args, tier)));
|
|
332
|
+
server.tool("create_iap", "Create (idempotently) a one-time in-app purchase (non-consumable or consumable) with USA price. Pro feature.", {
|
|
333
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
334
|
+
product_id: zod_1.z.string().describe("IAP product ID, e.g. com.app.lifetime"),
|
|
335
|
+
reference_name: zod_1.z.string().describe("Internal reference name"),
|
|
336
|
+
display_name: zod_1.z.string().describe("Customer-facing name (max 30 chars)"),
|
|
337
|
+
description: zod_1.z.string().describe("Customer-facing description (max 45 chars)"),
|
|
338
|
+
type: zod_1.z.enum(["NON_CONSUMABLE", "CONSUMABLE"]).describe("Purchase type"),
|
|
339
|
+
price_usd: zod_1.z.number().describe("USA price in dollars, e.g. 59.99"),
|
|
340
|
+
locale: zod_1.z.string().optional().describe("Localization locale (default en-US)"),
|
|
341
|
+
family_sharable: zod_1.z.boolean().optional().describe("Allow Family Sharing of this purchase (default false)."),
|
|
342
|
+
review_note: zod_1.z.string().optional().describe("Notes for App Review: how to reach the paywall, test instructions"),
|
|
343
|
+
}, safe((args) => (0, iap_js_1.createIAP)(client, args, tier)));
|
|
344
|
+
server.tool("set_iap_review_screenshot", "Upload the App Review screenshot a subscription or in-app purchase needs to leave MISSING_METADATA. Resolves the product by product_id automatically. Pro feature.", {
|
|
345
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
346
|
+
product_id: zod_1.z.string().describe("Product ID of the subscription or IAP"),
|
|
347
|
+
file: zod_1.z.string().describe("Absolute path to a PNG/JPEG review screenshot"),
|
|
348
|
+
}, safe((args) => (0, review_screenshot_js_1.setIapReviewScreenshot)(client, args, tier)));
|
|
349
|
+
server.tool("set_app_metadata", "Set submission-required app basics: primary/secondary category (appCategory ids like HEALTH_AND_FITNESS), copyright, content-rights declaration, and export compliance (encryption). Each applied only if provided. Pro feature.", {
|
|
350
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
351
|
+
primary_category: zod_1.z.string().optional().describe("Primary appCategory id, e.g. HEALTH_AND_FITNESS"),
|
|
352
|
+
secondary_category: zod_1.z.string().optional().describe("Secondary appCategory id"),
|
|
353
|
+
copyright: zod_1.z.string().optional().describe("Copyright line, e.g. 2026 Povilas Konopackas"),
|
|
354
|
+
content_rights: zod_1.z
|
|
355
|
+
.enum(["DOES_NOT_USE_THIRD_PARTY_CONTENT", "USES_THIRD_PARTY_CONTENT"])
|
|
356
|
+
.optional()
|
|
357
|
+
.describe("Content-rights declaration"),
|
|
358
|
+
uses_non_exempt_encryption: zod_1.z
|
|
359
|
+
.boolean()
|
|
360
|
+
.optional()
|
|
361
|
+
.describe("Export compliance: true if the app uses non-exempt encryption (most apps: false)"),
|
|
362
|
+
}, safe((args) => (0, submission_js_1.setAppMetadata)(client, args, tier)));
|
|
363
|
+
server.tool("set_app_price", "Set the app's base price by creating its price schedule (USA base, auto-equalized). price_usd: 0 for free. Required before submission. Pro feature.", {
|
|
364
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
365
|
+
price_usd: zod_1.z.number().describe("0 for a free app, or a USA price tier in dollars"),
|
|
366
|
+
}, safe((args) => (0, submission_js_1.setAppPrice)(client, args, tier)));
|
|
367
|
+
server.tool("set_review_contact", "Set the App Review contact and optional demo account on the editable version. Required before submission. Pro feature.", {
|
|
368
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
369
|
+
first_name: zod_1.z.string().describe("Contact first name"),
|
|
370
|
+
last_name: zod_1.z.string().describe("Contact last name"),
|
|
371
|
+
phone: zod_1.z.string().describe("Contact phone (with country code)"),
|
|
372
|
+
email: zod_1.z.string().describe("Contact email"),
|
|
373
|
+
notes: zod_1.z.string().optional().describe("Notes for App Review (how to test, etc.)"),
|
|
374
|
+
demo_account_name: zod_1.z.string().optional().describe("Demo account username, if the app needs a login"),
|
|
375
|
+
demo_account_password: zod_1.z.string().optional().describe("Demo account password"),
|
|
376
|
+
}, safe((args) => (0, submission_js_1.setReviewContact)(client, args, tier)));
|
|
377
|
+
server.tool("set_app_availability", "Set the app's country/region availability. By default makes it available in ALL App Store territories and auto-includes future ones; pass a territories subset to restrict. Pro feature.", {
|
|
378
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
379
|
+
territories: zod_1.z
|
|
380
|
+
.array(zod_1.z.string())
|
|
381
|
+
.optional()
|
|
382
|
+
.describe('Territory ids to enable, e.g. ["USA","GBR"]. Omit for all territories.'),
|
|
383
|
+
available_in_new_territories: zod_1.z
|
|
384
|
+
.boolean()
|
|
385
|
+
.optional()
|
|
386
|
+
.describe("Auto-include future new territories (default true)"),
|
|
387
|
+
}, safe((args) => (0, availability_js_1.setAppAvailability)(client, args, tier)));
|
|
388
|
+
server.tool("setup_app_store_signing", "Prepare App Store binary signing without the cloud-signing permission many API keys lack: downloads the app's IOS_APP_STORE provisioning profiles (app + extensions), installs them, and writes a manual-signing ExportOptions.plist for build_and_archive. Needs an Apple Distribution certificate already in the keychain. Pro feature.", {
|
|
389
|
+
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
390
|
+
output_plist: zod_1.z.string().optional().describe("Where to write ExportOptions.plist (default ./ExportOptions.plist)"),
|
|
391
|
+
}, safe((args) => (0, signing_js_1.setupAppStoreSigning)(client, args, tier)));
|
|
164
392
|
// --- Prompts (slash commands in Claude Desktop / Code) ---
|
|
165
393
|
const prompts = (0, prompts_js_1.registerPrompts)(server);
|
|
166
394
|
console.error(`asc-mcp: ${prompts.length} prompt(s) registered: ${prompts.map((p) => "/" + p.name).join(", ")}`);
|
|
@@ -186,6 +414,9 @@ function dispatchCli(argv) {
|
|
|
186
414
|
|
|
187
415
|
Usage:
|
|
188
416
|
asc-mcp Run as an MCP server on stdio (for Claude Desktop/Code).
|
|
417
|
+
asc-mcp init Auto-detect your .p8 and print a paste-ready MCP config.
|
|
418
|
+
asc-mcp init --write Same, but write the config into your client file directly.
|
|
419
|
+
asc-mcp doctor Diagnose setup: key, Issuer ID, live connection, license.
|
|
189
420
|
asc-mcp install-skill Install the asc-review-triage Claude Skill.
|
|
190
421
|
asc-mcp uninstall-skill Remove the asc-review-triage Claude Skill.
|
|
191
422
|
asc-mcp version Print version.
|
|
@@ -194,12 +425,36 @@ Usage:
|
|
|
194
425
|
}
|
|
195
426
|
return null;
|
|
196
427
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
428
|
+
if (process.argv[2] === "init") {
|
|
429
|
+
(0, setup_js_1.runInit)(process.argv.includes("--write"))
|
|
430
|
+
.then((code) => process.exit(code))
|
|
431
|
+
.catch((err) => {
|
|
432
|
+
console.error("init failed:", err);
|
|
433
|
+
process.exit(1);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
else if (process.argv[2] === "doctor") {
|
|
437
|
+
(0, doctor_js_1.runDoctor)()
|
|
438
|
+
.then((report) => {
|
|
439
|
+
console.log((0, doctor_js_1.formatDoctor)(report));
|
|
440
|
+
process.exit(report.healthy ? 0 : 1);
|
|
441
|
+
})
|
|
442
|
+
.catch((err) => {
|
|
443
|
+
console.error("doctor failed:", err);
|
|
444
|
+
process.exit(1);
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
const cliResult = dispatchCli(process.argv);
|
|
449
|
+
if (cliResult !== null) {
|
|
450
|
+
process.exit(cliResult);
|
|
451
|
+
}
|
|
452
|
+
bootstrap();
|
|
453
|
+
}
|
|
454
|
+
function bootstrap() {
|
|
455
|
+
main().catch((err) => {
|
|
456
|
+
console.error("Fatal error:", err);
|
|
457
|
+
process.exit(1);
|
|
458
|
+
});
|
|
200
459
|
}
|
|
201
|
-
main().catch((err) => {
|
|
202
|
-
console.error("Fatal error:", err);
|
|
203
|
-
process.exit(1);
|
|
204
|
-
});
|
|
205
460
|
//# sourceMappingURL=index.js.map
|