Overview: Terminal-First App Store Automation
You can connect Claude Code—Anthropic's official terminal-based AI coding assistant—directly to Apple's App Store Connect API using FlightDeck's local Model Context Protocol (MCP) server. By registering FlightDeck in Claude Code with explicit HTTP transport (claude mcp add --transport http flightdeck http://127.0.0.1:51122/mcp), you can manage App Store releases, inspect TestFlight build ingestion, audit pre-flight submission readiness, and update localized storefront metadata directly from your macOS terminal.
Claude Code operates directly in your shell, executing terminal commands, editing source files, and interacting with developer tools. By integrating FlightDeck's embedded MCP server, you bring App Store Connect into your command-line workflow while maintaining complete credential isolation. Your sensitive App Store Connect .p8 private keys remain securely sealed inside your macOS Keychain, and every state-changing mutation is held for human confirmation in FlightDeck's desktop Approval Center before touching Apple's servers.
Terminal Security & Credential Isolation:
- Sealed in macOS Keychain: Your Apple API private key (
.p8), Key ID, and Issuer ID never enter terminal history, shell environment variables, or Claude Code configuration files. FlightDeck securely manages JWT generation in-process. - Local Loopback Transport: Claude Code connects to FlightDeck over local loopback (
http://127.0.0.1:51122/mcp). No network ports are opened to external internet traffic. - Approval Center Protection: Write operations (like metadata updates, build uploads, or beta group creation) do not execute silently. FlightDeck stages the request, requiring you to review and approve the proposal in FlightDeck's native macOS interface.
Architecture: Terminal-to-Apple Protocol Flow
Claude Code connects to FlightDeck via the Model Context Protocol's Streamable HTTP transport:
┌─────────────────────────────────────────────────────────────┐
│ Terminal Session (zsh) │
│ Developer runs: claude │
│ Claude Code CLI Engine (Node.js runtime) │
└──────────────────────────────┬──────────────────────────────┘
│ Streamable HTTP (JSON-RPC 2.0)
│ http://127.0.0.1:51122/mcp
┌──────────────────────────────▼──────────────────────────────┐
│ FlightDeck Desktop (macOS) │
│ ├── StreamableHttpTransport (Loopback on 127.0.0.1:51122) │
│ ├── macOS Keychain Credential Vault (ASC Private Key) │
│ ├── Human Approval Center (Staged Proposal Review) │
│ └── 80+ Curated App Store Connect MCP Tools │
└──────────────────────────────┬──────────────────────────────┘
│ Authenticated REST API (HTTPS)
│ api.appstoreconnect.apple.com
┌──────────────────────────────▼──────────────────────────────┐
│ Apple App Store Connect │
│ [Apps, Builds, TestFlight, Metadata, Pricing, Review] │
└─────────────────────────────────────────────────────────────┘
Prerequisites
Before configuring Claude Code, verify the following prerequisites:
- macOS System: macOS Sonoma (14.0+) or macOS Sequoia (15.0+).
- Node.js Environment: Node.js 18.0 or higher (
node --version). - Claude Code CLI Installed: Installed globally via npm: ``
bash npm install -g @anthropic-ai/claude-code`` - FlightDeck Developer Console: Installed from the Mac App Store.
- App Store Connect API Key: Created in the Apple Developer Portal with the Admin or App Manager role (Key ID, Issuer ID, and
.p8private key file).
Step 1: Set Up Credentials and MCP Server in FlightDeck
First, ensure FlightDeck is installed, authenticated with Apple, and running its local MCP server:
- Launch FlightDeck from your
/Applicationsfolder. - In FlightDeck, navigate to Settings > Apple API Profiles and add your App Store Connect API credentials. FlightDeck verifies the key against Apple's API and securely saves it in your macOS Keychain.
- In the sidebar, select MCP Server.
- Confirm that the Server Status is Running and the displayed endpoint is: ``
text http://127.0.0.1:51122/mcp`` - Leave FlightDeck open in the background while working in the terminal.
Step 2: Connect Claude Code CLI to FlightDeck
You can connect Claude Code using either FlightDeck's automated in-app setup prompt or the official claude mcp add CLI command.
Option A: One-Click Setup via AI Prompt (Recommended)
If you are already inside an active Claude Code interactive session:
- In FlightDeck's MCP Server screen, click Copy Setup Prompt.
- Paste the prompt directly into your active Claude Code session and press Enter.
- Claude Code reads the active runtime endpoint, port, and authentication token (if enabled), and automatically registers the connection without recording secrets in your shell history.
Option B: Command-Line Registration via claude mcp add
Alternatively, register the server directly from your macOS terminal using the official Claude Code CLI syntax with explicit HTTP transport:
# Standard local loopback configuration (default, no authentication required)
claude mcp add --transport http flightdeck http://127.0.0.1:51122/mcp
To make the server available across all projects on your machine, supply the --scope user flag:
# User-global registration (accessible across all repositories)
claude mcp add --transport http --scope user flightdeck http://127.0.0.1:51122/mcp
If you enabled Require HTTP Bearer Token in FlightDeck's MCP Server settings, supply the token via the --header flag:
# Configuration with HTTP Bearer Token enabled
claude mcp add --transport http flightdeck http://127.0.0.1:51122/mcp \
--header "Authorization: Bearer YOUR_FLIGHTDECK_TOKEN"
Shell History Security: Passing authentication tokens directly as command-line arguments can record secrets in your shell history (~/.zsh_history or ~/.bash_history). When token authentication is enabled, prefer using Option A (pasting the setup prompt into Claude Code's interactive session) or clear sensitive entries from your history after registration.
Verify Server Registration and Inspect Details
Check that Claude Code successfully registered the server and view its configuration:
# List all configured MCP servers
claude mcp list
Expected Output:
Configured MCP servers:
flightdeck (http://127.0.0.1:51122/mcp) - HTTP
To inspect detailed server settings (including headers and transport details):
# Inspect specific server configuration
claude mcp get flightdeck
Step 3: Verify Tool Discovery in Claude Code
Launch an interactive Claude Code session in your terminal:
claude
Inside the interactive prompt, type the /mcp command to inspect connected servers and tools:
> /mcp
Claude Code displays the connection health and lists FlightDeck's discovered tools. You should see all 80+ semantic tools indexed, including apps, builds, TestFlight beta groups, and storefront localizations.
Step 4: Run a Safe Read-Only Request
Always test your setup with a read-only request that requires no modifications to Apple's remote state:
Show me the apps available in my App Store Connect account using FlightDeck and check whether our connection is healthy. Do not make any changes.
Claude Code connects to FlightDeck, invokes apps_list against Apple's REST API, and displays a clean summary in the terminal:
Found 1 application registered in App Store Connect:
- Name: FlightDeck Developer Console
App ID: 6812899314
Bundle ID: quest.kip.flightdeck
Primary Locale: en-US
Connection is healthy and authenticated.
Because this query is read-only, it executes immediately without triggering approval prompts in FlightDeck.
Step 5: Managing Staged Mutations in the Terminal
When working from the command line, accidental or unreviewed modifications to production App Store metadata can cause critical business disruptions. FlightDeck implements Human-in-the-Loop Governance to protect your account.
Here is what happens when you ask Claude Code to perform a mutation:
[Developer Terminal] ──> Claude Code proposes metadata change
│
▼
[FlightDeck Engine] ──> Intercepts write operation; builds structured proposal
│
▼
[FlightDeck Desktop] ──> Proposal appears in Approval Center on macOS
│
▼
[Claude Terminal] ──> Displays: "Proposal staged in FlightDeck Approval Center..."
│
▼
[Developer Action] ──> Developer opens FlightDeck, reviews diff, clicks [Approve]
│
▼
[Apple REST API] ──> Mutation executes; updated state returned to Claude Code
Example: Updating Localized Release Notes
Ask Claude Code to draft and stage an update:
For app ID 6812899314, update the en-US What's New release notes for version 1.1.0 to describe our new iPad widget support and sync improvements. Stage the update in FlightDeck for my approval.
Terminal Output from Claude Code:
I have prepared an update for the en-US release notes for app 6812899314 (version 1.1.0).
Under FlightDeck's safety policy, this mutation has been staged in the Approval Center.
Proposal Details:
- Target: app_store_version_localizations
- Locale: en-US
- Field: whatsNew
- Value: "Added interactive widgets for iPad and resolved background sync delays."
- Character Count: 68 / 4000 characters
Please open the FlightDeck desktop app and click 'Approve' to commit this change to Apple.
Switch to FlightDeck, review the proposal in the Approval Center, and click Approve. Once approved, Claude Code confirms:
✓ Proposal approved in FlightDeck. Release notes successfully updated in App Store Connect.
Practical Terminal Release Management Workflows
Here are outcome-focused prompts tailored for Claude Code CLI during release preparation:
1. Pre-Flight Release Readiness Audit
Using FlightDeck, run a comprehensive release readiness check for our draft version. Check all localized descriptions, keywords, support URLs, and screenshots, and output a checklist of any missing items.
2. Inspecting TestFlight Build Ingestion
Using FlightDeck, check the most recent build uploaded for our app. Is it currently processing, valid, or did it fail validation?
3. Auditing Multi-Language Localizations
Inspect the localized metadata for our app across all active locales in FlightDeck. Check whether our keywords in each locale exceed Apple's 100-character limit or contain formatting issues.
4. Attaching Builds to Internal TestFlight
Attach our latest valid build to the 'Internal Engineering' TestFlight group in FlightDeck, and stage the operation for my approval.
Troubleshooting Claude Code MCP Connections
1. ECONNREFUSED 127.0.0.1:51122
- Symptom: Claude Code prints
Connection refusedwhen invoking tools or running/mcp. - Cause: FlightDeck is closed, or the MCP server toggle was stopped.
- Fix: Launch FlightDeck, go to the MCP Server tab, and toggle the server to Running.
2. Port Conflict
- Symptom: FlightDeck reports that port 51122 is already in use by another application.
- Fix: In FlightDeck, click Change Port to select an alternate port, then re-register in Claude Code: ``
bash claude mcp remove flightdeck claude mcp add --transport http flightdeck http://127.0.0.1:<NEW_PORT>/mcp``
3. Server Responds with HTTP 401 Unauthorized
- Symptom: Claude Code reports authentication failure when invoking tools.
- Cause: FlightDeck has Bearer token authentication enabled, but Claude Code was registered without the Authorization header.
- Fix: Re-register the server with the header: ``
bash claude mcp remove flightdeck claude mcp add --transport http flightdeck http://127.0.0.1:51122/mcp \ --header "Authorization: Bearer YOUR_FLIGHTDECK_TOKEN"``
4. Removing or Resetting the Server Configuration
- If you need to reconfigure or remove FlightDeck from Claude Code: ``
bash claude mcp remove flightdeck``