Facilitates iOS app development by providing build and test capabilities for iOS simulator targets, with default configuration for iPhone 15 Pro simulator.
Enables building and testing Xcode projects with the ability to specify schemes, configurations, and destinations. Supports running specific tests, generating code coverage reports, and accessing build and test logs.
Xcode MCP Server
The Xcode MCP Server provides a Model Context Protocol interface for building and testing Xcode projects. It enables AI assistants to directly trigger builds, run tests, monitor progress, and access logs through a standardized interface.
Features
- Build Xcode projects with custom schemes and configurations
- Run unit tests with granular control (run specific tests or skip tests)
- Generate code coverage reports
- Stream build and test logs in real-time
- Access detailed build and test reports
- JSON-formatted output
- Automatic log persistence
Requirements
- Node.js 16+
- Xcode Command Line Tools
- TypeScript
- MCP-compatible client (e.g., Claude Desktop)
Installation
Usage with Claude Desktop
- Start the server:
- In Claude Desktop settings:
Available Tools
build_project
Builds an Xcode project with specified parameters.
Parameters:
projectPath
(required): Path to the .xcodeproj or .xcworkspacescheme
(required): Build scheme nameconfiguration
(optional): Build configuration (Debug/Release, defaults to Debug)destination
(optional): Build destination (defaults to "platform=iOS Simulator,name=iPhone 15 Pro")
Example usage in Claude:
run_tests
Runs unit tests with optional filtering.
Parameters:
projectPath
(required): Path to the .xcodeproj or .xcworkspacescheme
(required): Test scheme nametestIdentifier
(optional): Specific test to run (e.g., 'MyTests/testExample')skipTests
(optional): Array of test identifiers to skipconfiguration
(optional): Build configuration (Debug/Release, defaults to Debug)destination
(optional): Test destination (defaults to "platform=iOS Simulator,name=iPhone 15 Pro")
Example usage in Claude:
Logs
- All logs are stored in the specified base directory under
build-logs/
- Build operations create:
- Plain text log (
build-[timestamp].log
) - JSON-formatted log (
build-[timestamp].log.json
) - Xcode report (
report-[timestamp].txt
)
- Plain text log (
- Test operations create:
- Test log (
test-[timestamp].log
) - JSON-formatted log (
test-[timestamp].log.json
) - Test report (
test-report-[timestamp].txt
) - Code coverage report (
coverage-[timestamp].txt
)
- Test log (
- Latest log (build or test) is accessible via the
xcode-build://latest-log
resource
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
A Model Context Protocol server that enables AI assistants to build and test Xcode projects directly through a standardized interface, with capabilities for running tests, monitoring progress, and accessing logs in real-time.
Related Resources
Related MCP Servers
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -61TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that provides tools for Xcode-related operations, making it easier to work with iOS project management, building, testing, archiving, and deploying apps to both simulators and physical devices.Last updated -93964JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.Last updated -1Python
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to interact with iOS simulators, perform accessibility testing, manage apps, and automate complex iOS workflows.Last updated -12PythonApache 2.0