xcode_open_projectLABSCO SUMMARY
The test-result tools are the part nothing else gives you.
Building from a command line is well covered elsewhere. Reading an .xcresult bundle - console output around the failure, a screenshot at the exact timestamp, the UI hierarchy compressed enough to fit in a reply - is what turns a red test into something a model can actually diagnose. Note the direction of travel: the author expects to default to sidekick mode alongside Apple's own server.
What it is
A server that controls the Xcode application through JavaScript for Automation rather than shelling out to xcodebuild, so builds and runs happen inside the IDE you already have open. It also parses build logs and digs into .xcresult bundles.
What you get
- Projects and workspaces: open one, read workspace status, list projects, and open a file at a line
- Build, clean, test, build-and-run, debug and stop, with build errors parsed to precise file and line
- Schemes listed and switched, and run destinations - simulators and devices - enumerated
- Test results browsed from an .xcresult bundle, with a quick summary and per-test console output
- Screenshots extracted from failing tests at a timestamp you choose
- UI hierarchies returned as compact JSON, with a follow-up call for the full properties of one element by index
- Attachments listed and exported, and an environment health check that reports what is missing
Requirements
macOS with Xcode installed, and Node.js 18+; run it with npx and the published package. XCLogParser is recommended and installed with Homebrew - without it the server still works but build error parsing is limited. Preferred scheme and project can be set in the environment so tool parameters become optional on a single-project workflow. Apple now ships an official Xcode MCP server; this one can run beside it in sidekick mode, which restricts it to project management and test-result analysis.
Setup effort
One command — npx -y xcodemcp@latest
USE CASES
Working out why a UI test failed
Browse the result bundle, read the console output to find the failure timestamp, then pull the screenshot and the UI hierarchy at that moment.
Building and fixing in a loop
Build in Xcode and get errors back with file and line, fix, and build again without leaving the conversation.
Running a target on the right device
List the schemes and run destinations, set the active scheme, then build and run.
Finding out why the setup is not working
Run the health check, which reports on Xcode, the log parser, automation permissions and the scripting bridge.
Inspecting one element in a captured hierarchy
Take the index from the compact hierarchy and request that element's full properties, including accessibility and frame.
23 tools
Listed in project docs. Your client may show a different list.
xcode_get_workspace_infoxcode_get_projectsxcode_open_filexcode_buildxcode_cleanxcode_testxcode_build_and_runxcode_debugxcode_stopxcode_get_schemesxcode_set_active_schemexcode_get_run_destinationsxcresult_browsexcresult_browser_get_consolexcresult_summaryxcresult_get_screenshotxcresult_get_ui_hierarchyxcresult_get_ui_elementxcresult_list_attachmentsxcresult_export_attachmentxcode_health_checkfind_xcresultsBEFORE YOU INSTALL
What to know first
Tools you get
23 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js 18+
INSTALLATION
Connect your client
Server setup
npx -y xcodemcp@latestMCP Clients
Claude Code
claude mcp add-json XcodeMCP '{
"command": "npx",
"args": ["-y", "xcodemcp@latest"],
"env": {
}
}'Claude Code — sidekick mode
{
"mcpServers": {
"xcode": {
"command": "xcrun",
"args": [
"mcpbridge"
]
},
"xcodemcp": {
"command": "npx",
"args": [
"-y",
"xcodemcp@latest",
"--sidekick-only"
]
}
}
}VS Code, VS Code Insiders
{
"servers": {
"xcodemcp": {
"command": "npx",
"args": [
"-y",
"xcodemcp@latest"
],
"env": {}
}
}
}Cursor
{
"mcpServers": {
"xcodemcp": {
"command": "npx",
"args": [
"-y",
"xcodemcp@latest"
],
"env": {}
}
}
}