# xcodemcp

MCP server that drives Xcode through JavaScript automation instead of shell commands. Helpful when running builds and inspecting compile logs from an AI agent.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 59
- Author: lapfelix
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lapfelix/XcodeMCP
- Updated: 2026-02-05
- HTML: https://affpapa.org/en/nevibecode/mcp/xcodemcp

## What it does

Instead of wrapping `xcodebuild` in terminal processes, this tool manipulates the macOS IDE directly via JXA scripting. Assistants can open workspaces and trigger project compilations inside the active editor window. Build logs gain exact failure coordinates when paired with the `XCLogParser` utility. It includes a standalone `xcodecontrol` command.

The server requires macOS, an existing Xcode installation, and Node.js 18+. Without `XCLogParser`, failure details in build logs fall back to standard text. When using Apple's first-party Xcode bridge, pass the `--sidekick-only` flag to avoid overlapping build tools and retain focused helpers for workspace inspection and test artifacts.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add xcodemcp -- npx -y xcodemcp
```

### Codex

**Platform CLI**
```bash
codex mcp add xcodemcp -- npx -y xcodemcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "xcodemcp": {
            "command": "npx",
            "args": [
                "-y",
                "xcodemcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "xcodemcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "xcodemcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add xcodemcp npx -y xcodemcp
```

## When to use it
- trigger application compilation and tests inside Xcode rather than command-line tools
- extract pinpoint error locations from build output with XCLogParser
- inspect XCResult bundles to view test hierarchies and captured UI snapshots
- manage workspaces and active schemes directly through an AI agent

## Example prompts
- Open MyApp.xcodeproj, compile it using the MyApp scheme, and report any errors.
- Run the test suite in Xcode and inspect any failures using XCLogParser.
- Check environment health and show the current workspace scheme configuration.

## Similar
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [mobilerun](https://affpapa.org/en/nevibecode/mcp/mobilerun.md) — MCP server · ★ 9751
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [XcodeBuildMCP](https://affpapa.org/en/nevibecode/mcp/xcodebuildmcp.md) — MCP server · ★ 6505
- [ShipSwift](https://affpapa.org/en/nevibecode/mcp/shipswift.md) — MCP server · ★ 3244
- [agent-device](https://affpapa.org/en/nevibecode/mcp/agent-device.md) — MCP server · ★ 5149

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
