Skip to main content
Glama
kevinswint

Xcode-Studio-MCP

by kevinswint

xcode-studio-mcp

Einheitlicher MCP-Server für Xcode + iOS-Simulator – Erstellen, Bereitstellen, Screenshots erstellen und Interaktion mit Ihrer iOS-App über Claude Code, Codex, Cursor oder einen beliebigen MCP-Client.

In Swift geschrieben. Einzelne Binärdatei. Keine Node/Python-Laufzeitumgebung erforderlich.

License: MIT Swift 6.0+ MCP

Warum existiert dieses Projekt?

Heutzutage benötigen Sie 2-3 separate Tools, um den vollständigen iOS-Entwicklungszyklus mit einem KI-Agenten durchzuführen. xcode-studio-mcp kombiniert diese in einem einzigen Tool:

Write code → Build → Deploy to Simulator → Screenshot → Tap/Type → Verify

Tools

Tool

Beschreibung

xcode_build

Erstellt ein Xcode-Projekt mit strukturierter Fehlerausgabe (Datei, Zeile, Spalte, Schweregrad, Nachricht)

xcode_run

Erstellt und startet eine App im iOS-Simulator

simulator_screenshot

Erfasst den Simulator-Bildschirm als PNG-Bild

simulator_tap

Tippt auf x,y-Koordinaten auf dem Simulator-Bildschirm

simulator_type

Gibt Text in das aktuell fokussierte Feld ein

simulator_describe

Ruft den Barrierefreiheitsbaum des aktuellen Bildschirms ab (JSON)

Related MCP server: xcforge

Tool-Parameter

xcode_build

Parameter

Erforderlich

Beschreibung

project_path

Ja

Pfad zum Xcode-Projektverzeichnis, .xcodeproj oder .xcworkspace

scheme

Nein

Build-Schema (wird automatisch erkannt, falls weggelassen)

configuration

Nein

Debug (Standard) oder Release

destination

Nein

Build-Ziel (standardmäßig der gestartete Simulator)

xcode_run

Parameter

Erforderlich

Beschreibung

project_path

Ja

Pfad zum Xcode-Projekt

bundle_identifier

Ja

App-Bundle-ID (z. B. com.example.MyApp)

scheme

Nein

Build-Schema (automatisch erkannt)

simulator_udid

Nein

Ziel-Simulator (standardmäßig der gestartete)

simulator_screenshot

Parameter

Erforderlich

Beschreibung

simulator_udid

Nein

Ziel-Simulator (standardmäßig der gestartete)

simulator_tap

Parameter

Erforderlich

Beschreibung

x

Ja

X-Koordinate

y

Ja

Y-Koordinate

duration

Nein

Haltedauer in Sekunden (für langes Drücken)

simulator_udid

Nein

Ziel-Simulator

simulator_type

Parameter

Erforderlich

Beschreibung

text

Ja

Einzugebender Text

simulator_udid

Nein

Ziel-Simulator

simulator_describe

Parameter

Erforderlich

Beschreibung

simulator_udid

Nein

Ziel-Simulator

Schnellstart

Voraussetzungen

  • macOS mit installiertem Xcode

  • Für UI-Interaktions-Tools (tap, type, describe):

    brew tap facebook/fb && brew install idb-companion
    pip3 install fb-idb

Build

git clone https://github.com/kevinswint/xcode-studio-mcp.git
cd xcode-studio-mcp
swift build -c release

Claude Code konfigurieren

Fügen Sie dies zu Ihren Claude Code MCP-Einstellungen hinzu:

{
  "mcpServers": {
    "xcode-studio-mcp": {
      "command": "/path/to/xcode-studio-mcp/.build/release/XcodeStudioMCP"
    }
  }
}

Beispiel-Workflow

You: Build and run my app at ~/Projects/MyApp
Claude: [calls xcode_build] Build succeeded with 0 errors
        [calls xcode_run] App launched (PID 12345)
        [calls simulator_screenshot] Here's what the app looks like...
        [calls simulator_describe] I can see a "Sign In" button and email/password fields
        [calls simulator_tap] Tapped the email field
        [calls simulator_type] Typed "test@example.com"
        [calls simulator_screenshot] Here's the current state...

Architektur

┌─────────────────────────────┐
│     MCP Protocol Layer      │  stdio transport (Swift MCP SDK)
├─────────────────────────────┤
│   Tool Implementations      │  6 tools, structured error output
├──────────┬──────────────────┤
│ xcodebuild│  simctl  │  idb │  native process calls
│  wrapper  │  wrapper │ CLI  │
└──────────┴──────────┴──────┘

In Swift geschrieben, ohne Abhängigkeiten von Node/Python-Laufzeitumgebungen (idb CLI wird nur für UI-Interaktions-Tools benötigt).

Roadmap

  • v0.1 (aktuell): Core-Build + Simulator-Tools

  • v1.0: Semantische UI-Navigation („Tippe auf den Anmelden-Button“), visueller Vergleich, Bearbeitung von Xcode-Projektdateien, zusammengesetzte Operationen, SwiftUI-Vorschau-Erfassung

Verwandte Projekte

Projekt

Was es tut

Unterschied

XcodeBuildMCP

Nur Build + Test

Keine Simulator-UI-Interaktion

mobile-mcp

Plattformübergreifende Simulator-UI

Keine Xcode-Build-Unterstützung

ios-simulator-mcp

Simulator über IDB

Kein Build, hängt für alles von IDB ab

xcode-studio-mcp kombiniert Build und Interaktion in einem einzigen Server.

Mitwirken

Pull Requests sind willkommen. Die Codebasis besteht aus ca. 750 Zeilen Swift, organisiert in Tools, Services und Models.

Lizenz

MIT

Available Tools

6 tools
simulator_describeA

Get the accessibility tree of the current iOS Simulator screen as JSON. Useful for finding UI elements to interact with. Requires idb (pip3 install fb-idb).

ParametersJSON Schema
NameRequiredDescriptionDefault
simulator_udidNoSimulator UDID. Default: first booted simulator

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It successfully discloses the external dependency (idb) and output format (JSON), but lacks disclosure of read-only safety, error conditions (e.g., simulator not running), or the structure of the returned accessibility tree.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste: first defines the core function, second explains the value proposition, third states the hard prerequisite. Perfectly front-loaded and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a single-parameter inspection tool, but lacks description of the JSON output structure since no output schema exists. Given the domain-specific nature of 'accessibility tree,' some description of the returned hierarchy or element properties would strengthen agent effectiveness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, fully documenting the simulator_udid parameter including its default behavior. The description does not explicitly discuss parameters, but the schema is self-sufficient, making the baseline score of 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action (Get), resource (accessibility tree), format (JSON), and scope (current iOS Simulator screen). It effectively distinguishes from siblings like simulator_screenshot (visual) and simulator_tap/type (interaction) by emphasizing UI element discovery.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides valuable prerequisite information ('Requires idb') and contextual usage guidance ('Useful for finding UI elements to interact with'), implying it should be used before tap/type operations. Could be improved by explicitly contrasting with simulator_screenshot for debugging strategies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

simulator_screenshotA

Capture a screenshot of the iOS Simulator screen. Returns the image as base64-encoded PNG.

ParametersJSON Schema
NameRequiredDescriptionDefault
simulator_udidNoSimulator UDID. Default: first booted simulator

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It successfully discloses the critical behavioral trait of return format ('base64-encoded PNG') compensating for the missing output schema. Could mention whether this affects simulator state (it shouldn't) or requires specific permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. First sentence states the action, second discloses return format. Perfectly front-loaded with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriately complete for a simple single-parameter tool. The description compensates for missing output schema by specifying the base64 PNG return format. Minor gap: doesn't specify error behavior if no simulator is booted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. The description does not add parameter-specific semantics beyond the schema, but the schema already adequately documents the optional simulator_udid parameter with its default behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear specific verb ('Capture') + resource ('screenshot of the iOS Simulator screen'). Unambiguously distinguishes from siblings: unlike simulator_describe (metadata), simulator_tap/type (interactions), or xcode_build/run (compilation/execution), this tool specifically captures visual state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the action (use when visual verification needed), but lacks explicit when-to-use guidance versus alternatives like simulator_describe, or prerequisites such as requiring a booted simulator.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

simulator_tapA

Tap at specific coordinates on the iOS Simulator screen. Requires idb (pip3 install fb-idb).

ParametersJSON Schema
NameRequiredDescriptionDefault
durationNoTap duration in seconds (for long press)
simulator_udidNoSimulator UDID. Default: first booted simulator
xYesX coordinate to tap
yYesY coordinate to tap

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It successfully discloses the external dependency (idb) and implies coordinate-based interaction, but fails to describe return values, error behaviors (e.g., out-of-bounds coordinates), or whether the operation is synchronous.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste: the first states the action immediately, and the second provides essential prerequisite information. Perfectly front-loaded and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter interaction tool with no output schema or annotations, the description covers the core function and dependency but lacks completeness regarding the coordinate system origin (0,0 location), return value structure, and error scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage, establishing a baseline of 3. The description mentions 'specific coordinates' which aligns with the x/y parameters, but adds no semantic detail beyond what the schema already provides regarding the duration or simulator_udid parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Tap') and target resource ('iOS Simulator screen'), distinguishing it effectively from siblings like simulator_screenshot (capture), simulator_type (text input), and xcode_build (compilation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides critical prerequisite information ('Requires idb') but lacks explicit guidance on when to use this tool versus alternatives like simulator_type, or when tapping is preferable to other interaction methods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

simulator_typeA

Type text into the currently focused field on the iOS Simulator. Requires idb (pip3 install fb-idb).

ParametersJSON Schema
NameRequiredDescriptionDefault
simulator_udidNoSimulator UDID. Default: first booted simulator
textYesText to type

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the external idb dependency and implies statefulness ('currently focused field'), but omits error handling, idempotency, or timing behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste: first states the action, second states the prerequisite. Information is front-loaded and appropriately scoped.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a 2-parameter tool with no output schema, covering the core action and dependency. However, gaps remain regarding failure modes (what if no field is focused?) and synchronous/asynchronous behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage ('Simulator UDID', 'Text to type'), establishing baseline 3. The description adds no parameter-specific semantics beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Type text') and target ('currently focused field on the iOS Simulator'), distinguishing it from sibling tools like simulator_tap (gestures) and simulator_screenshot (visual capture).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides critical prerequisite information ('Requires idb') but lacks explicit guidance on when to use this versus simulator_tap (e.g., 'use after focusing a field') or error conditions if no field is focused.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

xcode_buildB

Build an Xcode project or workspace. Returns structured diagnostics with file, line, column, severity, and message for each error/warning.

ParametersJSON Schema
NameRequiredDescriptionDefault
configurationNoBuild configuration (Debug or Release). Default: Debug
destinationNoBuild destination. Default: booted iOS Simulator
project_pathYesPath to the Xcode project directory, .xcodeproj, or .xcworkspace
schemeNoBuild scheme name. Auto-detected if omitted.

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It successfully discloses the return structure (file, line, column, severity, message) since no output schema exists. However, it omits other critical behavioral traits: whether builds are destructive to previous artifacts, execution time expectations, or prerequisite requirements (Xcode installation).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two efficient sentences with zero waste. It is front-loaded with the core action ('Build...') followed by return value details. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters (1 required), no annotations, and no output schema, the description adequately covers the core function and return format. However, gaps remain in usage guidelines (vs. xcode_run) and behavioral transparency (side effects, idempotency), preventing a higher score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description reinforces the project_path semantics by mentioning 'project or workspace,' but adds no further syntax details, format examples, or constraints beyond what the schema already provides for the four parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Build[s] an Xcode project or workspace' with a specific verb and resource. It implicitly distinguishes from simulator_* siblings (which interact with simulators) and xcode_run (execution vs. compilation), though it does not explicitly name siblings to differentiate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by noting it returns diagnostics for errors/warnings, suggesting use for compilation verification. However, it lacks explicit when-to-use guidance or comparison with xcode_run (e.g., 'use this to compile before running').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

xcode_runA

Build an Xcode project and launch the app in the iOS Simulator. Returns build errors if the build fails, or a success message with the launched process ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
bundle_identifierYesApp bundle identifier to launch (e.g. com.example.MyApp)
configurationNoBuild configuration. Default: Debug
project_pathYesPath to the Xcode project directory, .xcodeproj, or .xcworkspace
schemeNoBuild scheme name. Auto-detected if omitted.
simulator_udidNoSimulator UDID. Default: first booted simulator

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses output behavior (build errors vs. success message with process ID) and the dual build-then-launch sequence. However, it omits operational details like whether the call blocks until completion, simulator boot behavior, or timeout characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste: first states the action (build + launch), second states the return values. Every word earns its place, and critical information is front-loaded. Appropriate length for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no output schema, the description compensates by explaining return values (build errors, process ID) and clarifying the compound operation. It adequately covers the tool's behavior, though it could improve by mentioning whether the simulator is auto-booted or if the operation is synchronous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, documenting all five parameters including defaults. The description mentions 'iOS Simulator' and 'build' which contextually anchors the parameters, but adds no specific syntax, format details, or parameter interdependencies beyond what the schema already provides. Baseline 3 is appropriate given the comprehensive schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the dual action ('Build... and launch') and identifies the specific resources (Xcode project, iOS Simulator). It effectively distinguishes from sibling tool 'xcode_build' (build-only) and simulator interaction tools by specifying it both compiles and deploys the app.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what happens on success or failure (returns build errors or process ID), providing implicit usage context. However, it lacks explicit guidance on when to use this versus 'xcode_build' (e.g., 'use this when you need to test the app interactively') or prerequisites like requiring Xcode command line tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedsimulator_describe
    • First observedsimulator_screenshot
    • First observedsimulator_tap
    • First observedsimulator_type
    • First observedxcode_build
    • First observedxcode_run

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct action: building, running, and simulator interactions (screenshot, tap, type, describe) are clearly separated. There is no overlap in purpose, making it easy for an agent to select the correct tool.

Naming Consistency3/5

Tools are grouped into two clear namespaces: 'xcode_' for build/run and 'simulator_' for simulator interactions. However, the same verb 'run' is used for xcode_run (launch app) while the simulator tools use direct action verbs (tap, type, describe). The pattern is readable but not perfectly uniform.

Tool Count5/5

With only 6 tools, the set is well-scoped for core Xcode build/run and simulator interaction workflows. Each tool serves a distinct purpose, and no tool feels redundant or missing at this scale.

Completeness4/5

The set covers building, running, and basic UI interaction (via describe/tap/type). A minor gap is the lack of a tool to terminate the running app, and no way to list available simulators, but agents can work around this for common tasks.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    High-performance MCP server for iOS development and test automation. Gives AI coding assistants direct access to iOS simulators with sub-20ms screenshots, UI interaction, building, testing, and an intelligent operator mode.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server for iOS Simulator automation. Enables AI assistants to visually interact with iOS apps running in the simulator.
    22 npm
    1
    MIT