XcodeBLOCK
MCP server for Xcode that wraps its AppleScript interface & uses XCLogParser to return clear build results
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Using with Apple's Official Xcode MCP: Apple now provides an official Xcode MCP server. XcodeMCP can run alongside it in sidekick mode (--sidekick-only), providing complementary tools like project management and XCResult analysis. In a future version, XcodeMCP will transition to sidekick-only mode by default. See configuration below.[](https://www.npmjs.com/package/xcodemcp) [](https://github.com/lapfelix/XcodeMCP/actions/workflows/test.yml)
Model Context Protocol (MCP) server that controls Xcode directly through JavaScript for Automation (JXA). Available as both an MCP server and a standalone CLI.
What it does
- Controls Xcode directly through JavaScript for Automation (not xcodebuild CLI)
- Opens projects, builds, runs, tests, and debugs from within Xcode
- Parses build logs with precise error locations using XCLogParser
- Provides comprehensive environment validation and health checks
- Supports graceful degradation when optional dependencies are missing
- NEW: Includes a full-featured CLI with 100% MCP server feature parity
Requirements
- macOS with Xcode installed
- Node.js 18+
- XCLogParser (recommended):
brew install xclogparser
Usage
XcodeMCP can be used in two ways:
- MCP Server: Integrate with Claude Desktop, VS Code, or other MCP clients
- CLI Tool: Run commands directly from the terminal with
xcodecontrol
Quick Install
[](https://insiders.vscode.dev/redirect/mcp/install?name=xcodemcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22xcodemc
c8f102c21707OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add xcodemcp -- npx -y [email protected]
{
"mcpServers": {
"xcodemcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (26)
20 read · 6 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
find_xcresults | read | Find all XCResult files for a specific project with timestamps and file information |
xcode_build | read | Build a specific Xcode project or workspace with the specified scheme. If destination is not provided, uses the currently active destination. |
xcode_build_and_run | write | Build and run a specific project with the specified scheme |
xcode_clean | read | Clean the build directory for a specific project |
xcode_close_project | read | Close the currently active Xcode project or workspace (automatically stops any running actions first) |
xcode_debug | write | Start debugging session for a specific project |
xcode_get_projects | read | Get list of projects in a specific workspace |
xcode_get_run_destinations | write | Get list of available run destinations for a specific project |
xcode_get_schemes | read | Get list of available schemes for a specific project |
xcode_get_test_targets | read | Get information about test targets in a project, including names and identifiers |
xcode_get_workspace_info | read | Get information about a specific workspace |
xcode_health_check | read | Perform a comprehensive health check of the XcodeMCP environment and configuration |
xcode_open_file | read | Open a file in Xcode |
xcode_open_project | read | Open an Xcode project or workspace |
xcode_refresh_project | read | Refresh/reload an Xcode project by closing and reopening it to pick up external changes like modified .xctestplan files |
xcode_set_active_scheme | write | Set the active scheme for a specific project |
xcode_stop | write | Stop the current scheme action |
xcode_test | write | Run tests for a specific project |
xcresult_browse | read | Browse XCResult files - list all tests or show details for a specific test. Returns comprehensive test results including pass/fail status, failure details, and browsing instructions. Large console output (>20 lines or >2KB) is automatically saved to a temporary file. |
xcresult_browser_get_console | read | Get console output and test activities for a specific test in an XCResult file. Large output (>20 lines or >2KB) is automatically saved to a temporary file. |
xcresult_export_attachment | read | Export a specific attachment by index - can convert App UI hierarchy attachments to JSON |
xcresult_get_screenshot | read | Get screenshot from a failed test at specific timestamp - extracts frame from video attachment using ffmpeg |
xcresult_get_ui_element | read | Get full details of a specific UI element by index from a previously exported UI hierarchy JSON file |
xcresult_get_ui_hierarchy | read | Get UI hierarchy attachment from test. Returns raw accessibility tree (best for AI), slim AI-readable JSON (default), or full JSON. |
xcresult_list_attachments | read | List all attachments for a specific test - shows attachment names, types, and indices for export |
xcresult_summary | read | Get a quick summary of test results from an XCResult file |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (15)
text: '❌ No Xcode installation found\n\n💡 To fix this:\n• Install Xcode from the Mac App Store\n• Run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer'
text: '❌ No Xcode installation found\n\n💡 To fix this:\n• Install Xcode from the Mac App Store\n• Run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer'
new Function(script);
new Function(script);
return createMockProcess('/usr/local/bin/xclogparser', '', 0);expect(result.metadata?.path).toBe('/usr/local/bin/xclogparser');return createMockProcess('/usr/local/bin/xclogparser', '', 0);'/usr/local/bin/xclogparser',
const foundPath = '/usr/local/bin/xclogparser';
import { ProjectTools } from '../../src/tools/ProjectTools.js';const packageJsonPath = path.join(__dirname, '../../package.json');
const packageJsonPath = path.join(__dirname, '../../package.json');
sudo mv mcp-publisher /usr/local/bin/
@modelcontextprotocol/sdk, commander, eventsource, node-fetch, @types/node, @vitest/coverage-v8, @vitest/ui, execa
system use found in code, not declared in the description
Gates applied: no_behavioural_pass.
c8f102c21707full audit observations/trust-audit/mcp-server/lapfelix__xcode-4.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | c8f102c21707 | BLOCK | D | 69 | first audit |
Questions
What is the Xcode MCP server?
MCP server for Xcode that wraps its AppleScript interface & uses XCLogParser to return clear build results
What tools does Xcode expose?
26 in total: 20 read-only, 6 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Xcode safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does Xcode need?
No credential environment variables were found in its source, so it appears to need none.
How does Xcode run?
It speaks sse and stdio, so it runs as a local process your client starts. It is published on npm as xcodemcp at 2.1.4.
How current is this page?
The grade is for one exact copy of the source (c8f102c21707), read on 2026-10-08. The repository is watched and re-audited when it changes.