Xcode CLISAFE
XCode CLI & Simulator MCP. Progressive disclosure of tool responses reduces context and token waste. Lets AI agents build, run and drive iOS apps — without drowning in Xcode's output.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/xc-mcp) [](https://www.npmjs.com/package/xc-mcp) [](https://codecov.io/gh/conorluddy/xc-mcp) [](https://opensource.org/licenses/MIT)
An MCP server that lets AI agents build, run and drive iOS apps — without drowning in Xcode's output.
XC-MCP wraps xcodebuild, simctl and idb as 77 tools. Its job is not just to expose those commands but to make their output fit in a model's context: summaries first, full detail on demand, and the accessibility tree instead of screenshots wherever the app allows it.
Why it exists
Xcode tooling produces output at a scale no context window survives. Measured against a real app (Grapla, Xcode 27, iPhone 17 Pro simulator):
A single raw build log would overflow a 200k-token context on its own. The full output is never thrown away: it is cached and returned as an MCP resource link, so an agent can drill into the exact errors it needs.
Quick start
Claude Code:
claude mcp add xc-mcp -- npx -y xc-mcp
Codex CLI:
codex mcp add xc-mcp -- npx -y xc-mcp
or add it to ~/.codex/config.toml directly:
[mcp_servers.xc-mcp] command = "npx" args = ["-y", "xc-mcp"]
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"xc-mcp": { "command": "npx", "args": ["-y", "xc-mcp"] }
9793b152c5b0OBSERVED · 2026-10-07Connect
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 xc-mcp -- npx -y [email protected]
{
"mcpServers": {
"xc-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (85)
63 read · 13 write · 9 destructive. Blast radius: 9 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
accessibility-audit | read | |
accessibility-quality-check | read | |
cache-clear | destructive | |
cache-get-config | read | |
cache-get-stats | read | |
cache-set-config | write | |
debug-workflow | write | Complete iOS debug workflow: build → install → test cycle with validation to prevent testing stale app versions |
flick | read | Fast swipe - snappy and responsive (2775 pts/sec) |
gentle | read | Slow swipe - reliable but near-minimum threshold (653 pts/sec) |
hang-get-details | read | |
hang-list | read | |
hang-start | write | |
hang-stop | write | |
idb-clear-keychain | destructive | |
idb-crash-delete | destructive | |
idb-crash-list | read | |
idb-crash-show | read | |
idb-doctor | read | |
idb-install | write | |
idb-launch | read | |
idb-list-apps | read | |
idb-simulate-memory-warning | read | |
idb-targets | read | |
idb-terminate | destructive | |
idb-ui-describe | read | |
idb-ui-find-element | read | |
idb-ui-gesture | read | |
idb-ui-input | read | |
idb-ui-tap | read | |
idb-uninstall | destructive | |
idb-xctest-list | read | |
localization-audit | read | |
persistence-disable | write | |
persistence-enable | write | |
persistence-status | read | |
projectPath | read | Path to .xcodeproj or .xcworkspace file |
rtfm | read | |
scheme | read | Build scheme name |
screenshot | read | |
simctl-addmedia | read | |
simctl-appearance | read | |
simctl-boot | read | |
simctl-clone | read | |
simctl-container | read | |
simctl-container-output | read | cached content |
simctl-create | write | |
simctl-delete | destructive | |
simctl-erase | destructive | |
simctl-get-app-container | read | |
simctl-get-details | read | |
simctl-health-check | read | |
simctl-install | write | |
simctl-io | read | |
simctl-launch | read | |
simctl-list | read | |
simctl-location | read | |
simctl-openurl | read | |
simctl-pbcopy | read | |
simctl-privacy | read | |
simctl-push | write | |
simctl-rename | write | |
simctl-shutdown | read | |
simctl-status-bar | read | |
simctl-stream-logs | read | |
simctl-suggest | read | |
simctl-terminate | destructive | |
simctl-uninstall | destructive | |
simulator | read | Target simulator (optional - will use smart defaults if not provided) |
standard | read | Default swipe - best for general navigation (1475 pts/sec) |
test-record-report | read | |
test-record-step | read | |
visual-diff | read | |
workflow-build-and-run | write | |
workflow-fresh-install | write | |
workflow-tap-element | read | |
xcode-model-inspect | read | |
xcodebuild-build | read | |
xcodebuild-clean | read | |
xcodebuild-get-details | read | |
xcodebuild-inspect-scheme | read | |
xcodebuild-list | read | |
xcodebuild-showsdks | read | |
xcodebuild-test | read | |
xcodebuild-validate-capabilities | read | |
xcodebuild-version | read |
Trust audit
SAFEgrade B · trust 88/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (8 observation(s))
- Network
- none-observed
- Shell
- declared (2 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (13)
cache-clear, idb-clear-keychain, idb-crash-delete, idb-terminate, idb-uninstall, simctl-delete, simctl-erase, simctl-terminate, simctl-uninstall
.prettierignore
.xccurrentversion
if (command === 'command -v idb') return idbCli ? ok('/usr/local/bin/idb') : fail();if (command === 'command -v idb') return idbCli ? ok('/usr/local/bin/idb') : fail();import { executeCommand } from '../../utils/command.js';import { simulatorCache } from '../../state/simulator-cache.js';import { projectCache } from '../../state/project-cache.js';import { responseCache } from '../../utils/response-cache.js';import type { ToolResult } from '../../types/xcode.js';url: 'http://192.168.1.1:3000',
@modelcontextprotocol/sdk, pixelmatch, pngjs, zod, @eslint/js, @types/jest, @types/node, @types/pngjs
Gates applied: no_behavioural_pass, no_license.
9793b152c5b0full audit observations/trust-audit/mcp-server/conorluddy__xcode-cli.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-07 | 9793b152c5b0 | SAFE | B | 88 | first audit |
Questions
What is the Xcode CLI MCP server?
XCode CLI & Simulator MCP. Progressive disclosure of tool responses reduces context and token waste. Lets AI agents build, run and drive iOS apps — without drowning in Xcode's output.
What tools does Xcode CLI expose?
85 in total: 63 read-only, 13 that write, and 9 that can delete or overwrite (cache-clear, idb-clear-keychain, idb-crash-delete, idb-terminate, idb-uninstall). Every one is listed on this page with its risk.
Is Xcode CLI safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (88/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 9 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Xcode CLI need?
No credential environment variables were found in its source, so it appears to need none.
How does Xcode CLI run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as xc-mcp at 4.2.0.
How current is this page?
The grade is for one exact copy of the source (9793b152c5b0), read on 2026-10-07. The repository is watched and re-audited when it changes.