# xcode-mods

> A Claude Code plugin that brings Xcode builds, tests, console output and SwiftUI previews into the terminal via the headless Xcode MCP server.

xcode-mods is an open-source Claude Code plugin by Artem Novichkov that surfaces Xcode's build, test, console and SwiftUI preview output inside Claude Code. It builds on Xcode's headless MCP server and adds a toolbar band, an Xcode pane and a Canvas pane. The latest listed release is v0.1.0.

## What It Is

The plugin is a Claude Code mod for iOS and Swift developers who work from the terminal. It adds a toolbar band above the prompt showing the scheme and destination, current activity and problem counters. It also adds an Xcode pane with Build, Run and Tests tabs, and a Canvas pane that shows SwiftUI `#Preview` snapshots. It also picks up Claude's own Xcode tool calls, so builds, test runs, launches and preview renders that Claude starts appear in the panes.

## Workflow and Commands

Slash commands cover the main actions: `/xcode` opens the pane, `/build` builds the active scheme, `/tests [filter]` runs all or filtered tests, `/run` builds and runs while streaming the console, `/stop` stops the app, and `/preview [file.swift]` renders a preview. The Build tab lists errors and warnings with clickable file names that open the line in Xcode. The Tests tab groups results by target and suite, with failures first. Keyboard shortcuts let you send issues, failures or console output to Claude to fix. Toast notifications report when an action ends.

## Setup Path

It requires Xcode 27 or later with the MCP server in headless mode, and Claude Code 2.1.286 or later. Setup enables the server with `xcrun mcp-server enable`, adds it to Claude Code under the name `xcode`, allows the `mcp__xcode` permission, and installs the plugin from the marketplace. Previews appear as images in terminals that support the kitty graphics protocol, such as Ghostty, or in the Claude desktop app. Otherwise the pane shows the PNG path.

## Preview Behavior

The Canvas pane keeps the last 10 snapshots. After a first render, it re-renders when Claude edits a Swift file containing `#Preview`. The README notes the first preview can take a minute or more, and the preview device cannot yet be chosen.

## Features
- Toolbar band showing scheme, destination, activity and problem counters
- Xcode pane with Build, Run and Tests tabs
- SwiftUI #Preview snapshots in a Canvas pane
- Picks up Claude's own Xcode tool calls
- Slash commands: /xcode, /build, /tests, /run, /stop, /preview
- Clickable errors that open the file line in Xcode
- Test results grouped by target and suite, rerun failed tests
- Console streaming of stdout and OSLog
- Toast notifications on build, test and run completion
- Auto re-render of previews after Swift file edits

## Integrations
Claude Code, Xcode, Xcode MCP server, Ghostty, SwiftUI

## Platforms
MACOS, IOS, WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
v0.1.0

## Links
- Website: https://artemnovichkov.com
- Documentation: https://github.com/artemnovichkov/xcode-mods#readme
- Repository: https://github.com/artemnovichkov/xcode-mods
- EveryDev.ai: https://www.everydev.ai/tools/xcode-mods
