@ggaiteam/appstore-connect-mcp 1.0.2 → 1.0.4
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 +89 -40
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +2 -1
- package/dist/transport.js.map +1 -1
- package/dist/version.d.ts +8 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +22 -0
- package/dist/version.js.map +1 -0
- 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)
|
|
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
|
[](https://www.npmjs.com/package/@ggaiteam/appstore-connect-mcp)
|
|
6
8
|
[](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
|
-
- **
|
|
13
|
-
- **
|
|
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** —
|
|
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": "
|
|
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.
|
|
133
|
+
Restart your client.
|
|
98
134
|
|
|
99
|
-
## Usage
|
|
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
|
|
147
|
+
The AI uses `search_apis` → `get_tool_details` → `call_api` to discover and execute operations.
|
|
112
148
|
|
|
113
|
-
###
|
|
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
|
-
| `
|
|
119
|
-
| `
|
|
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
|
-
###
|
|
158
|
+
### How It Works
|
|
122
159
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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`
|
|
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
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
357
|
+
```bash
|
|
358
|
+
git tag v1.0.3
|
|
359
|
+
git push origin v1.0.3
|
|
360
|
+
```
|
|
313
361
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
-
###
|
|
369
|
+
### First-time setup (already done)
|
|
319
370
|
|
|
320
|
-
|
|
321
|
-
npm
|
|
322
|
-
|
|
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/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAW,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAW,MAAM,YAAY,CAAC;AAI1D,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CA8QjE"}
|
package/dist/server.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
13
13
|
import { ListToolsRequestSchema, CallToolRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
14
14
|
import { loadTools, executeTool } from "./tools.js";
|
|
15
|
+
import { SERVER_VERSION } from "./version.js";
|
|
15
16
|
export function createMcpServer(opts) {
|
|
16
17
|
const { credentials, verbose } = opts;
|
|
17
18
|
const toolsData = loadTools();
|
|
@@ -19,7 +20,7 @@ export function createMcpServer(opts) {
|
|
|
19
20
|
for (const t of toolsData.tools) {
|
|
20
21
|
toolMap.set(t.name, t);
|
|
21
22
|
}
|
|
22
|
-
const server = new Server({ name: "appstore-connect-mcp", version:
|
|
23
|
+
const server = new Server({ name: "appstore-connect-mcp", version: SERVER_VERSION }, { capabilities: { tools: {} } });
|
|
23
24
|
// ── Only register 4 tools ──────────────────────────────────────
|
|
24
25
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
25
26
|
return {
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAoB,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAoB,WAAW,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAO9C,MAAM,UAAU,eAAe,CAAC,IAAyB;IACvD,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;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K,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;IACnE,CAAC;IACD,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7E,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,CAAC,OAAO,CAAC,GAAG;YACjB,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE;SAC/C,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGxE,6DAA6D;AAC7D,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9D;AAED,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC;AAOzC;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,YAAY,EAAE,aAAa,EAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAuFf"}
|
package/dist/transport.js
CHANGED
|
@@ -7,6 +7,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
7
7
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
8
8
|
import express from "express";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
|
+
import { SERVER_VERSION } from "./version.js";
|
|
10
11
|
/** Start the server with stdio transport (for local use). */
|
|
11
12
|
export async function startStdio(server) {
|
|
12
13
|
const transport = new StdioServerTransport();
|
|
@@ -26,7 +27,7 @@ export async function startHttp(createServer, host, port) {
|
|
|
26
27
|
app.use(express.json({ limit: "50mb" }));
|
|
27
28
|
// Health check
|
|
28
29
|
app.get("/health", (_req, res) => {
|
|
29
|
-
res.json({ status: "ok", server: "appstore-connect-mcp", version:
|
|
30
|
+
res.json({ status: "ok", server: "appstore-connect-mcp", version: SERVER_VERSION });
|
|
30
31
|
});
|
|
31
32
|
// Session storage — each session has its own server + transport
|
|
32
33
|
const sessions = new Map();
|
package/dist/transport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,OAAO,MAAM,SAAS,CAAC;AA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AC;QACF,OAAO,CAAC,KAAK,CACX,iDAAiD,IAAI,IAAI,IAAI,SAAS,CACvE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* version.ts — Single source of truth for the server version.
|
|
3
|
+
*
|
|
4
|
+
* Reads from package.json at build time so the MCP serverInfo and
|
|
5
|
+
* health check always report the real package version.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SERVER_VERSION: string;
|
|
8
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,eAAO,MAAM,cAAc,QAAgB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* version.ts — Single source of truth for the server version.
|
|
3
|
+
*
|
|
4
|
+
* Reads from package.json at build time so the MCP serverInfo and
|
|
5
|
+
* health check always report the real package version.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { dirname, join } from "node:path";
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
function readVersion() {
|
|
12
|
+
try {
|
|
13
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
|
|
14
|
+
return pkg.version ?? "0.0.0";
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
// Fallback: package.json not available (e.g. running from dist without parent)
|
|
18
|
+
return "0.0.0";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export const SERVER_VERSION = readVersion();
|
|
22
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,SAAS,WAAW;IAClB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAC7D,CAAC;QACF,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,+EAA+E;QAC/E,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggaiteam/appstore-connect-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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",
|