asc-mcp 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,463 @@
1
+ # App Store Connect MCP Server
2
+
3
+ [![npm version](https://img.shields.io/npm/v/asc-mcp.svg)](https://www.npmjs.com/package/asc-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js Version](https://img.shields.io/node/v/asc-mcp.svg)](https://nodejs.org)
6
+
7
+ A Model Context Protocol (MCP) server for Apple's App Store Connect API. Manage your iOS, macOS, tvOS, and visionOS apps directly from Claude, Cursor, or any MCP-compatible client.
8
+
9
+ ## Features
10
+
11
+ - **App Store Localizations** - Full CRUD for version descriptions, keywords, and what's new
12
+ - **App Management** - List and inspect apps across all platforms
13
+ - **Version Control** - Create and manage app store versions
14
+ - **Beta Testing** - Manage TestFlight groups, testers, and invitations
15
+ - **Screenshot Management** - Upload and organize app screenshots
16
+ - **Bundle ID Management** - Full CRUD for bundle identifiers
17
+ - **Device Management** - List and inspect registered devices
18
+ - **User Management** - List and inspect team users
19
+ - **Build Management** - List and inspect app builds
20
+ - **Category & Pricing** - Browse categories, check pricing and availability
21
+ - **Secure by Default** - ES256 JWT auth with automatic token refresh, credential redaction in logs
22
+
23
+ ## Table of Contents
24
+
25
+ - [Quick Start](#quick-start)
26
+ - [Installation](#installation)
27
+ - [Configuration](#configuration)
28
+ - [Available Tools](#available-tools)
29
+ - [Usage Examples](#usage-examples)
30
+ - [Security](#security)
31
+ - [Troubleshooting](#troubleshooting)
32
+ - [Development](#development)
33
+ - [License](#license)
34
+
35
+ ## Quick Start
36
+
37
+ ```bash
38
+ # 1. Install
39
+ npm install -g asc-mcp
40
+
41
+ # 2. Set credentials (get from App Store Connect > Users and Access > Keys)
42
+ export APP_STORE_CONNECT_KEY_ID="YOUR_KEY_ID"
43
+ export APP_STORE_CONNECT_ISSUER_ID="YOUR_ISSUER_ID"
44
+ export APP_STORE_CONNECT_P8_PATH="/path/to/AuthKey.p8"
45
+
46
+ # 3. Add to your MCP client config and start using!
47
+ ```
48
+
49
+ ## Installation
50
+
51
+ ### npm (recommended)
52
+
53
+ ```bash
54
+ npm install -g asc-mcp
55
+ ```
56
+
57
+ ### Using npx
58
+
59
+ ```bash
60
+ npx asc-mcp
61
+ ```
62
+
63
+ ### From Source
64
+
65
+ ```bash
66
+ git clone https://github.com/SardorbekR/appstore-connect-mcp.git
67
+ cd appstore-connect-mcp
68
+ npm install
69
+ npm run build
70
+ ```
71
+
72
+ ## Configuration
73
+
74
+ ### Prerequisites: Get Your Apple API Credentials
75
+
76
+ 1. Sign in to [App Store Connect](https://appstoreconnect.apple.com)
77
+ 2. Go to **Users and Access** → **Integrations** → **App Store Connect API**
78
+ 3. Click **Generate API Key** (or use existing)
79
+ 4. Select appropriate role (Admin or App Manager recommended)
80
+ 5. **Download the .p8 file** - you can only download it once!
81
+ 6. Note your **Key ID** (shown in the keys list)
82
+ 7. Note your **Issuer ID** (shown at the top of the page)
83
+
84
+ ### Environment Variables
85
+
86
+ | Variable | Required | Description |
87
+ |----------|----------|-------------|
88
+ | `APP_STORE_CONNECT_KEY_ID` | Yes | Your API Key ID (e.g., `ABC123DEFG`) |
89
+ | `APP_STORE_CONNECT_ISSUER_ID` | Yes | Your Issuer ID (UUID format) |
90
+ | `APP_STORE_CONNECT_P8_PATH` | Yes* | Path to your `.p8` private key file |
91
+ | `APP_STORE_CONNECT_P8_CONTENT` | Yes* | Raw content of `.p8` key (alternative to path) |
92
+
93
+ *One of `P8_PATH` or `P8_CONTENT` is required.
94
+
95
+ ### MCP Client Configuration
96
+
97
+ <details>
98
+ <summary><strong>Claude Desktop</strong></summary>
99
+
100
+ Add to your Claude Desktop config file:
101
+
102
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
103
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
104
+
105
+ ```json
106
+ {
107
+ "mcpServers": {
108
+ "app-store-connect": {
109
+ "command": "asc-mcp",
110
+ "env": {
111
+ "APP_STORE_CONNECT_KEY_ID": "YOUR_KEY_ID",
112
+ "APP_STORE_CONNECT_ISSUER_ID": "YOUR_ISSUER_ID",
113
+ "APP_STORE_CONNECT_P8_PATH": "/absolute/path/to/AuthKey.p8"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ </details>
121
+
122
+ <details>
123
+ <summary><strong>Cursor</strong></summary>
124
+
125
+ Add to your Cursor MCP settings (Settings → MCP Servers):
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "app-store-connect": {
131
+ "command": "npx",
132
+ "args": ["-y", "asc-mcp"],
133
+ "env": {
134
+ "APP_STORE_CONNECT_KEY_ID": "YOUR_KEY_ID",
135
+ "APP_STORE_CONNECT_ISSUER_ID": "YOUR_ISSUER_ID",
136
+ "APP_STORE_CONNECT_P8_PATH": "/absolute/path/to/AuthKey.p8"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ </details>
144
+
145
+ <details>
146
+ <summary><strong>VS Code with Continue</strong></summary>
147
+
148
+ Add to your Continue configuration:
149
+
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "app-store-connect": {
154
+ "command": "asc-mcp",
155
+ "env": {
156
+ "APP_STORE_CONNECT_KEY_ID": "YOUR_KEY_ID",
157
+ "APP_STORE_CONNECT_ISSUER_ID": "YOUR_ISSUER_ID",
158
+ "APP_STORE_CONNECT_P8_PATH": "/absolute/path/to/AuthKey.p8"
159
+ }
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ </details>
166
+
167
+ <details>
168
+ <summary><strong>Using P8 Content Instead of Path</strong></summary>
169
+
170
+ For CI/CD or containerized environments, you can pass the key content directly:
171
+
172
+ ```json
173
+ {
174
+ "mcpServers": {
175
+ "app-store-connect": {
176
+ "command": "asc-mcp",
177
+ "env": {
178
+ "APP_STORE_CONNECT_KEY_ID": "YOUR_KEY_ID",
179
+ "APP_STORE_CONNECT_ISSUER_ID": "YOUR_ISSUER_ID",
180
+ "APP_STORE_CONNECT_P8_CONTENT": "-----BEGIN PRIVATE KEY-----\nMIGT...your key here...AB12\n-----END PRIVATE KEY-----"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ </details>
188
+
189
+ ## Available Tools
190
+
191
+ ### Apps
192
+
193
+ | Tool | Description | Parameters |
194
+ |------|-------------|------------|
195
+ | `list_apps` | List all apps in your account | `limit?` (number, 1-200) |
196
+ | `get_app` | Get details of a specific app | `appId` (string, required) |
197
+
198
+ ### Versions
199
+
200
+ | Tool | Description | Parameters |
201
+ |------|-------------|------------|
202
+ | `list_app_versions` | List all versions for an app | `appId`, `platform?`, `versionState?`, `limit?` |
203
+ | `get_app_version` | Get version details | `versionId` |
204
+ | `create_app_version` | Create a new app version | `appId`, `platform`, `versionString`, `releaseType?` |
205
+
206
+ ### Version Localizations
207
+
208
+ | Tool | Description | Parameters |
209
+ |------|-------------|------------|
210
+ | `list_version_localizations` | List localizations for a version | `versionId`, `limit?` |
211
+ | `get_version_localization` | Get localization details | `localizationId` |
212
+ | `create_version_localization` | Add a new locale | `versionId`, `locale`, `description?`, `keywords?`, `whatsNew?` |
213
+ | `update_version_localization` | Update localization | `localizationId`, `description?`, `keywords?`, `whatsNew?`, `promotionalText?` |
214
+ | `delete_version_localization` | Remove a locale | `localizationId` |
215
+
216
+ ### App Info Localizations
217
+
218
+ | Tool | Description | Parameters |
219
+ |------|-------------|------------|
220
+ | `list_app_infos` | List app info records | `appId`, `limit?` |
221
+ | `list_app_info_localizations` | List name/subtitle localizations | `appInfoId`, `limit?` |
222
+ | `update_app_info_localization` | Update app name, subtitle | `localizationId`, `name?`, `subtitle?`, `privacyPolicyUrl?` |
223
+
224
+ ### Beta Testing (TestFlight)
225
+
226
+ | Tool | Description | Parameters |
227
+ |------|-------------|------------|
228
+ | `list_beta_groups` | List beta groups for an app | `appId`, `limit?` |
229
+ | `list_beta_testers` | List testers in a group | `betaGroupId`, `limit?` |
230
+ | `add_beta_tester` | Add a tester to a group | `betaGroupId`, `email`, `firstName?`, `lastName?` |
231
+ | `remove_beta_tester` | Remove a tester from a group | `betaGroupId`, `betaTesterId` |
232
+
233
+ ### Screenshots
234
+
235
+ | Tool | Description | Parameters |
236
+ |------|-------------|------------|
237
+ | `list_screenshot_sets` | List screenshot sets | `localizationId`, `limit?` |
238
+ | `list_screenshots` | List screenshots in a set | `screenshotSetId`, `limit?` |
239
+ | `upload_screenshot` | Upload a new screenshot | `screenshotSetId`, `fileName`, `fileSize`, `filePath` |
240
+
241
+ ### Bundle IDs
242
+
243
+ | Tool | Description | Parameters |
244
+ |------|-------------|------------|
245
+ | `list_bundle_ids` | List all bundle IDs | `limit?`, `platform?` |
246
+ | `get_bundle_id` | Get bundle ID details | `bundleIdId` |
247
+ | `create_bundle_id` | Register a new bundle ID | `identifier`, `name`, `platform` |
248
+ | `update_bundle_id` | Update bundle ID name | `bundleIdId`, `name` |
249
+ | `delete_bundle_id` | Delete a bundle ID | `bundleIdId` |
250
+
251
+ ### Devices
252
+
253
+ | Tool | Description | Parameters |
254
+ |------|-------------|------------|
255
+ | `list_devices` | List registered devices | `limit?`, `platform?`, `status?` |
256
+ | `get_device` | Get device details | `deviceId` |
257
+
258
+ ### Users
259
+
260
+ | Tool | Description | Parameters |
261
+ |------|-------------|------------|
262
+ | `list_users` | List team users | `limit?`, `roles?` |
263
+ | `get_user` | Get user details | `userId` |
264
+
265
+ ### Builds
266
+
267
+ | Tool | Description | Parameters |
268
+ |------|-------------|------------|
269
+ | `list_builds` | List builds for an app | `appId`, `limit?` |
270
+ | `get_build` | Get build details | `buildId` |
271
+ | `list_beta_tester_invitations` | List pending invitations | `betaGroupId`, `limit?` |
272
+
273
+ ### Categories & Pricing
274
+
275
+ | Tool | Description | Parameters |
276
+ |------|-------------|------------|
277
+ | `list_app_categories` | List app categories | `limit?`, `platform?` |
278
+ | `get_app_price_schedule` | Get app pricing info | `appId` |
279
+ | `get_app_availability` | Get app territory availability | `appId` |
280
+
281
+ ## Usage Examples
282
+
283
+ ### List Your Apps
284
+
285
+ > "Show me all my apps in App Store Connect"
286
+
287
+ Claude will use `list_apps` to retrieve and display your apps.
288
+
289
+ ### Update App Description
290
+
291
+ > "Update the English description for version 2.0 of MyApp to: 'A revolutionary app that simplifies your daily tasks.'"
292
+
293
+ Claude will:
294
+ 1. Find the app using `list_apps`
295
+ 2. Get the version using `list_app_versions`
296
+ 3. Find the English localization using `list_version_localizations`
297
+ 4. Update it using `update_version_localization`
298
+
299
+ ### Add Japanese Localization
300
+
301
+ > "Add Japanese localization to MyApp version 2.0 with description '素晴らしいアプリです' and keywords 'アプリ,便利,簡単'"
302
+
303
+ Claude will use `create_version_localization` with locale `ja`.
304
+
305
+ ### Add a Beta Tester
306
+
307
+ > "Add john@example.com as a beta tester to the Internal Testing group for MyApp"
308
+
309
+ Claude will:
310
+ 1. Find the app and beta group using `list_beta_groups`
311
+ 2. Add the tester using `add_beta_tester`
312
+
313
+ ### Check Version Status
314
+
315
+ > "What's the status of all versions of MyApp?"
316
+
317
+ Claude will use `list_app_versions` to show version states (PREPARE_FOR_SUBMISSION, IN_REVIEW, READY_FOR_SALE, etc.)
318
+
319
+ ## Security
320
+
321
+ ### Credential Handling
322
+
323
+ - **Private keys** are never logged or exposed in error messages
324
+ - **JWT tokens** are automatically redacted from any error output
325
+ - **Issuer IDs** (UUIDs) are redacted from logs
326
+ - Token caching minimizes key usage (15-min tokens, refreshed at 10 min)
327
+
328
+ ### Path Validation
329
+
330
+ - P8 file paths are validated against directory traversal attacks (`..` not allowed)
331
+ - Only absolute paths are resolved
332
+
333
+ ### Best Practices
334
+
335
+ 1. **Never commit credentials** - Use environment variables or a secrets manager
336
+ 2. **Restrict API key permissions** - Use minimal required role (App Manager for most operations)
337
+ 3. **Rotate keys periodically** - Generate new API keys and revoke old ones
338
+ 4. **Secure your .p8 file** - Set file permissions to `600` (owner read/write only)
339
+
340
+ ```bash
341
+ chmod 600 /path/to/AuthKey.p8
342
+ ```
343
+
344
+ ## Troubleshooting
345
+
346
+ ### "Configuration error: APP_STORE_CONNECT_KEY_ID environment variable is required"
347
+
348
+ Ensure all required environment variables are set:
349
+ - `APP_STORE_CONNECT_KEY_ID`
350
+ - `APP_STORE_CONNECT_ISSUER_ID`
351
+ - `APP_STORE_CONNECT_P8_PATH` or `APP_STORE_CONNECT_P8_CONTENT`
352
+
353
+ ### "Failed to read private key"
354
+
355
+ 1. Verify the path in `APP_STORE_CONNECT_P8_PATH` is correct and absolute
356
+ 2. Check file permissions: `ls -la /path/to/AuthKey.p8`
357
+ 3. Ensure the file is a valid `.p8` from Apple (starts with `-----BEGIN PRIVATE KEY-----`)
358
+
359
+ ### "Authentication failed"
360
+
361
+ This usually means:
362
+ 1. The API key was revoked in App Store Connect
363
+ 2. The Key ID or Issuer ID doesn't match the .p8 file
364
+ 3. The .p8 file is corrupted or incomplete
365
+
366
+ ### "Rate limit exceeded"
367
+
368
+ The server includes built-in rate limiting (50 requests/minute). If you hit Apple's limits:
369
+ 1. Wait for the indicated retry time
370
+ 2. Batch your operations when possible
371
+ 3. The server automatically retries with exponential backoff
372
+
373
+ ### Tools Not Appearing in Claude
374
+
375
+ 1. Verify the server is running: check Claude Desktop logs
376
+ 2. Ensure the config file path is correct for your OS
377
+ 3. Restart Claude Desktop after config changes
378
+
379
+ ## Development
380
+
381
+ ### Prerequisites
382
+
383
+ - Node.js 20+
384
+ - npm or pnpm
385
+
386
+ ### Setup
387
+
388
+ ```bash
389
+ # Clone the repository
390
+ git clone https://github.com/SardorbekR/appstore-connect-mcp.git
391
+ cd appstore-connect-mcp
392
+
393
+ # Install dependencies
394
+ npm install
395
+
396
+ # Build
397
+ npm run build
398
+
399
+ # Run tests
400
+ npm test
401
+
402
+ # Lint
403
+ npm run lint
404
+
405
+ # Type check
406
+ npm run typecheck
407
+ ```
408
+
409
+ ### Project Structure
410
+
411
+ ```
412
+ src/
413
+ ├── index.ts # MCP server entry point
414
+ ├── auth/
415
+ │ └── jwt.ts # JWT token generation & caching
416
+ ├── api/
417
+ │ ├── client.ts # HTTP client with retry logic
418
+ │ └── types.ts # TypeScript interfaces
419
+ ├── tools/
420
+ │ ├── index.ts # Tool registry
421
+ │ ├── apps.tools.ts
422
+ │ ├── versions.tools.ts
423
+ │ ├── localizations.tools.ts
424
+ │ ├── app-info.tools.ts
425
+ │ ├── beta.tools.ts
426
+ │ ├── screenshots.tools.ts
427
+ │ ├── bundle-ids.tools.ts
428
+ │ ├── devices.tools.ts
429
+ │ ├── users.tools.ts
430
+ │ ├── builds.tools.ts
431
+ │ └── categories.tools.ts
432
+ └── utils/
433
+ ├── errors.ts # Error classes with redaction
434
+ └── validation.ts # Zod schemas
435
+ ```
436
+
437
+ ### Running Locally
438
+
439
+ ```bash
440
+ # Development mode with auto-reload
441
+ npm run dev
442
+
443
+ # Or run the built version
444
+ npm start
445
+ ```
446
+
447
+ ### Contributing
448
+
449
+ 1. Fork the repository
450
+ 2. Create a feature branch: `git checkout -b feature/my-feature`
451
+ 3. Make your changes and add tests
452
+ 4. Run `npm test` and `npm run lint`
453
+ 5. Submit a pull request
454
+
455
+ ## License
456
+
457
+ MIT License - see [LICENSE](LICENSE) for details.
458
+
459
+ ## Links
460
+
461
+ - [Security Policy](SECURITY.md)
462
+ - [App Store Connect API Documentation](https://developer.apple.com/documentation/appstoreconnectapi)
463
+ - [Model Context Protocol](https://modelcontextprotocol.io)
@@ -0,0 +1,2 @@
1
+
2
+ export { }