Xcode's Headless MCP Server: What One Approval Grants
Xcode 27.2’s headless MCP server answered my coding agents with the Xcode app closed. With individual approvals enabled, it kept two lists, one of agents and one of folder trees.12 It identified Claude Code by signing team and identifier, and my Python interpreter by binary path and hash. All 52 Claude Code connections the server logged in one morning matched a single grant. When an agent asked to open a Swift package by its folder, the approval dialog named the folder above the package, and for Claude Code its first button was Always Allow.2 I ran these tests on November 25, 2026. Each section says which runs had the Xcode app closed and what I did not test.
TL;DR
- Apple’s record of headless mode is one release-note entry that describes it, a one-line fix that names its menu bar item, a settings menu, and the tool’s own help text. Apple’s setup page for external agents still tells you to open your project in Xcode first.123
- For a signed agent, trust attaches to the signature. One grant, for
com.anthropic.claude-code, matched every Claude Code connection the server logged, and 48 of those 52 had no recorded tool call in that interval.2 - The approval dialog names a folder, and for a package opened by its folder path, that folder is the package’s parent. Artem Novichkov states the rule as “the directory containing the project, recursively.”24
- With the Xcode app closed, three unanswered requests each held for about a minute, failed, and granted nothing. A September write-up reports a silent grant. Before those runs, four new entries appeared in the stored lists, three folders and the Python interpreter, and I could not establish how any of the four was approved.25
- Before approval, an unsigned client listed the same 54 tool names, and none of the four calls I tried returned a successful result. Once it held a grant with an expiry a day out, workspace listing and documentation search returned results, and an open call on a new folder still waited for a folder approval.2
- The agent name in the server’s log, and in the dialog for an unsigned agent, is whatever the client sends. The signature and the binary path are the server’s own findings.2
What Apple has published
The release notes for Xcode 27 carry one entry that describes headless mode:1
Xcode 27 Beta 5 adds a preview of a new MCP server experience that runs without requiring an open Xcode workspace. This new experience also allows you to grant code-signed agents permission to use projects within a directory tree for extended periods of time without being asked for additional permissions.
The entry gives two commands, sudo xcrun mcp-server enable to turn the mode on and xcrun mcp-server status to check it, and a third for unattended machines: sudo xcrun mcp-server enable --unsafe-always-allow-all-agents, which the note calls “not a recommended configuration for at-desk use.” It closes with a warning that, in this early preview, some settings or permissions “may occasionally require relaunching Xcode or rebooting your machine to apply.”1
One more line in the same section, under Resolved Issues, names the service in passing: “Fixed: In some cases, connected projects may not appear in the Xcode Service menu bar extra panel.” (185161968)1
Apple’s page on giving external agents access to Xcode documents the other control. In Xcode’s Intelligence settings, under Model Context Protocol, a pop-up menu named “Allow External Agents to Use Xcode Tools” offers Always, “While Xcode is Open,” and Never. The page never mentions mcp-server or headless mode, and it says: “Before prompting an external agent (outside of Xcode), be sure to open your project in Xcode.”3 Novichkov, who tested the two together, writes that “Always is the headless answer: agents reach the tools whether or not Xcode is running,” and that running enable after choosing Always “is a no-op.”4 I did not open that settings pane during these tests, so how the menu and the command relate is his report; I did not check it. My earlier post on Claude Code and Apple’s Xcode MCP server covers the windowed setup, and Xcode 27 Went Agentic covers the agents built into the IDE.
I found nothing further from Apple. The release notes for Xcode 27.1, 27.2, and 27.3 beta 2 do not mention mcp-server, mcpbridge, or headless mode. The Apple command-line reference pages I checked do not mention them, and no transcript among eleven WWDC 2026 sessions I searched names the bridge or the server; beta 5 shipped in August, after the conference.6
The tool documents itself. xcrun mcp-server --help on Xcode 27.2 lists eleven subcommands, and the top-level help text is the same on the 27.1 release candidate and 27.3 beta 2:2
| Subcommand | What the help text says | Help text says sudo |
|---|---|---|
open |
Launch if needed, then open one or more workspaces or projects | No |
stop |
Terminate the running MCP server | No |
enable / disable |
Turn headless mode on; turn it off and stop the running server | Yes |
approve |
Approve a pending agent or folder request by its id | Yes |
allow-folder |
Permit workspaces from a folder and its subfolders | Yes |
deny |
Deny by id: a pending request, a permitted agent, or a permitted folder | Yes |
clear-permissions |
Remove all granted agent and folder permissions | Yes |
reset-all |
Delete all stored permission state and kill the running server | Yes |
status |
Report the server process and its configuration | No |
show-logs |
Dump the agent activity log to a file and print its path | No |
approve and allow-folder each take --always or --for-24-hours, and the help for approve describes --always as “Grant durable trust (signed agents and folders only).” During the tests I ran status, show-logs, and the help commands, all without sudo, and no command that needs it; afterwards I ran deny, covered near the end. I did not run open or stop, so for those two the column is the help text’s account. Baykar’s write-up lists five of these commands and says “Only status runs without sudo,” which agrees with the help text for those five. His September build also had a start subcommand, which the 27.2 help does not list, so the tool has changed between his tests and mine.25
What the server looks like when it is running
With headless mode on and the Xcode app closed, the server is a process named Xcode Service inside the Xcode bundle. xcrun mcp-server status printed this at 11:35 that day, with a process check showing the Xcode app closed (output condensed: identifiers and paths shortened, project folders replaced with placeholders, 13 folder rows omitted):2
Permission: enabled
Permitted agents:
AC5815A8-…: signed Q6L2SF6YDW com.anthropic.claude-code
388F3CB0-…: unsigned …/Python.app/Contents/MacOS/Python e89d60f8ccee… (expires 2026-11-26 16:52:40 +0000)
Permitted folders:
E3DF620A-…: /Users/<you>/Projects/<app-one>
… 13 more …
mcp-server: running
Open workspaces: none
The second agent is a product of my own tests, and a later section explains how it got there. status --format json returns the same facts as an object with permission.enabled, permission.permittedAgents, permission.permittedFolders, permission.unsafeAlwaysAllowAllAgents, openWorkspaces, and running.2 Mehmet Baykar’s and Novichkov’s write-ups both name the file the grants live in, under ~/Library/Group Containers/group.com.apple.dt.Xcode.SecureSettingsContainer/CodingAssistant/HeadlessPermissions/mcp-server.json, and both advise against editing it.45 On my Mac that file’s mode is -rw-------, and it holds the two lists plus an enabled flag, a version, and an onboarding marker. I read it and did not edit it.2
At the same moment 28 mcpbridge processes were running. The bridge is the stdio command an agent starts to reach the server, the one Apple’s page gives for Claude Code: claude mcp add --transport stdio xcode -- xcrun mcpbridge.3 My earlier post on the Xcode plugin for Claude Code covers what that bridge’s 54 tools are, and the post on Xcode’s exportable agent skills covers the skills that ship beside them.
Trust is a signature, and every session inherits it
The first permitted agent is a code signature: team Q6L2SF6YDW, identifier com.anthropic.claude-code. xcrun mcp-server show-logs dumps the server’s agent activity log, and each Claude Code connection in it reads like this (condensed: record prefixes omitted, path and grant id shortened):2
agent: Claude Code [57596b03] | connected | binary: …/claude/versions/2.1.332 | pid: 47602 | signed by: Q6L2SF6YDW (Anthropic PBC) …
agent: Claude Code [57596b03] | agent access permitted (already approved, always allow) | grant: AC5815A8-…
agent: Claude Code [57596b03] | disconnected | 0 tool calls over 7.429s
Between 05:30 and 11:13 that morning the service logged 55 connections: 52 from Claude Code and three from my test client. All 52 matched the same grant, each with the “already approved, always allow” line. Four had recorded tool calls, and two of those four were my own tests. Of the other 48, 46 disconnected with zero calls and two had no recorded disconnect. One additional connection made a call at 10:57 without a start record in this capture.2 Those 48 made no recorded use of Xcode’s tools in that interval. My xcode server entry is configured for the user and not for a project, so I take it that each session started the bridge for that reason; I did not trace each one.
Two things follow. A grant given to one session during one task is a grant to every process that carries the signature, including sessions in other projects and sessions that have not started yet. The sessions also share the server itself. From one session I opened a package and received the workspace identifier workspace-x7unzVI6jn. A second, separate Claude Code session, asked only to list workspaces, returned that same identifier and path.2 Antoine van der Lee flags where that leads: “The active scheme and test plan live in the MCP server, so every agent that uses it shares them.” He adds that he has not tested agents running at the same time and calls it a risk.7 I did not test scheme switching either.
One caution about the morning’s log. From 08:54 some of its lines come from a process named Xcode, not Xcode Service: the Xcode app had been opened on the Mac at 08:12 and stayed open until late morning. I left those 15 lines out of the counts above. The shared-workspace test ran in that period. The late-morning runs in the next three sections ran after 11:35 with the app closed, and process checks around each one found it closed.2
What the approval dialog offers
Folder grants are the list that grows. To see one being requested, I made a throwaway Swift package in a folder outside every permitted tree and had a Claude Code process call XcodeOpenWorkspace with the path of the package’s folder, …/probe-d/GrantProbeD. A dialog appeared on the Mac, with the Xcode icon, and read (path shortened):2
Allow Claude Code to access GrantProbeD? Allowing access gives the agent permission to open and work in any Xcode projects at the path: /Users/<you>/…/probe-d
It offered three buttons: Always Allow, Allow for 24 Hours, and Don’t Allow.
The path in the dialog is probe-d, the folder that contains the package, not probe-d/GrantProbeD, the folder I passed. status listed the same request as GrantProbeD in /Users/<you>/…/probe-d.2 The dialog’s path matches the rule Novichkov gives for these prompts: approval covers “anything under the path it names (the directory containing the project, recursively).”4 By that rule, for an .xcodeproj the containing directory would be the project’s own folder; I did not test one. A Swift package has no project file, so an agent opens it by its folder, and the directory containing that path is one level up.
A pair of calls from earlier that morning shows the same rule from both sides, with the limit that the Xcode app was open by then. I first passed the path of the package’s Package.swift. The call returned Files of type 'Swift Source' cannot be opened outside of a workspace. The log recorded an approval for the package folder. I then passed the package folder. The call opened the workspace, and the log recorded a second approval, for the parent. These are the two approval records, condensed: I shortened the timestamps, paths, and grant ids and omitted the process and agent fields.2
08:27:13 … project access permitted (approved by user just now, always allow): …/probe/GrantProbe | tool: XcodeOpenWorkspace | grant: A0AA7E51-…
08:27:17 … project access permitted (approved by user just now, always allow): …/probe | tool: XcodeOpenWorkspace | grant: AB392AEF-…
Afterwards the permissions file had grown from 11 folders to 12. The new entry was the second grant, with subtreeRoot set to …/probe. The first grant’s id was not in the file, so I leave it out of the count of stored entries below. The entry has no expiry field.2
What the rule reaches depends on where a package sits. One at ~/Projects/MyApp/Packages/Core would ask for Packages. One that sits directly in ~/Projects would, by the same rule, ask for all of ~/Projects. I did not run that case, because approving it would have widened the real grants on my Mac. Treat it as an inference from four packages, two of them in dialogs I saw, and read the path in the dialog before you answer it.
With no one answering, nothing was granted
Baykar’s September write-up includes a warning worth testing: “A permitted agent can extend its own reach: calling XcodeOpenWorkspace on a project outside every granted folder adds that folder silently.”5 If that held, the folder list would record where agents had been and would control nothing.
On Xcode 27.2, with the Xcode app closed, I ran the open call three times against folders outside every grant, and no request was answered. The service logged all three as refused after 1 minute 2 seconds to 1 minute 4 seconds, with the reason awaiting user approval for and the parent folder’s path. I preserved this error text from the first and third runs:2
Xcode is waiting for the user to approve this request; it has been recorded. Ask the user to approve it from the Xcode MCP menu bar icon, or via `xcrun mcp-server`, then retry.
After the first run, status still listed the folder request as pending. The permissions file’s modification time, read before and after the second and third runs, stayed at 11:14:02, and no new folder was in the lists after any of the three.2
The dialogs were less regular than the calls. I saw one for the first run and one for the third. The first run’s dialog was on screen at 11:38, after its call had already failed at 11:37:15. The first went away unanswered at a time I did not record, and no button was pressed on the third. I saw none for the second run, which began within a minute of the first run’s dialog being on screen. I cannot say how long a dialog stays up or whether a retry brings it back.
Baykar tested an earlier build, and I have not tested his, so both results may be right for their builds. In these three runs the agent could ask and could not answer for me.
Novichkov’s separate reference notes on the headless server make the same report as Baykar, that an approved agent opening a project outside every permitted folder adds the folder “without a prompt,” and add a second: “launching mcpbridge from an approved agent’s process tree grants the launcher a 24-hour agent permission of its own.”4 I ran my Python client from inside a Claude Code session, so his second report describes one way the interpreter in the next section could have gained its grant. I did not test it, and the server logged that interpreter’s first connections as pending.
The pending list did not survive a restart. The Xcode Service process was replaced at least twice during the late-morning runs: my saved output shows three process ids. I did not find the reason, and I found no crash report for the service in the diagnostic reports I checked. After the first replacement status listed no pending approvals, the permitted lists were unchanged, and the count of mcpbridge processes had fallen from 28 to 1.2 Novichkov writes that the service “launches on demand the moment an agent connects through the bridge,” which would explain a new process appearing, though not why the old one ended.4
I also have to report what I could not account for. Before the controlled runs, four new entries appeared in the stored lists, three folders and the Python interpreter, and I could not establish how any of the four was approved:
- The
probefolder. The log says a user approved it during a call that lasted 4.3 seconds. Its approval line came four seconds after the approval line of a 2.4-second call, which the log recorded as approved for the package folder. - A second test folder,
probe-b. Its request was refused at 08:56, on a call during which the Mac’s input stayed idle. The folder was in the permissions file by 11:14:02, the file’s last modification time. - A folder requested by an unrelated session and refused at 11:13:14. It was in the file by the same 11:14:02.
- The Python interpreter in the next section, which the lists showed as a permitted agent three minutes after the service refused its open call.
The service logged an approval for the first. For the other three it logged a refused open call before I found the permission. One Xcode app process ran from 08:12 to at least 11:12:03, the time of its last line in the log, so the first approval, the 08:52 agent approval, and the 08:56 refusal all happened with the app open. Two events fall after that line: the 11:13:14 refusal of the third request, and the file’s last write at 11:14:02. I did not record when the app closed, so I cannot say whether either happened with it open or closed, and I have no write time for probe-b beyond the same upper bound.
The log is a record of what the server allowed, and on this evidence it is not a complete record of how each permission was given. To compare on your own Mac, record the screen and save the pending ids, the permitted lists, and the permissions file’s modification time around each request. That lets you match visible button presses to state changes. A change with no recorded click still has an unknown cause.2
What an unsigned client can see and do
To see the other side of the signature check, I wrote a 61-line MCP client in Python and ran it with Homebrew’s Python. codesign reports that interpreter’s signature as ad-hoc with no team identifier, and the server describes it as unsigned. The client starts xcrun mcpbridge, sends initialize and tools/list, and calls whatever tools it is given.2
Before the interpreter held any grant, with the Xcode app open on the Mac:
| Step | Result |
|---|---|
initialize |
Answered: server xcode-tools, version 25464 |
tools/list |
Answered: 54 tools, the same 54 names an approved session gets |
DocumentationSearch |
Refused in 0.017 seconds |
XcodeListTemplates |
Refused in 0.025 seconds |
XcodeOpenWorkspace on a permitted folder |
No reply in the 25 seconds the client waited; the server logged a refusal later, awaiting user approval |
XcodeListWorkspaces (an earlier run) |
No reply in 45 seconds, and no tool-call line in the server’s log |
Both immediate refusals came back as tool results with isError set to true and this text:
This agent isn't approved to use Xcode's tools yet. Call XcodeOpenWorkspace or XcodeNewProject first: opening or creating a project is what asks the user to approve this agent, together with access to that project's folder.
Both refusal records in the log gave the reason agent not approved by user.2 So a local process with no approval and no signing identity read the catalog, and nothing in that exchange depended on my script. My probe kept the 54 names and discarded the rest of the response; Novichkov’s saved captures of the same call on 27.2 show a description and an input schema for each tool.4 None of the four calls I tried before approval returned a successful result.
The open call queued an agent request, and status described it like this (condensed: the pending section only, id and path shortened):2
Pending approvals:
blog-probe (do not approve) is waiting on:
agent 1CD14372-…: blog-probe (do not approve) — unsigned …/Python.app/Contents/MacOS/Python e89d60f8ccee… (expires 2026-11-25 16:48:27 +0000)
The expires value is printed as the server gave it. It is the same second the server logged that client’s connection, 08:48:27 Pacific, and I cannot explain why a pending request carries it. The path and the word “unsigned” come from the server’s inspection of the process. The name does not. It is the clientInfo.name my client sent. When I had the same client send the name Claude Code, the activity log printed agent: Claude Code on every line for that connection, refusals included, while the connection line still showed the Python binary and the grant check still refused it.2
The interpreter then gained a grant, and the server’s log has no line for it. The next status I saved, at 08:56, lists it as a permitted agent under a different id from the pending request, with an expiry of 2026-11-26 16:52:40 UTC. If the grant runs 24 hours, it began at 08:52:40 Pacific, three minutes after the server logged the client’s open call as refused. Nothing I saved shows how. The server’s refusal text names two ways to answer a request, the menu bar icon and xcrun mcp-server. The dialog is a third. Novichkov’s reference describes a route that needs no answer, a launcher inheriting a 24-hour grant from an approved agent’s process tree.4 The client had identified itself as blog-probe (do not approve), which prevented nothing.2
The grant let me test the rest. At 11:36, with the Xcode app closed, the same interpreter connected under a fourth name and was recognized by its binary (log lines condensed: record prefixes omitted, grant id shortened):2
agent: probe-python-approved-24h [482bf46a] | agent access permitted (already approved, until 2026-11-26T08:52:40-0800) | grant: 388F3CB0-…
agent: probe-python-approved-24h [482bf46a] | tool call: XcodeListWorkspaces | 0.032s | project: none
agent: probe-python-approved-24h [482bf46a] | tool call: DocumentationSearch | 1.876s | project: none
Both calls returned real results. The permitted entry holds the interpreter’s path and a hash, and nothing about my script, so I infer that for those 24 hours any script run by that interpreter is a permitted Xcode agent, whatever it calls itself. I ran only the one script. Going by the structure of the two lists, which hold no per-agent folder field, the grant covers every permitted folder; I did not open a permitted folder from the approved client.
When that client then asked for a new folder, the dialog differed from Claude Code’s in three ways. The icon carried a warning badge. The title read “Allow an unknown agent (probe-python-approved-24h) to access GrantProbeC?”, with the self-declared name in parentheses. And it offered two buttons, Allow for 24 Hours and Don’t Allow, with no Always Allow.2 The help text describes --always as durable trust for “signed agents and folders only.” For this unsigned agent’s folder request the dialog offered no durable choice, and Baykar reports that unsigned binaries receive only 24-hour grants.25 Both dialogs I saw were folder requests from agents that already held an agent grant; I did not see the dialog for an agent’s first approval. Neither showed the binary’s path. Baykar also reports that the signature recorded belongs to the process that started the bridge, so a wrapper command gets approved in place of the agent behind it; I did not test that.
What I would check on a Mac that runs agents
Four commands cover it, and none needs sudo:
# 1. Is headless mode on, who is permitted, where, and what is pending?
xcrun mcp-server status
# 2. The same as JSON, including the allow-all-agents flag.
xcrun mcp-server status --format json
# 3. Who has connected, what they called, and what was refused.
xcrun mcp-server show-logs
# 4. Count bridge processes owned by the current user.
pgrep -x -u "$(id -u)" mcpbridge | wc -l
Read both lists for entries you do not recognize. Mine had a folder under /tmp, left by an earlier session, and after these tests an interpreter whose approval I cannot account for. status prints an id beside every entry, and the help text says sudo xcrun mcp-server deny <id> takes a pending request, a permitted agent, or a permitted folder. After the tests I ran it three times, once for the interpreter and once for each of my two test folders. Each printed a line of the form mcp-server: denied <id> (permitted agent) or (permitted folder), and the next status showed the three entries gone and the server not running. Baykar’s table says of deny that “denying an agent stops the service,” which fits; I did not check which of the three commands stopped it.25
Read the path in each dialog before answering. In my late-morning runs a request I did not answer was still in the pending list minutes later, and a replacement of the service process emptied the list, so the agent had to ask again. I did not test how long a request stays pending otherwise. Three earlier requests that the server had refused as unanswered, one for an agent and two for folders, later turned up as permissions, and I cannot say who or what answered them. The server’s own error text names two places to answer it later: “the Xcode MCP menu bar icon” and xcrun mcp-server. Novichkov describes that menu bar item and notes that it is absent whenever the Xcode app is running.4 I did not open it during these tests.
If most of your sessions never touch Xcode, look at where the bridge is configured. Claude Code’s documentation describes three scopes for an MCP server: local, the default, for you in one project; project, shared through a .mcp.json file; and user, across all your projects.8 Apple’s example command sets no scope, so it registers the bridge at local scope. Mine was registered at user scope, the likely reason 48 connections from my Mac reached the server with no recorded tool call. To limit default connections, remove the user-scope registration and use local scope in the projects where you need it, or project scope to share the setup with teammates, and check whether an enabled plugin also supplies an xcode server. These settings change when Claude Code starts the bridge. The Xcode grant still applies whenever that signed client connects. For the wider argument about why a server-level grant is too coarse for tools like these, see MCP tools need action-level authorization. Apple has raised a parallel question for file access, which I covered in macOS Full Disk Access and AI Agents, and the wider setup is in my guide to building iOS apps with AI agents.
Key Takeaways
For iOS and Mac developers using agents:
- Headless mode removes the open-window requirement and adds a permission model of its own.
xcrun mcp-server statusshows that model’s state: agents, folders, and pending requests. - The dialog names a folder. For a Swift package opened by its folder, the request named the parent for all four packages I tried.
For anyone running several agents on one Mac:
- One agent grant covers every process with that signature, and the sessions share the server’s open workspaces.
- The service process was replaced at least twice in one morning. After the first replacement, the bridge count had fallen from 28 to 1 and every pending request was gone.
For security reviewers:
- An unapproved local process listed the 54 tool names, and none of the four calls it tried succeeded.
- The approval for an unsigned interpreter is recorded against the interpreter’s path and a hash. I infer that it covers every script the interpreter runs, in every permitted folder, until it expires; I tested one script and no permitted folder. Agent names in the log and in the unsigned agent’s dialog are self-reported.
- On Xcode 27.2, with the Xcode app closed, three unanswered requests granted nothing. Before those runs, four new entries appeared in the stored lists, three folders and the Python interpreter, and I could not establish how any of the four was approved. Test your own build; two other authors report silent grants.
FAQ
What is Xcode’s headless MCP server?
A preview, introduced in Xcode 27 beta 5, of Xcode’s MCP server running “without requiring an open Xcode workspace.” You turn it on with sudo xcrun mcp-server enable, and agents reach it through the same xcrun mcpbridge command the windowed setup uses.13
Does a coding agent need the Xcode app open?
Not for what I tested. With the app closed, a background process named Xcode Service answered the bridge, listed 54 tools, and served documentation search and workspace listing. I did not run a build in these tests; Novichkov’s write-up covers a build, previews and a simulator run through the headless server, and van der Lee’s measures builds and tests.247
Who can use the tools once headless mode is on?
With individual approvals enabled, the service checks the agent grant, and Apple documents a separate allow-all mode for unattended machines.1 Opening a project also needs its folder to sit inside a permitted tree; the two calls I made that involve no project, workspace listing and documentation search, were answered with none open. A signed agent is listed by team and signing identifier, and an unsigned one by its binary’s path and a hash. On my Mac every Claude Code session matched the one signed entry.2
Can an agent grant itself access to a new folder?
Not in my controlled runs. On Xcode 27.2 with the Xcode app closed, three unanswered requests each failed after about a minute and left the permissions file unchanged. Earlier the same day, four new entries appeared in the stored lists, three folders and the Python interpreter, and I could not establish how any of the four was approved. Two other authors report silent grants.245
How long does an approval last?
Both dialogs I saw were folder requests from already-approved agents. Claude Code’s offered Always Allow and Allow for 24 Hours. Python’s offered Allow for 24 Hours as its only approval choice, even though the request was for a folder. The help text describes --always as durable trust for “signed agents and folders only,” and the always-allow folder entry I examined has no expiry field. I did not observe the Python interpreter’s own approval.2
How do I remove a folder or agent I approved?
xcrun mcp-server status prints an id beside each entry, and the help text says sudo xcrun mcp-server deny <id> works on a pending request, a permitted agent, or a permitted folder. I ran it after the tests on one agent and two folders, and all three entries were gone from the next status.2
What I measured
The day in order (Pacific time):
| Time | Event | Xcode app |
|---|---|---|
| 08:06 to 08:07 | First status: one agent, 11 folders |
Closed |
| 08:11:59 | Xcode app process started | Open |
| 08:27:13, 08:27:17 | Two approval lines: package folder, then its parent | Open |
| 08:47 to 08:48 | Three runs of the unapproved Python client | Open |
| 08:49:29 | Its open call logged as refused | Open |
| 08:52:40 | Grant start implied by the interpreter’s expiry | Open |
| 08:56:34 | probe-b request refused |
Open |
| 11:12:03 | Last log line from the Xcode app | Open |
| 11:13:14 | Unrelated session’s folder request refused | Not recorded |
| 11:14:02 | Last recorded write to the permissions file before cleanup | Not recorded |
| 11:35 | status: two agents, 14 folders. Process count: 28 bridges |
Closed |
| 11:36 to 11:39 | Approved client’s two calls; unanswered runs one and two | Closed |
| 11:41:58 to 11:44 | Replacement service process started at 11:41:58; later checks showed an empty pending list and one bridge | Closed |
| 11:53 to 11:55 | Unanswered run three | Closed |
| About 12:31 | Three deny commands; Xcode app absent at the 12:32:48 check |
Closed |
- Host: macOS 27.2.1 (26B131). Xcode 27.2 (27B52) selected, with the 27.1 release candidate (27A9275) and 27.3 beta 2 (27C5035i) also installed. Claude Code 2.1.332.
- When: November 25, 2026, 08:06 to 11:56 Pacific time, in two sets, plus a
codesigncheck of the Python interpreter at 12:04, a core count at 12:05, a read of my Claude Code MCP configuration at 12:17, and thedenycommands at about 12:31. The Xcode app was closed at 08:06, had a process start at 08:11:59, and was closed again before 11:35 at a time I did not record. - 08:06 to 08:07, Xcode app closed: the first
statusoutput. - Morning set, Xcode app open from 08:12: the help text on three builds,
status --format json, and the first read of the permissions file, all at 08:19 to 08:20; the permissions file before and after one grant; the two open calls on one package and their log lines; the 08:55 open call on a second package, with input idle readings before and after and thestatusoutput that followed; three runs of the unapproved Python client; the second session’s workspace listing; the activity log from 05:30 to 11:13. - Late-morning set, with process checks around the runs showing the Xcode app closed: the
statusoutput quoted near the top; the approved Python client’s two tool calls; three unanswered open calls on new folders, one from the Python client and two from Claude Code; both approval dialogs, which I transcribed from screenshots; the replacement of the service process. - Load: the Mac was under heavy load from other work, with load averages of 425 and 495 on 12 cores at two of the points I recorded, so nothing here is a timing result, including the call durations I quote from the server’s log. One approved session timed out waiting for a workspace-list reply. The service logged a call duration of 0.048 seconds for that connection. I could not determine where the reply was lost.
- After the tests, about 12:31: three
sudo xcrun mcp-server denycommands and thestatusoutput that followed (the three command lines and their output transcribed from a terminal screenshot; thestatussaved directly). - Not tested: any other
sudosubcommand;denyon a pending request; pressing a specific dialog button under observation; the menu bar item; how long a dialog stays up; an immediate retry against a request that is still pending (a new Claude Code process did request the same folder after the service was replaced, and I saw a dialog); the allow-all-agents flag; a package sitting directly inside a broad folder; a controlled open with an.xcodeprojpath as the argument; a wrapper process between the agent and the bridge; opening a permitted folder from the approved unsigned client; a different script under the approved interpreter;openandstop; scheme switching between sessions; a build through the headless server; Xcode’s Intelligence settings menu; the server in Xcode 27.3 beta 2.
References
-
Apple, Xcode 27 Release Notes, Coding Intelligence, New Features, entry 181836944. Source for the quoted description of the headless preview, the three commands, the “not a recommended configuration for at-desk use” wording, and the relaunch-or-reboot warning. Also the source for resolved issue 185161968, which names the Xcode Service menu bar extra. Read November 25, 2026. ↩↩↩↩↩↩↩
-
Author’s measurements on November 25, 2026: macOS 27.2.1 (26B131), Xcode 27.2 (27B52), Claude Code 2.1.332. Output of
xcrun mcp-server status,status --format json, andshow-logson Xcode 27.2, and of--helpon three Xcode builds; the headless permissions file and its mode; runs of a 61-line Python MCP client overxcrun mcpbridge;XcodeOpenWorkspacecalls on throwaway Swift packages from Claude Code and from that client; a second Claude Code session’sXcodeListWorkspacesresult; two approval dialogs transcribed from screenshots;codesign -dvon the Python interpreter; the user-scopexcodeentry in my Claude Code configuration; threedenycommands and thestatusoutput after them. Author analysis of local output; paths redacted. ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩ -
Apple, Giving external agents access to Xcode. Source for the “Allow External Agents to Use Xcode Tools” menu and its three choices, the
claude mcp addcommand, and the sentence “Before prompting an external agent (outside of Xcode), be sure to open your project in Xcode.” Read November 25, 2026. ↩↩↩↩ -
Artem Novichkov, Headless Xcode: from prompt to simulator with MCP, published August 13, 2026 and updated September 11, 2026. Source for the quoted rule that approval covers “the directory containing the project, recursively,” for the quoted statements about the Always setting,
enablebeing a no-op, and the service launching on demand, for the description of the menu bar item, the location of the permissions file, and the advice not to edit it. His reference notes, xcode-tools-docs, are the source for the two quoted reports of permissions gained without a prompt and for the savedtools/listcaptures. ↩↩↩↩↩↩↩↩↩↩↩ -
Mehmet Baykar, How to run the Xcode 27 MCP server headless with Claude Code, September 8, 2026. Source for the quoted claim that a permitted agent “adds that folder silently,” the location of the permissions file, the advice to treat it as read-only, the quoted statements that only
statusruns withoutsudoand that denying an agent stops the service, thestartsubcommand on his build, and the reports about 24-hour grants for unsigned binaries and wrapper signatures. ↩↩↩↩↩↩↩ -
Author’s search on November 25, 2026 of Apple’s release notes for Xcode 27.1, 27.2, and 27.3 beta 2, three Apple command-line reference pages, and the transcripts of eleven WWDC 2026 sessions on Xcode and coding intelligence. Beta 5’s date, August 10, 2026, is from the community dataset at xcodereleases.com. ↩
-
Antoine van der Lee, Xcode MCP vs xcodebuild, November 23, 2026. Source for the quoted sentence on the shared active scheme and test plan, and for his statement that he has not tested agents running at the same time. ↩↩
-
Anthropic, Connect Claude Code to tools via MCP, Claude Code documentation. Source for the
local,project, anduserscopes and for local being the default. Read November 25, 2026. ↩