Xcode Headless MCP Server: What One Approval Grants

Xcode headless MCP server approval dialog for a coding agent

The Xcode headless MCP server lets coding agents drive Xcode’s tools with the app closed, and a single approval can reach further than many developers would guess. Tests on Xcode 27.2 on November 25, 2026 showed that trust follows an agent’s code signature and that folder approvals land one level above the project.

Apple introduced the Xcode headless MCP server as a preview in Xcode 27 Beta 5. Its release notes say signed agents can work with projects under a chosen directory for long stretches without further prompts.

Little from Apple so far

Documentation is sparse. The Xcode 27 notes include one paragraph on the mode and a small bug fix mentioning its menu bar item. They list two commands: sudo xcrun mcp-server enable switches it on and xcrun mcp-server status reports the state. For machines with nobody at the keyboard there is an extra flag that approves every agent, which Apple says it doesn’t recommend for desk use. Some settings may need an Xcode relaunch or a reboot to apply.

A different control sits in Xcode’s Intelligence settings, a menu with the choices Always, While Xcode is Open and Never. Apple’s guide for outside agents doesn’t mention headless mode and still advises opening the project in Xcode first. Later notes for 27.1, 27.2 and 27.3 beta 2 add nothing.

A signature carries across sessions

With per-agent approvals turned on, the server keeps one list of agents and one of folder trees. Signed agents are recognized by team ID and bundle identifier, and Claude Code appears under team Q6L2SF6YDW. Unsigned programs such as a Python interpreter are matched by file path and hash.

Over one morning the server logged 55 connections, 52 of them from Claude Code. Every one of the 52 fell under the same stored grant. Only four made any tool calls, and two of those were the tester’s own experiments, so most sessions connected and left without using Xcode at all.

The consequence: approving one session once covers any process that carries the signature, including sessions in unrelated projects and ones yet to start. They share the server too. A second session that only listed workspaces got back the workspace the first one had opened.

The folder in the prompt is the parent

To see a folder request, the tester asked an agent to open a Swift package by its directory. The prompt on the Mac offered Always Allow, Allow for 24 Hours and Don’t Allow. The path named in the text was the package’s parent directory, not the package.

That fits a rule described by developer Artem Novichkov: approval extends to everything beneath the directory that contains the project. Swift packages have no project file, so the containing directory is one step up. A package at ~/Projects/MyApp/Packages/Core would request Packages. One placed directly in ~/Projects would, on the same logic, request the whole of ~/Projects. The tester didn’t try that last case, and it rests on four sample packages.

Claude Code’s prompt put Always Allow first. The stored grant for the new folder carried no expiry.

Silence doesn’t grant access

An earlier write-up claimed an approved agent could widen its own reach by opening a project outside every approved folder. Xcode 27.2 with the app closed didn’t behave that way in three tries. Each request waited about a minute with nobody answering and then failed, telling the agent to ask the user to approve it through the menu bar icon or the command line.

Unsigned clients got less. With no grant, one could list all 54 tool names, but none of the four calls tried succeeded. After receiving a grant that expired a day later, it could list workspaces and search documentation, though opening a new folder still waited for a separate approval. The agent name shown in logs and dialogs for an unsigned client is simply what the client claims. The server verifies signatures and file paths itself.

Practical advice for now

The preview is already changing: a start subcommand seen in a September build is missing from 27.2. Until Apple documents the rules, developers running the Xcode headless MCP server can limit exposure:

  • Check the path in each prompt, and choose the 24-hour option when unsure.
  • Review current grants with the status command, which needs no sudo.
  • Skip the approve-all flag unless the machine runs unattended.

Apple has not yet explained how these permissions work in one place, so the server’s logs remain the clearest view of what a click approved.

Source: Blake Crosley

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.