# Setup Guide for MCP Xcode Server
This guide will help you set up and configure the MCP Xcode Server for use with Claude Desktop, Cursor, or other MCP-compatible clients.
## Prerequisites
- Node.js 18 or later
- Xcode and Xcode Command Line Tools installed
- Access to your Xcode projects
## Installation Steps
### 1. Install Dependencies
```bash
cd mcp-xcode-server
npm install
```
### 2. Verify Installation
Test that the server can start:
```bash
npm start
```
You should see the message "Xcode MCP server running on stdio". Press Ctrl+C to stop.
### 3. Configure Your MCP Client
#### For Claude Desktop
Edit your Claude Desktop configuration file:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
Add the server configuration:
```json
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/absolute/path/to/FuelManager/mcp-xcode-server/src/index.js"
],
"env": {}
}
}
}
```
**Important**: Replace `/absolute/path/to/FuelManager` with the actual absolute path to your project.
#### For Cursor
Edit your Cursor MCP configuration file (location may vary):
```json
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/absolute/path/to/FuelManager/mcp-xcode-server/src/index.js"
],
"env": {}
}
}
}
```
### 4. Restart Your MCP Client
After adding the configuration, restart Claude Desktop or Cursor to load the new MCP server.
### 5. Verify Server is Running
In your MCP client, you should now be able to use tools like:
- `xcode_read_project`
- `xcode_list_schemes`
- `xcode_build`
- `xcode_test`
## Getting the Absolute Path
To find the absolute path to your project on macOS:
```bash
cd /Users/chace/Developer/FuelManager/mcp-xcode-server
pwd
```
Use the output (plus `/src/index.js`) in your configuration.
## Troubleshooting
### Server Not Starting
1. Check Node.js version: `node --version` (should be 18+)
2. Verify dependencies: `npm install`
3. Check file permissions: ensure `src/index.js` is executable
### Tools Not Available
1. Verify the configuration file syntax is valid JSON
2. Check that the path to `index.js` is absolute and correct
3. Restart your MCP client
4. Check server logs for errors
### Xcode Build Errors
1. Ensure Xcode Command Line Tools are installed: `xcode-select --install`
2. Verify you can run `xcodebuild -version`
3. Check that your project paths are correct
## Example Usage
Once configured, you can ask your AI assistant to:
- "Read my Xcode project structure"
- "List all schemes in my project"
- "Build my Xcode project"
- "Run tests for my project"
- "Add a test target to my project"
## Next Steps
- Read the [README.md](./README.md) for detailed tool documentation
- Experiment with different tools to understand capabilities
- Check the limitations section for known issues
## Support
For issues or questions:
1. Check the troubleshooting section above
2. Review the README for tool documentation
3. Check MCP server logs for error messages