Xcode MCP Server logo

Xcode MCP Server

by PolarVista

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.

View on GitHub

Last updated: N/A

What is Xcode MCP Server?

The Xcode MCP Server is a tool that allows AI assistants to build and test Xcode projects through a Model Context Protocol interface. It provides a standardized way to trigger builds, run tests, monitor progress, and access logs.

How to use Xcode MCP Server?

To use the server, clone the repository, install dependencies using npm, and build the server. Then, start the server, specifying a directory for build logs. Configure your MCP-compatible client (e.g., Claude Desktop) to use the server's build/index.js file and the project folder as arguments.

Key features of Xcode MCP Server

  • Build Xcode projects with custom schemes and configurations

  • Run unit tests with granular control

  • Generate code coverage reports

  • Stream build and test logs in real-time

  • Access detailed build and test reports

  • JSON-formatted output

  • Automatic log persistence

Use cases of Xcode MCP Server

  • Automating Xcode builds and tests using AI assistants

  • Integrating Xcode build processes into LLM-powered workflows

  • Enabling AI-driven debugging and troubleshooting

  • Generating code coverage reports automatically

FAQ from Xcode MCP Server

What is MCP?

MCP stands for Model Context Protocol, a standard for communication between AI models and external tools.

What are the requirements for running the server?

Node.js 16+, Xcode Command Line Tools, TypeScript, and an MCP-compatible client are required.

How do I specify the project path?

The project path is passed as an argument when starting the server and also as a parameter to the build_project and run_tests tools.

Where are the logs stored?

Logs are stored in the specified base directory under the build-logs/ directory.

How can I run a specific test?

Use the testIdentifier parameter in the run_tests tool to specify the test to run (e.g., 'MyTests/testExample').