Xcode MCP
Overview
This plugin bundles the official Xcode MCP bridge through ./.mcp.json:
{
"mcpServers": {
"xcode": {
"command": "xcrun",
"args": ["mcpbridge"]
}
}
}
That keeps the Codex packaging story aligned with Xcode itself instead of a third-party wrapper.
Host requirements
- Xcode must be installed.
- Xcode must be running;
xcrun mcpbridgeattaches to a live Xcode process. - If multiple Xcode instances are open, the bridge follows Xcode's own selection logic. If attachment fails, report that clearly before proceeding.
Core workflows
Project orientation
XcodeListWindowsto identify the active workspace tab.XcodeLS,XcodeGlob,XcodeGrep, andXcodeReadto inspect the project tree and open source files.DocumentationSearchwhen Apple API behavior or availability needs confirmation.
Editing and diagnostics
XcodeUpdatefor targeted replacements.XcodeWrite,XcodeMakeDir,XcodeMV, andXcodeRMwhen project structure changes are required.XcodeRefreshCodeIssuesInFileto pull current compiler diagnostics for a touched file.
Build and preview
BuildProjectfor project-wide compile verification.GetBuildLogfor actionable compiler and build task output.RenderPreviewfor SwiftUI visual confirmation when a#Previewexists.ExecuteSnippetfor quick local experiments inside a file's build context when a minimal check is faster than editing production code first.
Tests
GetTestListto discover test identifiers.RunSomeTestsfor narrow test slices.RunAllTestsonly when the change or failure mode justifies the broader cost.
Guardrails
- This Xcode MCP surface is IDE-centric. It does not provide simulator UI automation, screenshots, or LLDB session control in this plugin.
- Prefer this bridge-first path over direct
xcodebuildshell commands inside the Codex plugin surface. - Prefer the narrowest proof: file diagnostics, preview render, targeted build, then targeted tests.
- When a preview or targeted test is unavailable, say that plainly and fall back to the next smallest available proof.