Skip to main content
Glama
TrialAndErrorAI

App Store Connect MCP Server

App Store Connect MCP サーバー — コードモード

923 個のエンドポイント。2 つのツール。仕様そのものが実装です。

TypeScript MCP SDK License: MIT API Version

課題

従来の MCP サーバーは、各 API エンドポイントを個別のツールとしてラップしていました。Apple の App Store Connect API には 923 個のエンドポイント があります。つまり、923 個のツール定義、約 10 万トークン以上のコンテキスト、そして Apple がエンドポイントを追加するたびに新しいリリースが必要になることを意味します。

Related MCP server: mcp-appstore-connect

解決策

コードモード: 2 つのツールで 923 個を置き換えます

ツール

機能

search(code)

JS を記述して Apple の OpenAPI 仕様をクエリします。エンドポイントの発見、パラメータの確認、スキーマの読み取りを行います。

execute(code)

JS を記述して API を呼び出します。認証は自動です。複数の呼び出しをチェーンできます。

LLM がクエリを記述します。仕様そのものが実装です。エンドポイントの追加は、Apple が仕様を更新するだけで完了します。こちら側でのコード変更はゼロです。

Traditional MCP:  923 endpoints → 923 tools → ~100K tokens → constant maintenance
Code Mode:        923 endpoints → 2 tools   → ~1K tokens   → zero maintenance

クイックスタート

1. App Store Connect の認証情報を取得する

  1. App Store Connect → 「ユーザーとアクセス」 → 「統合」 → 「キー」に移動します。

  2. 「+」をクリックして新しいキーを生成します(管理者または財務ロール)。

  3. .p8 ファイルをダウンロードします(一度しかダウンロードできません!)。

  4. キー ID と発行者 ID を控えておきます。

2. Claude Code 経由でインストールする

claude mcp add appstore-connect -s user \
  -e APP_STORE_KEY_ID=YOUR_KEY_ID \
  -e APP_STORE_ISSUER_ID=YOUR_ISSUER_ID \
  -e APP_STORE_P8_PATH=/absolute/path/to/AuthKey_XXXXXXXXXX.p8 \
  -e APP_STORE_VENDOR_NUMBER=YOUR_VENDOR_NUMBER \
  -- npx -y @trialanderror-ai/appstore-connect-mcp

-s user を指定すると、すべてのプロジェクトでサーバーが利用可能になります。財務レポートが不要な場合は -e APP_STORE_VENDOR_NUMBER を削除してください。

または、環境変数のインライン形式をスキップして、シェルや MCP 設定で設定することもできます(下記参照)。

3. 認証情報を設定する

3 つの必須環境変数(および 1 つのオプション):

変数

説明

APP_STORE_KEY_ID

10 文字のキー ID

APP_STORE_ISSUER_ID

UUID 発行者 ID

APP_STORE_P8_PATH

.p8 ファイルへの絶対パス

APP_STORE_VENDOR_NUMBER (オプション)

財務レポートに必要

Claude Code 用の設定

シェルで環境変数を設定するか、.mcp.json 経由で渡します:

{
  "mcpServers": {
    "appstore-connect": {
      "command": "npx",
      "args": ["-y", "@trialanderror-ai/appstore-connect-mcp"],
      "env": {
        "APP_STORE_KEY_ID": "YOUR_KEY_ID",
        "APP_STORE_ISSUER_ID": "YOUR_ISSUER_ID",
        "APP_STORE_P8_PATH": "/path/to/AuthKey_XXXXXXXXXX.p8",
        "APP_STORE_VENDOR_NUMBER": "YOUR_VENDOR_NUMBER"
      }
    }
  }
}

Claude Desktop 用の設定

~/Library/Application Support/Claude/claude_desktop_config.json に追加します:

{
  "mcpServers": {
    "appstore-connect": {
      "command": "npx",
      "args": ["-y", "@trialanderror-ai/appstore-connect-mcp"],
      "env": {
        "APP_STORE_KEY_ID": "YOUR_KEY_ID",
        "APP_STORE_ISSUER_ID": "YOUR_ISSUER_ID",
        "APP_STORE_P8_PATH": "/path/to/AuthKey_XXXXXXXXXX.p8"
      }
    }
  }
}

ソースからビルドする(代替手段)

git clone https://github.com/TrialAndErrorAI/appstore-connect-mcp
cd appstore-connect-mcp
npm install
npm run build

その後、MCP 設定で npx の代わりに node /path/to/appstore-connect-mcp/dist/index.js を指定します。

使用例

エンドポイントの発見

search: "Find all endpoints related to customer reviews"

LLM は次のように記述します:

const reviews = Object.entries(spec.paths)
  .filter(([p]) => p.includes('customerReview'))
  .map(([path, methods]) => ({
    path,
    methods: Object.keys(methods).map(m => m.toUpperCase())
  }));
return reviews;

アプリの一覧表示

execute: "List all my apps"

LLM は次のように記述します:

const apps = await api.request({ method: 'GET', path: '/v1/apps' });
return apps.data.map(a => ({ id: a.id, name: a.attributes.name }));

複数の呼び出しをチェーンする

execute: "Get latest reviews for my first app"

LLM は次のように記述します:

const apps = await api.request({ method: 'GET', path: '/v1/apps', params: { limit: '1' } });
const appId = apps.data[0].id;
const reviews = await api.request({
  method: 'GET',
  path: `/v1/apps/${appId}/customerReviews`,
  params: { limit: '5', sort: '-createdDate' }
});
return {
  app: apps.data[0].attributes.name,
  reviews: reviews.data.map(r => ({
    rating: r.attributes.rating,
    title: r.attributes.title,
    body: r.attributes.body
  }))
};

アクセス可能な内容

以下を含む、923 個すべての App Store Connect API エンドポイント:

カテゴリ

エンドポイント数

取得できる内容

アプリメタデータ

29

タイトル、サブタイトル、キーワード、説明 — 読み取りおよび書き込み

分析

10

インプレッション、ページビュー、ダウンロード、ソース属性

売上・財務

2

国別の収益、ユニット数、売上高

カスタマーレビュー

5

評価、レビューテキスト、レビューへの返信

サブスクリプション

30

サブ管理、価格設定、グループ、オファー

アプリ内課金

29

IAP 管理、オファーコード

バージョン

28

バージョン管理、段階的リリース

スクリーンショット

12

アップロード、並べ替え、スクリーンショットセットの管理

A/B テスト

24

プロダクトページ実験、バリアントの処理

カスタムプロダクトページ

18

広告キャンペーンごとのカスタムランディングページ

TestFlight

23

ベータグループ、テスター、ビルド

価格設定

11

地域ごとの価格設定、価格ポイント

ビルド

29

ビルド管理、処理状態

グループ化された完全なマップについては API-COVERAGE.md を参照してください。

仕組み

Claude writes JavaScript
    │
    ▼
┌─────────────────────────────────────────────────┐
│ search({ code })                                │
│  Sandbox executes code against OpenAPI spec     │
│  923 paths, 1337 schemas — pre-resolved $refs   │
│  Returns: matching endpoints + parameters       │
└─────────────────────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────────────────────┐
│ execute({ code })                               │
│  Sandbox executes code against auth'd client    │
│  JWT injected — code never sees credentials     │
│  Supports GET/POST/PATCH/DELETE + chaining      │
│  Auto-decompresses gzipped report responses     │
│  Returns: API response (truncated to 40K chars) │
└─────────────────────────────────────────────────┘

セキュリティ

  • コードは Node.js の vm サンドボックス内で実行されます

  • fetchrequireprocessevalsetTimeout は使用できません

  • 認証情報はバインディング経由で注入され、生成されたコードからは決して見えません

  • コンテキストの肥大化を防ぐため、レスポンスは切り詰められます

  • グローバルとして利用できるのは spec (検索) または api (実行) のみです

アーキテクチャ

src/
├── auth/jwt-manager.ts      — JWT with P8 key, ES256, 19-min cache
├── api/client.ts             — HTTP client, rate limiting, gzip handling
├── spec/
│   ├── openapi.json          — Apple's official spec (923 endpoints)
│   └── loader.ts             — Loads + resolves $refs for flat traversal
├── executor/sandbox.ts       — vm-based sandboxed execution
├── server/mcp-server.ts      — MCP server (search, execute, test_connection)
└── index.ts                  — Entry point

なぜコードモードなのか?

従来の MCP

コードモード

ツール

エンドポイントごとに 1 つ (923)

合計 2 つ

コンテキストトークン

約 10 万以上

約 1,000

エンドポイントの追加

新しいツール + コード + スキーマ + リリース

Apple が仕様を更新。変更ゼロ。

呼び出しのチェーン

呼び出しごとに LLM を再介入

1 回の実行で複数呼び出し

メンテナンス

923 個のツール定義を更新

1 つの仕様ファイルを更新

Cloudflare のコードモードパターン に着想を得ています。

開発

npm install          # Install dependencies
npm run build        # Compile + copy spec
npm run dev          # Watch mode (tsx)
npm start            # Run compiled server
npm run type-check   # TypeScript check

ライセンス

MIT — 使用、変更、販売は自由です。ただ、動くようにしてください。

クレジット

Trial and Error Inc によって構築されました。iOS、Android、Web 向けの AI 搭載ホームデザインアプリ RenovateAI で本番環境で使用されています。コードモードのパターンは Cloudflare によるものです。


「私たちは個々のエンドポイントを実装するのではなく、あらゆるエンドポイントを呼び出す能力を実装します。」

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TrialAndErrorAI/appstore-connect-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server