Run:
xcode-mcli setupIf it fails with Failed to locate xcrun mcpbridge.:
- confirm Xcode is installed
- confirm
Xcode Toolsis enabled inSettings > Intelligence - confirm
xcrunresolves from your shell
If it fails with Failed to call xcrun mcpbridge --help.:
- enable
Xcode ToolsinSettings > Intelligence - run
xcode-mcli setupagain
Make sure Xcode is open with a workspace or project window.
Then run:
xcode-mcli windows listUse one of these paths:
xcode-mcli windows list
xcode-mcli windows use --tab-identifier windowtab1Or pass the tab directly on the command:
xcode-mcli files read --tab-identifier windowtab1 --file-path Path/To/File.swiftPick one explicitly:
xcode-mcli windows list
xcode-mcli windows use --tab-identifier windowtab1The first tool-backed command may trigger an Xcode permission prompt for the CLI process.
If you change terminals, shells, or Node installations, macOS may ask again because the calling process identity changed.
Restart it:
xcode-mcli daemon restartOr stop and start it:
xcode-mcli daemon stop
xcode-mcli daemon startInspect status:
xcode-mcli daemon statusIf the state root still points at a stale daemon process or socket, the next daemon-backed command replaces that stale state and reconnects through one live daemon for the state root.
--json writes the stable envelope to stdout.
For tool-backed commands, --verbose writes the tool name to stderr.
This keeps stdout parseable:
xcode-mcli windows list --json --verboseThese commands require --yes:
files rmfiles updatefiles writefiles mv --overwrite-existing
Example:
xcode-mcli files write --tab-identifier windowtab1 --file-path Path/To/File.swift --content 'let x = 1' --yesSome Xcode mutating tools depend on project structure resolution inside the active workspace.
If files mkdir reports a message telling you to run XcodeLS first, warm the structure with:
xcode-mcli files ls --path .Then retry the mutating command against a path inside an existing project-recognized subtree.
If Xcode returns a group-resolution failure for a path that is not already represented in the project structure, use a disposable path under an existing group such as a known source folder.
The default state root is:
~/Library/Application Support/xcode-mcli
Important files:
daemon.sockdaemon.piddaemon.logstate.json
Run:
npm run compat:xcode-mcp:verifyIf it fails, inspect the categorized diff with:
xcode-mcli surface verify --baseline-file skill/references/apple-xcode-26.3.surface.json --jsonReview whether the live Xcode release changed:
- protocol version
- tool definitions
- prompt definitions
- resource definitions
If the live contract is the one you want to support, re-pin the baseline snapshot after updating the wrapper behavior that depends on it.