Provides Xcode project tools to read, inspect, build, test, and modify Xcode projects via MCP
Configuration
View docs{
"mcpServers": {
"chacebot-mcp-xcode-server": {
"command": "node",
"args": [
"/absolute/path/to/mcp-xcode-server/src/index.js"
]
}
}
}You have an MCP server that exposes a set of tools to interact with Xcode projects programmatically. It lets you read project files, list schemes and targets, modify targets, build and test projects, and manage build settings and artifacts from an MCP-enabled client or assistant.
Configure your MCP client to load this server as a local STDIO endpoint. You will run the server locally and connect your MCP client to it so you can invoke the Xcode project tools through natural language commands and structured requests. The supported tools enable reading project structure, listing schemes and targets, adding a test target, adding files to targets, building, testing, retrieving build settings, and cleaning build artifacts.
Prerequisites you need installed on your machine before you start:
Step by step setup to run the MCP Xcode Server locally:
# 1. Install dependencies for the MCP server
npm install
# 2. Start the MCP server locally (standalone testing)
npm start
# 3. Configure your MCP client to connect to the local stdio server
# Example client config will reference the stdio interface and the runtime command shown in the server setupTo use the server with an MCP client, load a configuration that points to the stdio command you run to start the server. You will pass the required arguments to access each Xcode tool, such as reading a project, listing schemes, or performing a build. When you start the server, it communicates over stdio using the MCP protocol, enabling you to invoke the available Xcode tools from your AI assistant or CLI client.
The server includes the following tools for Xcode project management:
Ensure you run the server in a secure, trusted environment. Only expose it to clients you control, and avoid handling sensitive credentials through logs or plain text environment variables. Keep Xcode and its command-line tools up to date to avoid compatibility issues with project formats and pbxproj parsing.
If you encounter issues reading a project or manipulating pbxproj files, verify the Xcode command-line tools are installed and accessible from your shell. Check that the target paths and project paths you pass to tools are correct and that you have the necessary permissions to modify the project files.
This server includes functions to read project structure, list schemes and targets, add test targets, add files to targets, build, test, get build settings, and clean build artifacts. Some operations that modify pbxproj files require careful parsing and validation, so expect incremental improvements and follow best practices when integrating with automated workflows.
Read and parse an Xcode project file to extract its structure.
List all build schemes available in the project.
List all targets in the project.
Add a new test target to the project. Note: this currently provides instructions rather than direct modification of the pbxproj file.
Add a file to a specific target in the project.
Build the Xcode project using xcodebuild.
Run tests in the Xcode project.
Get build settings for the project or a specific scheme.
Clean build artifacts from the project.