# Xcode MCP: what it does and how to connect your coding agent

> What Xcode's MCP server (xcrun mcpbridge) does, how to connect Claude Code, Codex and Cursor in two steps, the tools it gives your agent, and its limits.

Source: https://showtake.app/blog/xcode-mcp

*Agents & MCP · updated 2026-11-12*

Xcode ships its own MCP server. One setting and one command give Claude Code, Codex or Cursor your open project: builds, tests, diagnostics, SwiftUI previews and Apple's docs. Here is the setup, the tool list and the gaps you fill with other servers.

Xcode MCP is the Model Context Protocol server built into Xcode. You allow it in **Xcode > Settings > Intelligence**, then register it in your agent with `xcrun mcpbridge`, for example `claude mcp add --transport stdio xcode -- xcrun mcpbridge`. From then on Claude Code, Codex, Cursor or any MCP client can read and edit your open project, build it, run tests, read the issue navigator, render SwiftUI previews and search Apple's documentation through Xcode itself.

Apple added it in Xcode 26.3. This guide uses Xcode 27.2 (checked on November 12, 2026) and Apple's page [Giving external agents access to Xcode](https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode).

## Set up Xcode MCP in two steps

1. **Allow external agents.** In Xcode choose **Settings > Intelligence**. Under **Model Context Protocol**, set **Allow External Agents to Use Xcode Tools** to **Always** or **While Xcode is Open**. Choosing Never turns it off again.
2. **Register the bridge in your agent.** `xcrun mcpbridge` is a small stdio program that forwards MCP messages to the running Xcode. Add it once per agent with the commands below, then check it with `claude mcp list` or `codex mcp list`.
3. **Open your project in Xcode** before you prompt the agent. The bridge talks to a running Xcode with a project open; Xcode shows an alert when an agent connects and an indicator while it is active.

```sh
# Claude Code
claude mcp add --transport stdio xcode -- xcrun mcpbridge

# Codex
codex mcp add xcode -- xcrun mcpbridge
```

For Cursor, VS Code or any client that reads a JSON config, the server is just a command:

```json
{
  "mcpServers": {
    "xcode": { "command": "xcrun", "args": ["mcpbridge"] }
  }
}
```

> **More than one Xcode installed?:** The bridge connects to the Xcode that `xcode-select` points at. Set `MCP_XCODE_PID` to the process id of another running Xcode to target it instead. Both variables are listed in `xcrun mcpbridge --help`.

Xcode 27 also adds `xcrun mcpbridge run-agent <agent>`, which launches a supported agent with Xcode's configuration, and `--dry-run` to print the command it would run. If the agent's binary is not on your `PATH`, it stops with "Could not find 'claude' binary", which is what we saw on our build Mac.

## Which tools Xcode MCP gives your agent

Apple's page describes the capabilities (modify the project, build the app) but does not list the tools. Developers who inspected the bridge report 20 tools in Xcode 26.3; this is the list [Rudrank Riyam documented](https://rudrank.com/exploring-xcode-using-mcp-tools-cursor-external-clients), grouped:

| Group | Tools | What the agent gets |
| --- | --- | --- |
| Files | `XcodeRead`, `XcodeWrite`, `XcodeUpdate`, `XcodeGlob`, `XcodeGrep`, `XcodeLS`, `XcodeMakeDir`, `XcodeRM`, `XcodeMV` | Project-aware file access (files stay in the right groups and targets) |
| Build | `BuildProject`, `GetBuildLog` | Builds the active scheme and returns structured errors |
| Tests | `GetTestList`, `RunAllTests`, `RunSomeTests` | Runs XCTest and Swift Testing from Xcode |
| Diagnostics | `XcodeListNavigatorIssues`, `XcodeRefreshCodeIssuesInFile` | The issue navigator and live diagnostics for one file |
| SwiftUI and Swift | `RenderPreview`, `ExecuteSnippet` | Renders a SwiftUI preview as an image; runs Swift snippets |
| Docs | `DocumentationSearch` | Searches Apple's documentation and WWDC transcripts |
| Windows | `XcodeListWindows` | Lists open windows; most tools need a tab identifier from it |

Ask your agent to list the tools of the `xcode` server after you connect it: the exact set can change with every Xcode release.

## What Xcode MCP does not do

The bridge works on your project and the build. It does not drive the app you built:

- **No taps or typing in the Simulator.** It can build and run tests, but there is no tool to tap a button, type into a field or read the running app's screen.
- **No screen recording or App Store media.** `RenderPreview` renders a single SwiftUI preview; it does not film the app or make screenshots at App Store sizes.
- **Xcode must be open.** Headless CI or a second Mac without a logged-in Xcode session is not its use case; plain `xcodebuild` or a build server fits better there.

For those jobs agents use other MCP servers next to it, and they combine without trouble because every server has its own name:

| Job | Xcode MCP | Other servers that do it |
| --- | --- | --- |
| Edit, build, test with Xcode's own index | Yes | MobileBuildMCP (formerly XcodeBuildMCP) via `xcodebuild` |
| Read build errors and diagnostics | Yes | MobileBuildMCP |
| Drive the app in the Simulator (tap, type, read the screen) | No | MobileBuildMCP, ios-simulator-mcp, Mobile MCP, ShowTake |
| Record a video of the app | No | simctl-based recording in several servers; ShowTake films and edits |
| App Store screenshots and App Previews at Apple's sizes | No | ShowTake |

We compare the Simulator servers side by side in [iOS Simulator MCP servers compared](https://showtake.app/blog/ios-simulator-mcp).

## A setup that covers build, drive and film

A practical stack for an iOS project is Xcode MCP for the code and the build, plus one server that drives the app. If you also want the demo video, ShowTake drives the app and films it in one go:

```sh
claude mcp add --transport stdio xcode -- xcrun mcpbridge
claude mcp add --scope user showtake -- "/Applications/ShowTake.app/Contents/MacOS/showtake-mcp"
```

Then one prompt can go from code change to finished video:

Paste into Claude Code (both servers connected):

```text
Add a "Share donut" button to the donut detail screen. Build with the xcode
server and fix any errors, run the tests, then use ShowTake to film a 20-second
take of the new button in the iPhone 17 Pro simulator and export it for X.
```

ShowTake builds and installs the app itself when it prepares a take (`prepare_ios`), so the Xcode server is optional for filming; it helps when the agent should fix build errors in Xcode's own words first.

[Video: One prompt, then the agent drives the Simulator through ShowTake's tools and the step captions appear in the take.](https://showtake.app/media/agent-takes.mp4)

The full list of ShowTake tools is in the [tool reference](https://showtake.app/docs/tools), and [connect your agent](https://showtake.app/docs/mcp-setup) has the commands for Codex, Cursor, Gemini CLI and VS Code. If you would rather let the agent do the setup too, paste the one-line prompt from [the agent playbook](https://showtake.app/agents).

> Try it: paste this into your coding agent: "Set up ShowTake for me from https://showtake.app/agents.md and make a demo video of my app."

## Troubleshooting Xcode MCP

- [ ] "Allow External Agents to Use Xcode Tools" is not set to Never (Settings > Intelligence)
- [ ] Xcode is running and your project is open in a window
- [ ] `xcrun --find mcpbridge` prints a path inside your Xcode (Xcode 26.3 or later)
- [ ] `xcode-select -p` points at the Xcode you opened, or `MCP_XCODE_PID` is set
- [ ] You accepted Xcode's alert when the agent first connected
- [ ] `claude mcp list` (or `codex mcp list`) shows the `xcode` server as connected

## Common questions

### What is Xcode MCP?

It is Xcode's built-in Model Context Protocol server. External coding agents connect to it through the `xcrun mcpbridge` command and get project file access, builds, tests, diagnostics, SwiftUI preview rendering and documentation search from the running Xcode.

### Which Xcode version has the MCP server?

Xcode 26.3 added it, and Xcode 27 keeps it, with the setting under Settings > Intelligence and the extra `mcpbridge run-agent` command. Run `xcrun --find mcpbridge` to check that your Xcode has it.

### How do I add Xcode MCP to Claude Code?

Allow external agents in Xcode's Intelligence settings, then run `claude mcp add --transport stdio xcode -- xcrun mcpbridge` and open your project in Xcode. `claude mcp list` should show the server as connected.

### Can Xcode MCP control the iOS Simulator?

No. It builds and tests your app but has no tools to tap, type or read the running app's screen. Pair it with a Simulator server such as MobileBuildMCP, ios-simulator-mcp, Mobile MCP or ShowTake for that.

### Is Xcode MCP the same as XcodeBuildMCP?

No. XcodeBuildMCP, now called MobileBuildMCP, is an open-source server by Sentry that wraps `xcodebuild`, simctl and UI automation and works without Xcode open. It can also forward calls to Xcode's own bridge. Xcode MCP is Apple's server inside Xcode.
