@pofky/asc-mcp 1.8.8 → 1.9.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/README.md +27 -18
- package/USER_GUIDE.md +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +16 -3
- package/dist/doctor.js.map +1 -1
- package/dist/gate.d.ts +26 -4
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +65 -8
- package/dist/gate.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -11
- package/dist/index.js.map +1 -1
- package/dist/license.d.ts +11 -1
- package/dist/license.d.ts.map +1 -1
- package/dist/license.js +32 -3
- package/dist/license.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +4 -3
- package/dist/prompts.js.map +1 -1
- package/dist/setup.d.ts +35 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +131 -13
- package/dist/setup.js.map +1 -1
- package/dist/tools/age-rating.js +1 -1
- package/dist/tools/age-rating.js.map +1 -1
- package/dist/tools/availability.js +1 -1
- package/dist/tools/availability.js.map +1 -1
- package/dist/tools/builds.js +3 -3
- package/dist/tools/builds.js.map +1 -1
- package/dist/tools/competitor-snapshot.d.ts.map +1 -1
- package/dist/tools/competitor-snapshot.js +3 -5
- package/dist/tools/competitor-snapshot.js.map +1 -1
- package/dist/tools/daily-briefing.d.ts.map +1 -1
- package/dist/tools/daily-briefing.js +3 -5
- package/dist/tools/daily-briefing.js.map +1 -1
- package/dist/tools/draft-review-response.js +1 -1
- package/dist/tools/draft-review-response.js.map +1 -1
- package/dist/tools/eu-trader.js +1 -1
- package/dist/tools/eu-trader.js.map +1 -1
- package/dist/tools/guide.js +1 -1
- package/dist/tools/guide.js.map +1 -1
- package/dist/tools/iap.js +2 -2
- package/dist/tools/iap.js.map +1 -1
- package/dist/tools/keyword-insights.d.ts.map +1 -1
- package/dist/tools/keyword-insights.js +3 -5
- package/dist/tools/keyword-insights.js.map +1 -1
- package/dist/tools/list-reviews.d.ts.map +1 -1
- package/dist/tools/list-reviews.js +3 -5
- package/dist/tools/list-reviews.js.map +1 -1
- package/dist/tools/local-build.js +2 -2
- package/dist/tools/local-build.js.map +1 -1
- package/dist/tools/metadata-diff.d.ts.map +1 -1
- package/dist/tools/metadata-diff.js +3 -5
- package/dist/tools/metadata-diff.js.map +1 -1
- package/dist/tools/privacy.js +1 -1
- package/dist/tools/privacy.js.map +1 -1
- package/dist/tools/release-control.js +2 -2
- package/dist/tools/release-control.js.map +1 -1
- package/dist/tools/release-notes.d.ts.map +1 -1
- package/dist/tools/release-notes.js +3 -5
- package/dist/tools/release-notes.js.map +1 -1
- package/dist/tools/release-preflight.d.ts.map +1 -1
- package/dist/tools/release-preflight.js +3 -5
- package/dist/tools/release-preflight.js.map +1 -1
- package/dist/tools/review-screenshot.js +1 -1
- package/dist/tools/review-screenshot.js.map +1 -1
- package/dist/tools/sales-report.d.ts.map +1 -1
- package/dist/tools/sales-report.js +3 -5
- package/dist/tools/sales-report.js.map +1 -1
- package/dist/tools/screenshots.js +1 -1
- package/dist/tools/screenshots.js.map +1 -1
- package/dist/tools/signing.js +1 -1
- package/dist/tools/signing.js.map +1 -1
- package/dist/tools/submission.js +3 -3
- package/dist/tools/submission.js.map +1 -1
- package/dist/tools/testflight.js +3 -3
- package/dist/tools/testflight.js.map +1 -1
- package/dist/tools/triage-reviews.js +1 -1
- package/dist/tools/triage-reviews.js.map +1 -1
- package/dist/tools/update-version-metadata.js +1 -1
- package/dist/tools/update-version-metadata.js.map +1 -1
- package/dist/tools/version-control.js +2 -2
- package/dist/tools/version-control.js.map +1 -1
- package/dist/trial.d.ts +42 -0
- package/dist/trial.d.ts.map +1 -0
- package/dist/trial.js +82 -0
- package/dist/trial.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/skills/asc-review-triage/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
#
|
|
1
|
+
# asc-mcp
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Ship an App Store release from your coding agent.** An MCP server for App Store Connect: 41 tools that edit version metadata, upload screenshots, attach builds, drive TestFlight, create in-app purchases, submit and release, plus an intelligence layer that audits a version before you submit and summarizes your reviews. 6 slash-command workflows and a bundled Claude Skill. Not another API wrapper.
|
|
4
4
|
|
|
5
|
-
[asc-mcp.pages.dev](https://asc-mcp.pages.dev) · [npm](https://www.npmjs.com/package/@pofky/asc-mcp) · [Pricing: free
|
|
5
|
+
[asc-mcp.pages.dev](https://asc-mcp.pages.dev) · [npm](https://www.npmjs.com/package/@pofky/asc-mcp) · [Pricing: 7-day free trial, then $9/month](https://asc-mcp.pages.dev/#pricing)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Claude Desktop, one click:** download the latest [`asc-mcp.mcpb`](https://github.com/pofky/asc-mcp/releases/latest) and open it. Claude asks for your Issuer ID and lets you pick your `.p8` with a file picker. No JSON, no restart hunt.
|
|
8
|
+
|
|
9
|
+
**Everything else** (Claude Code, Cursor, Windsurf, Cline), one command:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
|
|
11
|
-
npx @pofky/asc-mcp install-skill # one-line, optional, for auto-routed review questions
|
|
12
|
+
npx @pofky/asc-mcp init --write # finds your .p8, asks for your Issuer ID, writes your MCP config
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Other ASC MCP servers wrap the API and give you 80 to 293 raw endpoints. This one gives you 40 opinionated tools, 6 slash-command Prompts, and a Claude Skill that all think. The read tools summarize and audit; the Pro control tools actually drive App Store Connect, from editing metadata to submitting and releasing, with the same API key. Two tools use MCP Sampling: your own client's model does the LLM work, so there is no extra cost from this server.
|
|
17
|
-
|
|
18
|
-
**Why full control is possible without fastlane:** fastlane's `deliver` and `pilot` are just calls to the same App Store Connect REST API this server authenticates against with your `.p8`. So nearly everything you would script with fastlane is a tool here, no Ruby toolchain required. The only step that needs your Mac is building and signing the binary, which `build_and_archive` and `upload_binary` drive via Xcode.
|
|
15
|
+
Then ask your agent: **"start my asc-mcp trial, my email is you@example.com"**. All 41 tools unlock for 7 days, no card and nothing to cancel, and the trial activates in the session you are already in, so whatever you were blocked on works on the very next call. After that Pro is $9 a month. Six tools stay free, and three of those need nothing but Node.
|
|
19
16
|
|
|
20
17
|
| You say | What happens |
|
|
21
18
|
|---------|-------------|
|
|
22
19
|
| "Run a preflight check on my app" | Audits metadata, character limits, screenshots, build status. Catches the issues that cause 40% of rejections. |
|
|
23
20
|
| "Give me a morning briefing" | Summarizes all your apps: who's in review, who got rejected, new low-rating reviews, action items. |
|
|
24
21
|
| "Generate release notes from my git history" | Reads commits since last tag, categorizes them, and gives you structured data to write "What's New" text. |
|
|
25
|
-
| "List my apps" | Shows all your iOS/macOS apps with bundle IDs |
|
|
26
22
|
| "Is my app in review?" | Exact review state with context ("typical time: 24-48 hours") |
|
|
27
23
|
| "Show me 1-star reviews" | Customer reviews filtered by rating, territory, sorted by date |
|
|
28
24
|
| "What were my downloads this week?" | Sales and revenue summary by territory |
|
|
29
25
|
|
|
30
26
|
No context switching. No portal. Just ask.
|
|
31
27
|
|
|
28
|
+
## What Makes This Different
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
Other ASC MCP servers wrap the API and give you 80 to 982 raw endpoints. This one gives you 41 opinionated tools, 6 slash-command Prompts, and a Claude Skill that all think. The read tools summarize and audit; the Pro control tools actually drive App Store Connect, from editing metadata to submitting and releasing, with the same API key. Two tools use MCP Sampling: your own client's model does the LLM work, so there is no extra cost from this server.
|
|
33
|
+
|
|
34
|
+
**Why full control is possible without fastlane:** fastlane's `deliver` and `pilot` are just calls to the same App Store Connect REST API this server authenticates against with your `.p8`. So nearly everything you would script with fastlane is a tool here, no Ruby toolchain required. The only step that needs your Mac is building and signing the binary, which `build_and_archive` and `upload_binary` drive via Xcode.
|
|
35
|
+
|
|
32
36
|
## Setup (3 minutes)
|
|
33
37
|
|
|
34
38
|
**Step 1.** Create an API key in [App Store Connect > Integrations > App Store Connect API](https://appstoreconnect.apple.com/access/integrations/api) (Admin or App Manager role), then grab three things from that same page:
|
|
@@ -76,21 +80,24 @@ With the `.p8` in `~/.appstoreconnect/private_keys/`, `ASC_ISSUER_ID` is the onl
|
|
|
76
80
|
|
|
77
81
|
**Step 3.** Ask your agent: "List my App Store Connect apps"
|
|
78
82
|
|
|
83
|
+
**Step 4, to try the paid half.** Ask your agent: "start my asc-mcp trial, my email is you@example.com". It calls `asc_start_trial`, which unlocks all 41 tools for 7 days with no card and nothing to cancel. The key activates in the running session, so whatever you were blocked on works on the very next call, and it is written into your MCP config so it survives a restart. One trial per Apple developer account.
|
|
84
|
+
|
|
79
85
|
Works with **Claude Code**, **Cursor**, **Windsurf**, **Cline**, and any MCP-compatible client.
|
|
80
86
|
|
|
81
87
|
## Tools
|
|
82
88
|
|
|
83
|
-
### Free (no
|
|
89
|
+
### Free (no signup, no license key)
|
|
84
90
|
|
|
85
91
|
| Tool | What it does |
|
|
86
92
|
|------|-------------|
|
|
93
|
+
| `asc_start_trial` | **7 days of everything, no card.** Ask your agent to run it with your email. Unlocks all 41 tools in the running session, no restart, nothing to cancel. |
|
|
87
94
|
| `asc_setup_check` | **Run first if anything's off.** Checks your key, Issuer ID, a live App Store Connect connection, and license tier, and prints the exact fix for each failure. |
|
|
88
95
|
| `asc_guide` | **Start here.** The in-agent playbook for every flow (first release, update, IAP, subscriptions, reviews, TestFlight, binary), with each manual App Store Connect website step flagged inline. See also [USER_GUIDE.md](USER_GUIDE.md) and [LIMITATIONS.md](LIMITATIONS.md). |
|
|
89
96
|
| `list_apps` | List all your apps with name, bundle ID, SKU, platform |
|
|
90
97
|
| `app_details` | Version history, build status, release state, dates |
|
|
91
98
|
| `review_status` | Current review state with human-readable context |
|
|
92
99
|
|
|
93
|
-
### Pro ($9/
|
|
100
|
+
### Pro (free 7-day trial, then $9/month)
|
|
94
101
|
|
|
95
102
|
| Tool | What it does | Why it matters |
|
|
96
103
|
|------|-------------|----------------|
|
|
@@ -115,6 +122,7 @@ These tools write to App Store Connect. Every outward-facing action (submit, rel
|
|
|
115
122
|
| `update_version_metadata` | Edit description, keywords, what's-new, promo text, URLs, app name, subtitle. Validates Apple's character limits and refuses over-limit writes |
|
|
116
123
|
| `upload_screenshots` | Upload screenshots for a device display type (reserve, upload, commit, with checksum) |
|
|
117
124
|
| `list_builds` | List recent builds and their processing state (VALID = ready) |
|
|
125
|
+
| `wait_for_build` | Poll until a build finishes processing, so the chain does not need a manual pause |
|
|
118
126
|
| `attach_build` | Attach a build to the editable version (defaults to newest processed build) |
|
|
119
127
|
| `submit_for_review` | Submit the version to App Review (modern reviewSubmissions flow). `confirm: true` required |
|
|
120
128
|
| `release_version` | Release an approved version to the public App Store. `confirm: true` required |
|
|
@@ -253,16 +261,17 @@ Lead with the most impactful change. Keep under 4000 chars.
|
|
|
253
261
|
|
|
254
262
|
| | Raw API wrappers (free) | This server |
|
|
255
263
|
|---|---|---|
|
|
256
|
-
| **Tool count** | 80 to
|
|
257
|
-
| **MCP Prompts (slash commands)** | No | Yes,
|
|
264
|
+
| **Tool count** | 80 to 982 | 41 opinionated tools (read + control) |
|
|
265
|
+
| **MCP Prompts (slash commands)** | No | Yes, 6 pre-built workflows |
|
|
258
266
|
| **MCP Sampling (zero server-side LLM cost)** | No | Yes, review triage + response drafts |
|
|
259
267
|
| **Claude Skill bundled** | No | Yes, one-line install |
|
|
260
268
|
| **Pre-submission audit** | No | Yes, catches rejections before you submit |
|
|
261
269
|
| **Cross-app briefings** | No | Yes, one call, all apps |
|
|
262
270
|
| **Git-aware release notes** | No | Yes, reads your project's commit history |
|
|
263
271
|
| **Smart review summaries** | No | Yes, theme clustering, action items |
|
|
264
|
-
| **Setup** | Build from source (Swift or Node) |
|
|
265
|
-
| **Free tier** | Some | Yes,
|
|
272
|
+
| **Setup** | Build from source (Swift or Node) | One command, `init --write` writes your config |
|
|
273
|
+
| **Free tier** | Some | Yes, 6 tools, no signup. Three of them need nothing but Node |
|
|
274
|
+
| **Try the paid half** | n/a | 7 days, no card, started from inside your agent |
|
|
266
275
|
|
|
267
276
|
Raw wrappers give you endpoints. This gives you answers.
|
|
268
277
|
|
package/USER_GUIDE.md
CHANGED
|
@@ -35,7 +35,7 @@ Steps:
|
|
|
35
35
|
|
|
36
36
|
Manual interruptions you must do yourself:
|
|
37
37
|
- MANUAL: generating the API key and downloading the .p8 is a one-time App Store Connect website action. The .p8 cannot be re-downloaded; if lost, revoke and make a new one.
|
|
38
|
-
- Free tier is read/intelligence only.
|
|
38
|
+
- Free tier is read/intelligence only. To unlock every write/control tool, call `asc_start_trial` with the user's email: 7 days, no card, and it takes effect in the running session with no restart. After that it is $9/month (ASC_LICENSE_KEY).
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AASD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AASD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAqJvD;AAID,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAazD"}
|
package/dist/doctor.js
CHANGED
|
@@ -135,13 +135,24 @@ async function runDoctor() {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
// 5. License tier.
|
|
138
|
+
//
|
|
139
|
+
// Whether the trial can be offered here depends on whether the server is in
|
|
140
|
+
// setup mode. With no credentials only asc_setup_check and asc_guide are
|
|
141
|
+
// registered, so telling that user to call `asc_start_trial` names a tool
|
|
142
|
+
// their client cannot see, and the agent relaying it hits "no such tool".
|
|
143
|
+
const credentialsPresent = checks.every((c) => c.name === "License" || c.status !== "fail");
|
|
138
144
|
const licenseKey = process.env.ASC_LICENSE_KEY;
|
|
139
145
|
if (!licenseKey) {
|
|
140
146
|
checks.push({
|
|
141
147
|
name: "License",
|
|
142
148
|
status: "warn",
|
|
143
|
-
detail: "Free tier: read + intelligence tools only.",
|
|
144
|
-
fix:
|
|
149
|
+
detail: "Free tier: read + intelligence tools only. Not a problem; the free tools work.",
|
|
150
|
+
fix: credentialsPresent
|
|
151
|
+
? "Run `asc_start_trial` for 7 days of everything, no card. It unlocks write/control " +
|
|
152
|
+
"(metadata, screenshots, builds, submit, IAP/subs) in this session, no restart. " +
|
|
153
|
+
"Or subscribe at " + gate_js_1.UPGRADE_URL + " and set ASC_LICENSE_KEY."
|
|
154
|
+
: "Fix the credential problems above first. Once the server restarts with working " +
|
|
155
|
+
"credentials, `asc_start_trial` will be available for 7 days of everything, no card.",
|
|
145
156
|
});
|
|
146
157
|
}
|
|
147
158
|
else {
|
|
@@ -154,7 +165,9 @@ async function runDoctor() {
|
|
|
154
165
|
name: "License",
|
|
155
166
|
status: "fail",
|
|
156
167
|
detail: "A license key is set but did not validate as Pro.",
|
|
157
|
-
fix:
|
|
168
|
+
fix: `Check the key (retrieve it at ${license_js_1.LICENSE_API_URL}/key). ` +
|
|
169
|
+
"If the key is right, the license server may be unreachable: validation falls back to " +
|
|
170
|
+
"the free tier on a network error, so retry once you are online.",
|
|
158
171
|
});
|
|
159
172
|
}
|
|
160
173
|
}
|
package/dist/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAqCH,
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAqCH,8BAqJC;AAKD,oCAaC;AA1MD,qCAAmD;AACnD,yCAAoC;AACpC,qCAAkC;AAClC,uCAAsD;AACtD,6CAAgE;AAChE,yCAAgD;AAChD,uCAAwC;AAiBxC,MAAM,gBAAgB,GACpB,2DAA2D,CAAC;AAE9D,SAAS,WAAW,CAAC,CAAS;IAC5B,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAO,EAAC,IAAA,iBAAO,GAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAO,EAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED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M,KAAK,GAAG,CAAC,oCAAoC,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACzE,KAAK,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"}
|
package/dist/gate.d.ts
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import type { Tier } from "./types.js";
|
|
2
|
-
export declare const UPGRADE_URL = "https://buy.polar.sh/polar_cl_y86PS4ruc848PXevVvSYS49S8gZY8JYWF192v1UEgjj";
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* The direct Polar checkout link. Kept in the package even though the normal
|
|
4
|
+
* path is the counted redirect below, so a licence-server outage costs us
|
|
5
|
+
* attribution rather than the sale. Moving the product to a different Polar
|
|
6
|
+
* organization changes it, and the old link keeps working, so a missed copy
|
|
7
|
+
* silently sells into the wrong org: `scripts/set-checkout-url.mjs` rewrites
|
|
8
|
+
* every embedded copy at once.
|
|
6
9
|
*/
|
|
7
|
-
export declare
|
|
10
|
+
export declare const CHECKOUT_URL = "https://buy.polar.sh/polar_cl_y86PS4ruc848PXevVvSYS49S8gZY8JYWF192v1UEgjj";
|
|
11
|
+
/**
|
|
12
|
+
* Counted redirect to the same checkout. Which locked tool a person was reaching
|
|
13
|
+
* for when they decided to pay is the one demand signal this product collects,
|
|
14
|
+
* and it is collected here, from a link the user chooses to open, rather than
|
|
15
|
+
* from a beacon inside the server process.
|
|
16
|
+
*/
|
|
17
|
+
export declare function upgradeUrl(tool?: string): string;
|
|
18
|
+
/** Back-compat export: the generic buy link, no tool attribution. */
|
|
19
|
+
export declare const UPGRADE_URL: string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns an upgrade message when the tier is not Pro, otherwise null. Write and
|
|
22
|
+
* control tools call this first and early-return the message.
|
|
23
|
+
*
|
|
24
|
+
* The message leads with the trial, not the price. This fires at the moment a
|
|
25
|
+
* user has just asked their agent to do something real to their app, which is
|
|
26
|
+
* the worst possible moment to send them to a browser to enter a card for a
|
|
27
|
+
* product they have not yet seen work.
|
|
28
|
+
*/
|
|
29
|
+
export declare function requirePro(tier: Tier, capability: string, tool?: string): string | null;
|
|
8
30
|
//# sourceMappingURL=gate.d.ts.map
|
package/dist/gate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,8EACoD,CAAC;AAE9E;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,qEAAqE;AACrE,eAAO,MAAM,WAAW,QAAe,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAsBf"}
|
package/dist/gate.js
CHANGED
|
@@ -1,17 +1,74 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPGRADE_URL = void 0;
|
|
3
|
+
exports.UPGRADE_URL = exports.CHECKOUT_URL = void 0;
|
|
4
|
+
exports.upgradeUrl = upgradeUrl;
|
|
4
5
|
exports.requirePro = requirePro;
|
|
5
|
-
|
|
6
|
+
const license_js_1 = require("./license.js");
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
* The direct Polar checkout link. Kept in the package even though the normal
|
|
9
|
+
* path is the counted redirect below, so a licence-server outage costs us
|
|
10
|
+
* attribution rather than the sale. Moving the product to a different Polar
|
|
11
|
+
* organization changes it, and the old link keeps working, so a missed copy
|
|
12
|
+
* silently sells into the wrong org: `scripts/set-checkout-url.mjs` rewrites
|
|
13
|
+
* every embedded copy at once.
|
|
9
14
|
*/
|
|
10
|
-
|
|
15
|
+
exports.CHECKOUT_URL = "https://buy.polar.sh/polar_cl_y86PS4ruc848PXevVvSYS49S8gZY8JYWF192v1UEgjj";
|
|
16
|
+
/**
|
|
17
|
+
* Counted redirect to the same checkout. Which locked tool a person was reaching
|
|
18
|
+
* for when they decided to pay is the one demand signal this product collects,
|
|
19
|
+
* and it is collected here, from a link the user chooses to open, rather than
|
|
20
|
+
* from a beacon inside the server process.
|
|
21
|
+
*/
|
|
22
|
+
function upgradeUrl(tool) {
|
|
23
|
+
const base = `${license_js_1.LICENSE_API_URL}/go`;
|
|
24
|
+
return tool && /^[a-z0-9_]{1,64}$/.test(tool) ? `${base}?tool=${tool}` : base;
|
|
25
|
+
}
|
|
26
|
+
/** Back-compat export: the generic buy link, no tool attribution. */
|
|
27
|
+
exports.UPGRADE_URL = upgradeUrl();
|
|
28
|
+
/**
|
|
29
|
+
* Returns an upgrade message when the tier is not Pro, otherwise null. Write and
|
|
30
|
+
* control tools call this first and early-return the message.
|
|
31
|
+
*
|
|
32
|
+
* The message leads with the trial, not the price. This fires at the moment a
|
|
33
|
+
* user has just asked their agent to do something real to their app, which is
|
|
34
|
+
* the worst possible moment to send them to a browser to enter a card for a
|
|
35
|
+
* product they have not yet seen work.
|
|
36
|
+
*/
|
|
37
|
+
function requirePro(tier, capability, tool) {
|
|
11
38
|
if (tier === "pro")
|
|
12
39
|
return null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
40
|
+
// Someone whose trial has already run out must not be told to start one. They
|
|
41
|
+
// would call asc_start_trial, be refused, and reasonably conclude the thing is
|
|
42
|
+
// broken. `reason` comes from the licence server's last verdict on their key.
|
|
43
|
+
const spent = (0, license_js_1.lastLicenseStatus)()?.reason === "trial_expired";
|
|
44
|
+
return (`${capability} requires Pro.\n\n` +
|
|
45
|
+
(spent
|
|
46
|
+
? "Your 7-day trial has ended. Pro is $9/month, cancel any time:\n" +
|
|
47
|
+
` ${upgradeUrl(tool)}\n` +
|
|
48
|
+
` (direct link: ${exports.CHECKOUT_URL})\n\n` +
|
|
49
|
+
"If you already subscribed, call `asc_start_trial` with the same email and it will fetch " +
|
|
50
|
+
"your paid key and put it in your config.\n"
|
|
51
|
+
: "Free for 7 days, no card: call the `asc_start_trial` tool with the user's email. " +
|
|
52
|
+
"It unlocks all 41 tools in this session immediately, no restart.\n\n" +
|
|
53
|
+
`Or subscribe now, $9/month: ${upgradeUrl(tool)}\n` +
|
|
54
|
+
`(direct link: ${exports.CHECKOUT_URL})\n`) +
|
|
55
|
+
`\n${keyAdvice()}`);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The last line of the gate message.
|
|
59
|
+
*
|
|
60
|
+
* A key that is set but never validated means the licence server could not be
|
|
61
|
+
* reached, and validation fails open to the free tier. Telling that person to
|
|
62
|
+
* "set ASC_LICENSE_KEY" sends a paying customer to check a config that is
|
|
63
|
+
* already correct, during an outage that is ours.
|
|
64
|
+
*/
|
|
65
|
+
function keyAdvice() {
|
|
66
|
+
const keySet = Boolean(process.env.ASC_LICENSE_KEY);
|
|
67
|
+
if (keySet && (0, license_js_1.lastLicenseStatus)() === null) {
|
|
68
|
+
return ("ASC_LICENSE_KEY is set but could not be checked, so the license server is probably " +
|
|
69
|
+
"unreachable from here. Your key is fine. Retry in a moment, or check status at " +
|
|
70
|
+
`${license_js_1.LICENSE_API_URL}/health`);
|
|
71
|
+
}
|
|
72
|
+
return "Already have a key? Set ASC_LICENSE_KEY in your MCP server config.";
|
|
16
73
|
}
|
|
17
74
|
//# sourceMappingURL=gate.js.map
|
package/dist/gate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":";;;AAoBA,gCAGC;AAcD,gCA0BC;AA9DD,6CAAkE;AAElE;;;;;;;GAOG;AACU,QAAA,YAAY,GACvB,2EAA2E,CAAC;AAE9E;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,IAAa;IACtC,MAAM,IAAI,GAAG,GAAG,4BAAe,KAAK,CAAC;IACrC,OAAO,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAChF,CAAC;AAED,qEAAqE;AACxD,QAAA,WAAW,GAAG,UAAU,EAAE,CAAC;AAExC;;;;;;;;GAQG;AACH,SAAgB,UAAU,CACxB,IAAU,EACV,UAAkB,EAClB,IAAa;IAEb,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IAEhC,8EAA8E;IAC9E,+EAA+E;IAC/E,8EAA8E;IAC9E,MAAM,KAAK,GAAG,IAAA,8BAAiB,GAAE,EAAE,MAAM,KAAK,eAAe,CAAC;IAE9D,OAAO,CACL,GAAG,UAAU,oBAAoB;QACjC,CAAC,KAAK;YACJ,CAAC,CAAC,iEAAiE;gBACjE,KAAK,UAAU,CAAC,IAAI,CAAC,IAAI;gBACzB,mBAAmB,oBAAY,OAAO;gBACtC,0FAA0F;gBAC1F,4CAA4C;YAC9C,CAAC,CAAC,mFAAmF;gBACnF,sEAAsE;gBACtE,+BAA+B,UAAU,CAAC,IAAI,CAAC,IAAI;gBACnD,iBAAiB,oBAAY,KAAK,CAAC;QACvC,KAAK,SAAS,EAAE,EAAE,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,SAAS;IAChB,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACpD,IAAI,MAAM,IAAI,IAAA,8BAAiB,GAAE,KAAK,IAAI,EAAE,CAAC;QAC3C,OAAO,CACL,qFAAqF;YACrF,iFAAiF;YACjF,GAAG,4BAAe,SAAS,CAC5B,CAAC;IACJ,CAAC;IACD,OAAO,oEAAoE,CAAC;AAC9E,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA+CA;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAOzB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
const client_js_1 = require("./client.js");
|
|
9
9
|
const license_js_1 = require("./license.js");
|
|
10
|
+
const trial_js_1 = require("./trial.js");
|
|
10
11
|
const prompts_js_1 = require("./prompts.js");
|
|
11
12
|
const skill_installer_js_1 = require("./skill-installer.js");
|
|
12
13
|
const list_apps_js_1 = require("./tools/list-apps.js");
|
|
@@ -69,9 +70,14 @@ function getConfig() {
|
|
|
69
70
|
// Auto-discover the .p8 in Apple's standard path so a dropped key + Issuer ID
|
|
70
71
|
// is enough - no need to hand-set ASC_KEY_ID / ASC_PRIVATE_KEY_PATH.
|
|
71
72
|
const discovered = (0, setup_js_1.discoverPrivateKey)();
|
|
72
|
-
const keyId = process.env.ASC_KEY_ID || discovered?.keyId;
|
|
73
73
|
const issuerId = process.env.ASC_ISSUER_ID;
|
|
74
74
|
const privateKeyPath = process.env.ASC_PRIVATE_KEY_PATH || discovered?.path;
|
|
75
|
+
// An explicit path outside the standard directory still carries its Key ID in
|
|
76
|
+
// the filename Apple gave it, so derive it rather than demanding the user
|
|
77
|
+
// retype what they just pointed at.
|
|
78
|
+
const keyId = process.env.ASC_KEY_ID ||
|
|
79
|
+
discovered?.keyId ||
|
|
80
|
+
(privateKeyPath ? (0, setup_js_1.keyIdFromPath)(privateKeyPath) : null);
|
|
75
81
|
if (!keyId || !issuerId || !privateKeyPath)
|
|
76
82
|
return null;
|
|
77
83
|
return {
|
|
@@ -90,7 +96,7 @@ async function runSetupMode() {
|
|
|
90
96
|
console.error(`asc-mcp ${exports.SERVER_VERSION}: setup mode. ${MISSING_CREDS_MESSAGE}`);
|
|
91
97
|
const server = new mcp_js_1.McpServer({ name: "asc-mcp", version: exports.SERVER_VERSION }, {
|
|
92
98
|
capabilities: { tools: {}, prompts: {} },
|
|
93
|
-
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
|
|
99
|
+
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 41 tools.",
|
|
94
100
|
});
|
|
95
101
|
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
96
102
|
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)())));
|
|
@@ -102,12 +108,17 @@ async function main() {
|
|
|
102
108
|
if (!config)
|
|
103
109
|
return runSetupMode();
|
|
104
110
|
const client = new client_js_1.ASCClient(config);
|
|
105
|
-
|
|
111
|
+
// Mutable on purpose. `asc_start_trial` reassigns it, and every tool closure
|
|
112
|
+
// below reads it at call time, so a trial started mid-conversation unlocks the
|
|
113
|
+
// running session with no config reload and no client restart. Sending someone
|
|
114
|
+
// away to restart their agent at the exact moment they agreed to try the thing
|
|
115
|
+
// is how you lose them.
|
|
116
|
+
let tier = await (0, license_js_1.validateLicense)(config.licenseKey);
|
|
106
117
|
if (tier === "pro") {
|
|
107
118
|
console.error(`asc-mcp ${exports.SERVER_VERSION}: Pro license active. All tools available.`);
|
|
108
119
|
}
|
|
109
120
|
else {
|
|
110
|
-
console.error(`asc-mcp ${exports.SERVER_VERSION}: Free tier.
|
|
121
|
+
console.error(`asc-mcp ${exports.SERVER_VERSION}: Free tier. Call asc_start_trial for 7 days of Pro, no card. Or subscribe at ${gate_js_1.UPGRADE_URL}`);
|
|
111
122
|
}
|
|
112
123
|
const server = new mcp_js_1.McpServer({
|
|
113
124
|
name: "asc-mcp",
|
|
@@ -151,6 +162,65 @@ async function main() {
|
|
|
151
162
|
.describe("Which playbook. Omit for the overview + topic list."),
|
|
152
163
|
}, safe((args) => (0, guide_js_1.ascGuide)(args)));
|
|
153
164
|
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)())));
|
|
165
|
+
server.registerTool("asc_start_trial", {
|
|
166
|
+
title: "Start a free 7-day Pro trial",
|
|
167
|
+
description: "Start a free 7-day Pro trial, no credit card, unlocking all 41 tools including the full write/control plane. Call this whenever a Pro tool is refused and the user wants to proceed: ask them for an email address first, then call this. The trial activates in THIS session immediately, so you can retry the tool that was blocked without any restart. Free.",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
email: zod_1.z
|
|
170
|
+
.string()
|
|
171
|
+
.describe("The user's email address. Required: the trial key is sent there so they still have it later. Ask the user for it; never invent one."),
|
|
172
|
+
tool: zod_1.z
|
|
173
|
+
.string()
|
|
174
|
+
.optional()
|
|
175
|
+
.describe("The tool whose gate prompted this, e.g. submit_for_review."),
|
|
176
|
+
},
|
|
177
|
+
}, async (args) => {
|
|
178
|
+
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
179
|
+
// Gate on *why* the tier is pro, not on the tier. A live trial also reads
|
|
180
|
+
// as pro, and refusing on that would leave a trial user with no way to ask
|
|
181
|
+
// how long they have left. Only a real subscription short-circuits.
|
|
182
|
+
const status = (0, license_js_1.lastLicenseStatus)();
|
|
183
|
+
if (tier === "pro" && status?.valid && !status.trial) {
|
|
184
|
+
return text("A paid Pro subscription is already active on this server. There is nothing to trial; every tool is unlocked.");
|
|
185
|
+
}
|
|
186
|
+
const result = await (0, trial_js_1.requestTrial)({
|
|
187
|
+
issuerId: config.issuerId,
|
|
188
|
+
email: args.email,
|
|
189
|
+
tool: args.tool,
|
|
190
|
+
});
|
|
191
|
+
if (!result.ok) {
|
|
192
|
+
return text(result.message + (result.checkout_url ? `\n\nSubscribe: ${result.checkout_url}` : ""));
|
|
193
|
+
}
|
|
194
|
+
// Unlock the running session. The closures above read `tier` at call time,
|
|
195
|
+
// so the tool that was just refused works on the very next call.
|
|
196
|
+
tier = "pro";
|
|
197
|
+
process.env.ASC_LICENSE_KEY = result.key;
|
|
198
|
+
(0, license_js_1.clearLicenseCache)();
|
|
199
|
+
const { updated, skipped } = (0, setup_js_1.injectLicenseKey)(result.key);
|
|
200
|
+
const persistence = updated.length
|
|
201
|
+
? `Saved to ${updated.join(", ")} (backup alongside), so it survives a restart.`
|
|
202
|
+
: "Could not find an asc-mcp block in a known client config, so add ASC_LICENSE_KEY yourself to keep it after a restart:\n" +
|
|
203
|
+
` "ASC_LICENSE_KEY": "${result.key}"`;
|
|
204
|
+
return text([
|
|
205
|
+
result.subscription
|
|
206
|
+
? "You already subscribed, so this is your paid license key, not a trial. " +
|
|
207
|
+
"It replaces the trial key that was in your config, which would have stopped working when the trial ran out."
|
|
208
|
+
: result.already_started
|
|
209
|
+
? `Trial already running: ${result.days_remaining} day(s) left.`
|
|
210
|
+
: `Pro trial started. ${result.days_remaining} day(s), no card, nothing to cancel.`,
|
|
211
|
+
"",
|
|
212
|
+
`License key: ${result.key}`,
|
|
213
|
+
persistence,
|
|
214
|
+
skipped.length ? `Left untouched: ${skipped.join(", ")}` : "",
|
|
215
|
+
"",
|
|
216
|
+
"All 41 tools are unlocked in this session right now. Retry what you were doing.",
|
|
217
|
+
result.subscription || !result.checkout_url
|
|
218
|
+
? ""
|
|
219
|
+
: `When the trial ends, Pro is $9/month: ${result.checkout_url}`,
|
|
220
|
+
]
|
|
221
|
+
.filter(Boolean)
|
|
222
|
+
.join("\n"));
|
|
223
|
+
});
|
|
154
224
|
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)));
|
|
155
225
|
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)));
|
|
156
226
|
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)));
|
|
@@ -171,22 +241,22 @@ async function main() {
|
|
|
171
241
|
.describe("Date in YYYY-MM-DD (daily) or YYYY-MM (monthly). Default: yesterday."),
|
|
172
242
|
}, safe((args) => (0, sales_report_js_1.salesReport)(client, args, tier)));
|
|
173
243
|
// --- Intelligence tools (Pro) ---
|
|
174
|
-
server.tool("release_preflight", "Pre-submission audit: checks metadata, character limits, screenshots, build status. Catches rejection causes before you submit.", { app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID") }, safe((args) => (0, release_preflight_js_1.releasePreflight)(client, args, tier)));
|
|
175
|
-
server.tool("daily_briefing", "Morning briefing across all apps: version status, recent reviews, rejections, action items. One call for full situational awareness.", { days: zod_1.z.number().optional().describe("Look back N days for reviews (default 3)") }, safe((args) => (0, daily_briefing_js_1.dailyBriefing)(client, args, tier)));
|
|
176
|
-
server.tool("release_notes", "Extract git commits since last tag and return structured data for writing App Store 'What's New' text. Categorizes changes and provides writing guidelines.", {
|
|
244
|
+
server.tool("release_preflight", "Pre-submission audit: checks metadata, character limits, screenshots, build status. Catches rejection causes before you submit. Pro feature.", { app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID") }, safe((args) => (0, release_preflight_js_1.releasePreflight)(client, args, tier)));
|
|
245
|
+
server.tool("daily_briefing", "Morning briefing across all apps: version status, recent reviews, rejections, action items. One call for full situational awareness. Pro feature.", { days: zod_1.z.number().optional().describe("Look back N days for reviews (default 3)") }, safe((args) => (0, daily_briefing_js_1.dailyBriefing)(client, args, tier)));
|
|
246
|
+
server.tool("release_notes", "Extract git commits since last tag and return structured data for writing App Store 'What's New' text. Categorizes changes and provides writing guidelines. Pro feature.", {
|
|
177
247
|
project_path: zod_1.z.string().optional().describe("Path to git project (default: current directory)"),
|
|
178
248
|
since_tag: zod_1.z.string().optional().describe("Git tag to diff from (default: latest tag)"),
|
|
179
249
|
max_commits: zod_1.z.number().optional().describe("Max commits to include (default 50)"),
|
|
180
250
|
}, safe((args) => (0, release_notes_js_1.releaseNotes)(args, tier)));
|
|
181
|
-
server.tool("keyword_insights", "Analyze your app's keywords against search competition. Shows difficulty, competing apps, and budget usage. Uses iTunes Search API.", {
|
|
251
|
+
server.tool("keyword_insights", "Analyze your app's keywords against search competition. Shows difficulty, competing apps, and budget usage. Uses iTunes Search API. Pro feature.", {
|
|
182
252
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
183
253
|
extra_keywords: zod_1.z.string().optional().describe("Extra comma-separated keywords to analyze beyond current metadata"),
|
|
184
254
|
}, safe((args) => (0, keyword_insights_js_1.keywordInsights)(client, args, tier)));
|
|
185
|
-
server.tool("competitor_snapshot", "Look up any app on the App Store: ratings, reviews, version, price, category, release notes. Search by name or App Store ID.", {
|
|
255
|
+
server.tool("competitor_snapshot", "Look up any app on the App Store: ratings, reviews, version, price, category, release notes. Search by name or App Store ID. Pro feature.", {
|
|
186
256
|
query: zod_1.z.string().describe('App name (e.g. "Medisafe") or numeric App Store ID'),
|
|
187
257
|
country: zod_1.z.string().optional().describe("Two-letter country code (default: us)"),
|
|
188
258
|
}, safe((args) => (0, competitor_snapshot_js_1.competitorSnapshot)(args, tier)));
|
|
189
|
-
server.tool("metadata_diff", "Compare metadata between your live and pending app versions. Shows what changed in descriptions, keywords, and release notes across locales.", {
|
|
259
|
+
server.tool("metadata_diff", "Compare metadata between your live and pending app versions. Shows what changed in descriptions, keywords, and release notes across locales. Pro feature.", {
|
|
190
260
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
191
261
|
}, safe((args) => (0, metadata_diff_js_1.metadataDiff)(client, args, tier)));
|
|
192
262
|
// --- Sampling-powered tools (Pro) ---
|
|
@@ -267,7 +337,7 @@ async function main() {
|
|
|
267
337
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
268
338
|
limit: zod_1.z.number().optional().describe("Max builds (default 10, max 50)"),
|
|
269
339
|
}, safe((args) => (0, builds_js_1.listBuilds)(client, args, tier)));
|
|
270
|
-
server.tool("wait_for_build", "Poll until the newest uploaded build finishes processing (VALID), so the ship flow is one call. Pro feature.", {
|
|
340
|
+
server.tool("wait_for_build", "Poll until the newest uploaded build finishes processing (VALID), so the ship flow is one call. Blocks for up to 30 minutes by default; if you should not hold the session that long, call list_builds yourself instead. Pro feature.", {
|
|
271
341
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
272
342
|
max_wait_seconds: zod_1.z.number().optional().describe("Max seconds to wait (default 1800, cap 3600)"),
|
|
273
343
|
poll_seconds: zod_1.z.number().optional().describe("Seconds between polls (default 30, min 10)"),
|