Skip to content

cristianoaredes/mcp-apple-store

Repository files navigation

MCP Apple Store Server

License: MIT Node.js TypeScript MCP

A comprehensive Model Context Protocol (MCP) server for Apple App Store Server API and App Store Connect API

English | Portugues


Overview

MCP Apple Store Server provides AI assistants (like Claude) with direct access to Apple's APIs through the Model Context Protocol. Manage your iOS/macOS apps, subscriptions, TestFlight, provisioning profiles, and more - all through natural language commands.

Key Features

  • 83+ MCP Tools covering both App Store Server API and App Store Connect API
  • Full CRUD Operations for apps, subscriptions, IAPs, and more
  • Real-time Data access to transactions, reviews, analytics
  • Secure Authentication using Apple's JWT-based auth
  • Rate Limiting built-in to respect Apple's API limits
  • Type-Safe complete TypeScript implementation with Zod validation

Supported APIs

App Store Server API (StoreKit 2)

  • Transaction history and verification
  • Subscription status management
  • Refund history lookup
  • Order lookups
  • Consumption information
  • Server notifications (webhooks)

App Store Connect API

Category Tools Description
Apps 6 List, get, create, update apps
TestFlight 5 Builds, beta testers, beta groups
Provisioning 7 Certificates, profiles, devices, bundle IDs
Users 2 Team members and invitations
In-App Purchases 11 IAPs, subscription groups, subscriptions
Reviews 7 Customer reviews and responses
Analytics 4 Sales reports, finance reports
Events 8 In-app events management
Submission 13 App versions and App Store submission

Quick Start

Prerequisites

  • Node.js 18+
  • Apple Developer Program membership
  • App Store Connect API Key (with appropriate permissions)

Installation

# Clone the repository
git clone https://github.com/AreDesX/mcp-apple-store.git
cd mcp-apple-store

# Install dependencies
npm install

# Run interactive setup wizard
npm run setup

# Build the project
npm run build

Setup Wizard

The setup wizard will guide you through:

  1. API Key Creation - Step-by-step instructions to create your key in App Store Connect
  2. Credential Configuration - Automatically configures your .env file
  3. App Selection - Choose which app to manage
  4. MCP Client Setup - Configures Claude Desktop or other MCP clients
npm run setup

Manual Configuration

Create a .env file with your credentials:

# Required: App Store Connect API credentials
APP_STORE_ISSUER_ID=your-issuer-id
APP_STORE_KEY_ID=your-key-id
APP_STORE_PRIVATE_KEY_PATH=./keys/AuthKey_XXXXXXXX.p8

# Required: Your app identifiers
APP_BUNDLE_ID=com.yourcompany.yourapp
APP_APPLE_ID=1234567890

# Optional: Environment (Production or Sandbox)
APP_STORE_ENVIRONMENT=Sandbox

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "apple-store": {
      "command": "node",
      "args": ["/path/to/mcp-apple-store/dist/index.js"],
      "env": {
        "APP_STORE_ISSUER_ID": "your-issuer-id",
        "APP_STORE_KEY_ID": "your-key-id",
        "APP_STORE_PRIVATE_KEY_PATH": "/path/to/AuthKey.p8",
        "APP_BUNDLE_ID": "com.yourcompany.yourapp",
        "APP_APPLE_ID": "1234567890",
        "APP_STORE_ENVIRONMENT": "Sandbox"
      }
    }
  }
}

Claude Code (CLI)

Add to your MCP settings:

{
  "mcpServers": {
    "apple-store": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/mcp-apple-store",
      "env": {
        "APP_STORE_ISSUER_ID": "your-issuer-id",
        "APP_STORE_KEY_ID": "your-key-id",
        "APP_STORE_PRIVATE_KEY_PATH": "./keys/AuthKey.p8",
        "APP_BUNDLE_ID": "com.yourcompany.yourapp",
        "APP_APPLE_ID": "1234567890"
      }
    }
  }
}

Available Tools

App Store Server API Tools

Tool Description
get_subscription_status Get subscription status for a transaction
check_active_subscription Check if user has active subscription
get_subscription_by_product Get subscription by product ID
get_transaction_history Get user's transaction history
get_transaction_info Get specific transaction details
lookup_order Look up order by order ID
get_refund_history Get refund history for user
verify_transaction Verify transaction authenticity
send_consumption_info Send consumption data to Apple
request_test_notification Request test server notification

App Store Connect API Tools

Apps (6 tools)
Tool Description
connect_list_apps List all apps in your account
connect_get_app Get app details
connect_list_app_versions List app versions
connect_get_app_info Get app information with localizations
connect_create_app Create a new app
connect_update_app Update app settings
TestFlight (5 tools)
Tool Description
connect_list_builds List builds
connect_get_build Get build details
connect_list_beta_testers List beta testers
connect_add_beta_tester Add beta tester
connect_list_beta_groups List beta groups
Provisioning (7 tools)
Tool Description
connect_list_certificates List signing certificates
connect_list_profiles List provisioning profiles
connect_list_bundle_ids List bundle IDs
connect_list_devices List registered devices
connect_register_device Register new device
connect_create_bundle_id Create bundle ID
connect_enable_capability Enable app capability
In-App Purchases (11 tools)
Tool Description
connect_list_iap List in-app purchases
connect_get_iap Get IAP details
connect_create_iap Create in-app purchase
connect_delete_iap Delete in-app purchase
connect_list_subscription_groups List subscription groups
connect_get_subscription_group Get subscription group details
connect_create_subscription_group Create subscription group
connect_delete_subscription_group Delete subscription group
connect_create_subscription Create subscription
connect_delete_subscription Delete subscription
connect_create_iap_localization Create IAP localization
Reviews (7 tools)
Tool Description
connect_list_reviews List customer reviews
connect_get_review Get review details
connect_get_review_summary Get review summary
connect_get_unanswered_reviews Get unanswered reviews
connect_respond_to_review Respond to review
connect_update_review_response Update review response
connect_delete_review_response Delete review response
Analytics (4 tools)
Tool Description
connect_get_sales_report Get sales reports
connect_get_daily_sales Get daily sales data
connect_get_subscription_report Get subscription reports
connect_get_finance_report Get finance reports
Events (8 tools)
Tool Description
connect_list_events List in-app events
connect_get_event Get event details
connect_create_event Create in-app event
connect_update_event Update event
connect_delete_event Delete event
connect_create_event_localization Create event localization
connect_get_active_events Get active events
connect_get_draft_events Get draft events
Submission (13 tools)
Tool Description
connect_list_versions List app versions
connect_get_version Get version details
connect_create_version Create new version
connect_update_version Update version
connect_delete_version Delete version
connect_submit_for_review Submit for App Store review
connect_cancel_submission Cancel submission
connect_attach_build Attach build to version
connect_update_version_localization Update version localization
connect_set_review_info Set review information
connect_create_phased_release Create phased release
connect_update_phased_release Update phased release
connect_get_submission_status Get submission status

Usage Examples

List Your Apps

"List all my apps in App Store Connect"

Create a Subscription Group

"Create a subscription group called 'Premium' for app 6755709202"

Create a Subscription

"Create a monthly subscription called 'Premium Monthly' with product ID 'com.app.premium_monthly' in subscription group 21841364"

Check Subscription Status

"Check if the subscription with transaction ID 123456789 is active"

Get Sales Report

"Get sales report for the last 7 days"

Register a Test Device

"Register my iPhone with UDID 00008101-001234567890001E as 'Dev iPhone 15'"

Respond to a Review

"List unanswered reviews for my app and respond to the most recent one-star review"

Submit App for Review

"Submit version 1.0 of my app for App Store review"

Project Structure

mcp-apple-store/
├── src/
│   ├── api/
│   │   ├── connect/           # App Store Connect API
│   │   │   ├── client.ts      # Connect API client
│   │   │   ├── apps-api.ts
│   │   │   ├── iap-api.ts
│   │   │   ├── testflight-api.ts
│   │   │   ├── provisioning-api.ts
│   │   │   ├── users-api.ts
│   │   │   ├── reviews-api.ts
│   │   │   ├── analytics-api.ts
│   │   │   ├── events-api.ts
│   │   │   ├── submission-api.ts
│   │   │   └── types/
│   │   ├── client.ts          # Server API client
│   │   ├── subscriptions.ts
│   │   └── transactions.ts
│   ├── auth/
│   │   ├── jwt-generator.ts   # Server API JWT
│   │   └── connect-jwt.ts     # Connect API JWT
│   ├── tools/
│   │   ├── connect/           # Connect API MCP tools
│   │   │   ├── apps-tools.ts
│   │   │   ├── iap-tools.ts
│   │   │   ├── testflight-tools.ts
│   │   │   ├── provisioning-tools.ts
│   │   │   ├── users-tools.ts
│   │   │   ├── reviews-tools.ts
│   │   │   ├── analytics-tools.ts
│   │   │   ├── events-tools.ts
│   │   │   └── submission-tools.ts
│   │   ├── subscription-tools.ts
│   │   └── transaction-tools.ts
│   ├── utils/
│   │   ├── rate-limiter.ts
│   │   └── pagination.ts
│   ├── webhooks/              # Server notification handlers
│   │   ├── handler.ts
│   │   ├── verifier.ts
│   │   └── types.ts
│   ├── config.ts
│   ├── server.ts              # MCP server
│   └── index.ts
├── keys/                      # API keys (gitignored)
├── scripts/
│   └── setup-credentials.ts   # Setup wizard
├── package.json
└── tsconfig.json

API Differences

Feature App Store Server API App Store Connect API
Purpose Transactions, subscriptions App management
Base URL api.storekit.itunes.apple.com api.appstoreconnect.apple.com/v1
JWT claim Requires bid (bundleId) No bid claim
Response format JWS (signed JSON) JSON:API
Rate limit 50/min 3600/hour

JWT Differences

Server API JWT (with bundleId):

{
  iss: issuerId,
  iat: timestamp,
  exp: timestamp + 1200,
  aud: 'appstoreconnect-v1',
  bid: bundleId  // Required for Server API
}

Connect API JWT (without bundleId):

{
  iss: issuerId,
  iat: timestamp,
  exp: timestamp + 1200,
  aud: 'appstoreconnect-v1'
  // No 'bid' claim
}

Development

Build

npm run build

Development Mode

npm run dev

Type Checking

npm run typecheck

Testing

npm test
npm run test:run
npm run test:coverage

Linting

npm run lint

Security

  • Never commit your API keys - The keys/ directory is gitignored
  • Use environment variables - Store credentials in .env (also gitignored)
  • Minimum permissions - Create API keys with only the permissions you need
  • Rotate keys regularly - Especially for production environments

Required API Key Permissions

Permission Required For
App Manager Apps, Versions, Submissions
Developer TestFlight, Builds
Admin Users, Provisioning
Finance Sales Reports, Finance Reports

Troubleshooting

"The specified resource does not exist"

This error typically means the API URL is malformed. Make sure you're using the latest version with the URL building fix.

"403 Forbidden" on app creation

Apple restricts app creation via API for some accounts. Create apps manually in App Store Connect, then use the API for everything else.

Rate Limiting

The server includes built-in rate limiting (3600 requests/hour for Connect API). If you hit limits, the server will automatically retry with exponential backoff.

JWT Errors

  • Verify your Issuer ID is correct (found in App Store Connect > Users and Access > Integrations > Keys)
  • Ensure your Key ID matches the downloaded .p8 file
  • Check that the private key file path is correct and readable

Environment Variables Not Loading

Make sure you're either:

  1. Using the .env file in the project root
  2. Passing environment variables through your MCP client configuration

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Roadmap

  • App Store Pricing API support
  • Subscription offer codes management
  • Promotional offers
  • Game Center integration
  • App Clips management
  • Custom Product Pages

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Support


Built with love for the Apple Developer community

Made by Cristiano Aredes

About

MCP Server for Apple App Store Server API and App Store Connect API

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published