Skip to main content
Glama
README.md
# MCP Server for Apple App Store Connect API and App Store Server API

<div align="center">

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6+-blue.svg)](https://www.typescriptlang.org/)
[![MCP](https://img.shields.io/badge/MCP-1.0-purple.svg)](https://modelcontextprotocol.io/)
[![npm version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/cristianoaredes/mcp-apple-store)

**Give Claude and other AI assistants full access to your iOS apps via the Model Context Protocol.**

[English](README.md) | [Português](README.pt-BR.md)

</div>

---

## What is this?

`mcp-apple-store` is a **Model Context Protocol (MCP) server** that connects AI assistants like Claude directly to Apple's developer APIs. Once configured, you can manage your iOS and macOS apps using plain English — no scripting or manual API calls required.

It wraps two official Apple APIs:

- **App Store Connect API** — manage apps, TestFlight builds, provisioning profiles, in-app purchases, reviews, analytics, and submissions.
- **App Store Server API (StoreKit 2)** — verify transactions, check subscription status, look up orders, and retrieve refund history.

Both APIs are exposed as **69+ MCP tools**, each discoverable and callable by any MCP-compatible client.

---

## Features

- **69+ MCP tools** covering the full App Store Connect and App Store Server API surface
- **Transaction and subscription management** — verify purchases, check active subscriptions, retrieve refund history
- **Full app lifecycle control** — create versions, attach builds, submit for review, manage phased releases
- **TestFlight automation** — list builds, manage beta testers and beta groups
- **Provisioning management** — certificates, profiles, bundle IDs, and device registration
- **In-app purchase management** — create and manage IAPs, subscription groups, and subscriptions
- **Customer review handling** — list, respond to, and update review responses
- **Sales and finance reports** — daily sales, subscription reports, and finance data
- **In-app events** — create, update, and publish time-sensitive events
- **Setup wizard** — interactive CLI to configure credentials in minutes
- **Built-in rate limiting** — respects Apple's API limits with automatic retry and exponential backoff
- **Type-safe** — full TypeScript with Zod validation on all inputs

---

## Supported APIs and Tools

### App Store Server API (StoreKit 2)

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

### App Store Connect API

<details>
<summary><b>Apps (6 tools)</b></summary>

| 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 info with localizations |
| `connect_create_app` | Create a new app |
| `connect_update_app` | Update app settings |

</details>

<details>
<summary><b>TestFlight (5 tools)</b></summary>

| 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 a beta tester |
| `connect_list_beta_groups` | List beta groups |

</details>

<details>
<summary><b>Provisioning (7 tools)</b></summary>

| 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 a new device |
| `connect_create_bundle_id` | Create a bundle ID |
| `connect_enable_capability` | Enable an app capability |

</details>

<details>
<summary><b>In-App Purchases (11 tools)</b></summary>

| Tool | Description |
|------|-------------|
| `connect_list_iap` | List in-app purchases |
| `connect_get_iap` | Get IAP details |
| `connect_create_iap` | Create an in-app purchase |
| `connect_delete_iap` | Delete an in-app purchase |
| `connect_list_subscription_groups` | List subscription groups |
| `connect_get_subscription_group` | Get subscription group details |
| `connect_create_subscription_group` | Create a subscription group |
| `connect_delete_subscription_group` | Delete a subscription group |
| `connect_create_subscription` | Create a subscription |
| `connect_delete_subscription` | Delete a subscription |
| `connect_create_iap_localization` | Create IAP localization |

</details>

<details>
<summary><b>Customer Reviews (7 tools)</b></summary>

| 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 a review |
| `connect_update_review_response` | Update a review response |
| `connect_delete_review_response` | Delete a review response |

</details>

<details>
<summary><b>Analytics (4 tools)</b></summary>

| 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 |

</details>

<details>
<summary><b>In-App Events (8 tools)</b></summary>

| Tool | Description |
|------|-------------|
| `connect_list_events` | List in-app events |
| `connect_get_event` | Get event details |
| `connect_create_event` | Create an in-app event |
| `connect_update_event` | Update an event |
| `connect_delete_event` | Delete an event |
| `connect_create_event_localization` | Create event localization |
| `connect_get_active_events` | Get active events |
| `connect_get_draft_events` | Get draft events |

</details>

<details>
<summary><b>App Submission (13 tools)</b></summary>

| Tool | Description |
|------|-------------|
| `connect_list_versions` | List app versions |
| `connect_get_version` | Get version details |
| `connect_create_version` | Create a new version |
| `connect_update_version` | Update a version |
| `connect_delete_version` | Delete a version |
| `connect_submit_for_review` | Submit for App Store review |
| `connect_cancel_submission` | Cancel a submission |
| `connect_attach_build` | Attach a build to a version |
| `connect_update_version_localization` | Update version localization |
| `connect_set_review_info` | Set review information |
| `connect_create_phased_release` | Create a phased release |
| `connect_update_phased_release` | Update a phased release |
| `connect_get_submission_status` | Get submission status |

</details>

---

## Requirements

- **Node.js 18+**
- **Apple Developer Program** membership
- **App Store Connect API Key** (with the appropriate role permissions)

### API Key Permissions

| Permission | Required for |
|------------|--------------|
| App Manager | Apps, versions, submissions |
| Developer | TestFlight, builds |
| Admin | Users, provisioning |
| Finance | Sales reports, finance reports |

---

## Installation

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

# Install dependencies
npm install

# Run the interactive setup wizard
npm run setup

# Build the project
npm run build
```

The setup wizard walks you through creating your API key in App Store Connect, writing the `.env` file, and configuring Claude Desktop or Claude Code automatically.

### Manual Configuration

If you prefer to skip the wizard, create a `.env` file in the project root:

```env
# App Store Connect API credentials (required)
APP_STORE_ISSUER_ID=your-issuer-id
APP_STORE_KEY_ID=your-key-id
APP_STORE_PRIVATE_KEY_PATH=./keys/AuthKey_XXXXXXXX.p8

# Your app identifiers (required)
APP_BUNDLE_ID=com.yourcompany.yourapp
APP_APPLE_ID=1234567890

# Environment: Production or Sandbox (optional, defaults to Sandbox)
APP_STORE_ENVIRONMENT=Sandbox
```

---

## MCP Client Configuration

### Claude Desktop

Add the following to your `claude_desktop_config.json`:

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

```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)

```json
{
  "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"
      }
    }
  }
}
```

---

## Usage Examples

Once the MCP server is running and connected to your AI client, you can use plain English to interact with Apple's APIs.

**List your apps:**
```
List all my apps in App Store Connect
```

**Check subscription status:**
```
Check if the subscription with transaction ID 1000000123456789 is active
```

**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
```

**Get a sales report:**
```
Get the 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 for review:**
```
Submit version 2.1.0 of my app for App Store review
```

---

## Security

- **Never commit API keys** — the `keys/` directory is gitignored.
- **Use environment variables** — the `.env` file is also gitignored.
- **Least privilege** — create API keys with only the roles you actually need.
- **Rotate keys regularly**, especially in production.

---

## Development

```bash
# Type checking
npm run typecheck

# Run tests
npm test
npm run test:run
npm run test:coverage

# Lint
npm run lint

# Watch mode
npm run dev
```

---

## Troubleshooting

**"The specified resource does not exist"**
This usually means a malformed API URL. Ensure you are running the latest version.

**"403 Forbidden" on app creation**
Apple restricts programmatic app creation for some accounts. Create the app manually in App Store Connect first, then use this server for everything else.

**Rate limiting**
The server includes built-in rate limiting (3,600 requests/hour for the Connect API). Requests beyond this threshold are retried automatically with exponential backoff.

**JWT errors**
- Verify your Issuer ID (App Store Connect > Users and Access > Integrations > Keys)
- Confirm your Key ID matches the downloaded `.p8` file
- Check that `APP_STORE_PRIVATE_KEY_PATH` points to a readable file

---

## Contributing

Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/my-feature`
3. Commit your changes: `git commit -m "add my feature"`
4. Push to the branch: `git push origin feature/my-feature`
5. Open a Pull Request

See [ROADMAP.md](ROADMAP.md) for planned features and good first contributions.

---

## License

MIT — see [LICENSE](LICENSE) for details.

---

<div align="center">

Built for the Apple developer community.

By [Cristiano Arêdes](https://github.com/cristianoaredes)

</div>