@ggaiteam/appstore-connect-mcp 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +89 -40
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # App Store Connect MCP
2
2
 
3
- A [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes the entire **Apple App Store Connect API** (1,200+ operations) as MCP tools. Query apps, manage builds, handle submissions, read analytics, manage users, and more — all from your AI assistant.
3
+ A [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes the entire **Apple App Store Connect API** (1,200+ operations) via 4 lightweight MCP tools. Query apps, manage builds, handle submissions, read analytics, manage users, and more — all from your AI assistant.
4
+
5
+ > **Why only 4 tools?** Registering 1,216 tools would consume ~140K tokens of LLM context, making the server unusable. Instead, the LLM uses `search_apis` → `get_tool_details` → `call_api` to discover and execute any operation on demand — keeping context tiny while maintaining full API coverage.
4
6
 
5
7
  [![npm version](https://img.shields.io/npm/v/@ggaiteam/appstore-connect-mcp.svg)](https://www.npmjs.com/package/@ggaiteam/appstore-connect-mcp)
6
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -9,11 +11,13 @@ A [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes
9
11
  ## Features
10
12
 
11
13
  - **Complete API coverage** — all 1,216 operations from the App Store Connect API v4.4
12
- - **Tool search** — `search_apis` meta-tool to find the right operation among 1,200+
13
- - **Two transports** — `stdio` for local use (Claude Desktop, Cursor), `HTTP` for remote deployment
14
+ - **Context-friendly** — only 4 MCP tools registered (not 1,216), protecting LLM context window
15
+ - **Tool discovery workflow** — `search_apis` → `get_tool_details` → `call_api`
16
+ - **Response truncation** — large API responses truncated at 25KB to fit LLM context
17
+ - **Two transports** — `stdio` for local use (ggcode, Claude Desktop, Cursor), `HTTP` for remote deployment
14
18
  - **JWT authentication** — automatic ES256 token generation and caching
15
19
  - **Docker ready** — multi-stage Dockerfile with health checks
16
- - **Auto-publish** — GitHub Actions workflow for npm publishing on release
20
+ - **Auto-publish** — push a git tag `v1.x.x` to publish to npm (OIDC, no token needed)
17
21
 
18
22
  ## Quick Start
19
23
 
@@ -50,6 +54,37 @@ docker pull ghcr.io/topcheer/appstore-connect-mcp:latest
50
54
 
51
55
  ### 3. Configure Your MCP Client
52
56
 
57
+ #### ggcode (topcheer/ggcode) — Recommended
58
+
59
+ Add to `~/.ggcode/ggcode.yaml` under `mcp_servers`:
60
+
61
+ ```yaml
62
+ mcp_servers:
63
+ - args:
64
+ - -y
65
+ - '@ggaiteam/appstore-connect-mcp@latest'
66
+ command: npx
67
+ env:
68
+ APP_STORE_CONNECT_ISSUER_ID: your-issuer-id-here
69
+ APP_STORE_CONNECT_KEY_ID: your-key-id-here
70
+ APP_STORE_CONNECT_P8_FILE: /path/to/AuthKey_XXXXXXXXXX.p8
71
+ name: appstore-connect
72
+ type: stdio
73
+ ```
74
+
75
+ Restart ggcode. The 4 MCP tools (`search_apis`, `get_tool_details`, `call_api`, `list_categories`) will be available immediately.
76
+
77
+ **Example session in ggcode:**
78
+
79
+ ```
80
+ > 列出我的 App Store Connect 应用列表
81
+
82
+ # ggcode will:
83
+ # 1. call_api("apps_getCollection", {arguments: {limit: 50}})
84
+ # 2. For each app, call_api("appStoreVersions_getToManyRelated", ...)
85
+ # 3. Summarize the results
86
+ ```
87
+
53
88
  #### Claude Desktop
54
89
 
55
90
  Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
@@ -58,7 +93,8 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
58
93
  {
59
94
  "mcpServers": {
60
95
  "appstore-connect": {
61
- "command": "appstore-connect-mcp",
96
+ "command": "npx",
97
+ "args": ["-y", "@ggaiteam/appstore-connect-mcp"],
62
98
  "env": {
63
99
  "APP_STORE_CONNECT_ISSUER_ID": "your-issuer-id",
64
100
  "APP_STORE_CONNECT_KEY_ID": "your-key-id",
@@ -78,7 +114,7 @@ Add to your Cursor MCP settings:
78
114
  "mcpServers": {
79
115
  "appstore-connect": {
80
116
  "command": "npx",
81
- "args": ["@ggaiteam/appstore-connect-mcp"],
117
+ "args": ["-y", "@ggaiteam/appstore-connect-mcp"],
82
118
  "env": {
83
119
  "APP_STORE_CONNECT_ISSUER_ID": "your-issuer-id",
84
120
  "APP_STORE_CONNECT_KEY_ID": "your-key-id",
@@ -94,9 +130,9 @@ Add to your Cursor MCP settings:
94
130
  > "APP_STORE_CONNECT_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIGTAg...\n-----END PRIVATE KEY-----"
95
131
  > ```
96
132
 
97
- Restart your client. You should now have access to all App Store Connect API tools.
133
+ Restart your client.
98
134
 
99
- ## Usage Examples
135
+ ## Usage
100
136
 
101
137
  Once connected, ask your AI assistant:
102
138
 
@@ -108,25 +144,38 @@ Once connected, ask your AI assistant:
108
144
 
109
145
  > "Search for subscription-related API operations"
110
146
 
111
- The AI uses the `search_apis` meta-tool to discover available operations, then calls them.
147
+ The AI uses `search_apis` → `get_tool_details` → `call_api` to discover and execute operations.
112
148
 
113
- ### Meta-Tools
149
+ ### 4 MCP Tools
114
150
 
115
151
  | Tool | Description |
116
152
  |------|-------------|
117
- | `search_apis` | Search API operations by keyword, category, or HTTP method |
118
- | `list_categories` | List all 192 API resource categories |
119
- | `get_tool_details` | Get full parameter details for a specific operation |
153
+ | `search_apis` | Search 1,216 API operations by keyword, category, or HTTP method |
154
+ | `get_tool_details` | Get full parameter schema + usage example for one operation |
155
+ | `call_api` | Execute any API operation by name + arguments |
156
+ | `list_categories` | List all 192 API resource categories with operation counts |
120
157
 
121
- ### Example Tool Calls
158
+ ### How It Works
122
159
 
123
- The AI can call tools like:
124
- - `apps_getCollection` — list all apps
125
- - `builds_getCollection` — list builds with filters
126
- - `appStoreVersions_getCollection` — get app versions
127
- - `betaTesters_getCollection` — list beta testers
128
- - `salesReports_getCollection` — download sales reports
129
- - `userInvitations_createInstance` — invite a new team member
160
+ ```
161
+ User: "List my apps"
162
+ ↓
163
+ AI calls: search_apis("apps")
164
+ → finds: apps_getCollection (GET /v1/apps)
165
+ ↓
166
+ AI calls: call_api("apps_getCollection", {arguments: {limit: 10}})
167
+ → returns: [{name: "MyApp", bundleId: "com.example.myapp"}, ...]
168
+ ```
169
+
170
+ ### Common Operations
171
+
172
+ | What | Operation |
173
+ |------|----------|
174
+ | List apps | `call_api("apps_getCollection", {})` |
175
+ | List builds | `call_api("builds_getCollection", {arguments: {"filter[preReleaseVersion.build.app]": "app-id"}})` |
176
+ | App versions | `call_api("appStoreVersions_getCollection", {arguments: {"filter[app]": "app-id"}})` |
177
+ | Beta testers | `call_api("betaTesters_getCollection", {})` |
178
+ | Sales reports | `call_api("salesReports_getCollection", {arguments: {"filter[frequency]": "DAILY"}})` |
130
179
 
131
180
  ## Remote Deployment (HTTP Mode)
132
181
 
@@ -233,9 +282,9 @@ appstore-connect-mcp --verbose
233
282
  ```
234
283
 
235
284
  - **Tool data** is generated from Apple's OpenAPI spec (`scripts/generate-tools.py`)
236
- - **Runtime** loads `tools.json` and registers all tools dynamically
285
+ - **Runtime** loads `tools.json` (1,216 ops) but only registers 4 MCP tools
237
286
  - **JWT tokens** are cached and auto-refreshed (20-minute TTL)
238
- - **Responses** are truncated at 50KB to fit LLM context windows
287
+ - **Responses** are truncated at 25KB to fit LLM context windows
239
288
 
240
289
  ### Regenerating Tools
241
290
 
@@ -283,7 +332,7 @@ npm start
283
332
  │ └── install.sh # One-line installer
284
333
  ├── src/
285
334
  │ ├── index.ts # Entry point + CLI
286
- │ ├── server.ts # MCP server (tool registry + dispatch)
335
+ │ ├── server.ts # MCP server (4 tools: search/details/call/list)
287
336
  │ ├── transport.ts # stdio + HTTP transports
288
337
  │ ├── auth.ts # JWT (ES256) token generation
289
338
  │ ├── client.ts # App Store Connect API client
@@ -301,27 +350,27 @@ npm start
301
350
 
302
351
  ## npm Publishing
303
352
 
304
- Publishing is automated via GitHub Actions:
353
+ Publishing is fully automated via GitHub Actions with OIDC trusted publishing — **no NPM_TOKEN needed**.
305
354
 
306
- 1. **Create a release** on GitHub (tag format: `v1.0.0`)
307
- 2. The `npm-publish.yml` workflow automatically:
308
- - Builds the package
309
- - Publishes to npm
310
- - With [provenance](https://docs.npmjs.com/generating-provenance-statements)
355
+ ### Release a new version
311
356
 
312
- ### First-time Setup
357
+ ```bash
358
+ git tag v1.0.3
359
+ git push origin v1.0.3
360
+ ```
313
361
 
314
- 1. Create an npm access token: https://www.npmjs.com/settings/~/tokens
315
- 2. Add it as a repository secret: `NPM_TOKEN`
316
- 3. Create a GitHub release — done!
362
+ That's it. The workflow will:
363
+ 1. Extract version from the tag
364
+ 2. Check if version already exists on npm (skip if so)
365
+ 3. Build the package
366
+ 4. Publish to npm with `--provenance=false --access public`
367
+ 5. Auto-create a GitHub Release
317
368
 
318
- ### Manual Publishing
369
+ ### First-time setup (already done)
319
370
 
320
- ```bash
321
- npm version patch # or minor/major
322
- npm run build
323
- npm publish
324
- ```
371
+ 1. Package must exist on npm (first publish is manual: `npm publish --access public`)
372
+ 2. Configure trusted publishing on npm: link the package to `topcheer/appstore-connect-mcp`
373
+ 3. No NPM_TOKEN secret needed — OIDC handles authentication
325
374
 
326
375
  ## API Coverage
327
376
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggaiteam/appstore-connect-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for the Apple App Store Connect API — exposes all 1200+ operations as MCP tools. Supports local (stdio) and remote (HTTP) deployment.",
5
5
  "license": "MIT",
6
6
  "author": "appstore-connect-mcp contributors",