No description available
A Model Context Protocol server for building Xcode projects directly from LLM applications
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.
# Clone the repository
git clone https://github.com/PolarVista/Xcode-mcp-server.git
cd xcode-mcp-server
# Install dependencies
npm install
# Build the server
npm run build
Start the server:
npm run start /path/to/build/logs/directory
In Claude Desktop settings:
"command": "node",
"args": ["/path/to/the/xcode-mcp-server/build/index.js",
"/path/to/your/project/folder"],
"env": {
"PATH": "/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin"
}
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:
build_project({
projectPath: "/path/to/Project.xcodeproj",
scheme: "MyApp",
configuration: "Debug"
})
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:
run_tests({
projectPath: "/path/to/Project.xcodeproj",
scheme: "MyAppTests",
testIdentifier: "LoginTests/testSuccessfulLogin",
skipTests: ["PerformanceTests/testLargeDataLoad"],
configuration: "Debug"
})
build-logs/build-[timestamp].log)build-[timestamp].log.json)report-[timestamp].txt)test-[timestamp].log)test-[timestamp].log.json)test-report-[timestamp].txt)coverage-[timestamp].txt)xcode-build://latest-log resource{
"mcpServers": {
"xcode-mcp-server": {
"command": "node",
"args": [
"/path/to/the/xcode-mcp-server/build/index.js",
"/path/to/your/project/folder"
]
}
}
}Related projects feature coming soon
Will recommend related projects based on sub-categories