Apple has spent years building Xcode as a walled garden. You use their tools, their interface, their workflow. That philosophy just got a significant crack in it — and it's a welcome one.
Xcode 26.3 is in beta as of writing this article with some known issues
With Xcode 26.3, Apple introduced native support for the Model Context Protocol (MCP), an open standard that lets any compatible AI agent connect to Xcode and use its capabilities. Claude Agent and OpenAI's Codex work out of the box with one-click setup. But the more interesting story? You can connect Cursor, Claude Code CLI, or literally anything that speaks MCP to Xcode's 20 built-in tools.
This post breaks down what's available, why it matters, and how to actually set it up.
What Changed in Xcode 26.3?
Before 26.3, Xcode 26's intelligence features were limited — you could use Claude or ChatGPT for basic code assistance, but agents couldn't take independent action. They couldn't build your project, run tests, or verify visual output on their own.
Xcode 26.3 changes this entirely. Apple calls it agentic coding, and the distinction is meaningful. Agents can now:
- Break down a task and work through it step by step
- Build the project and read the build log
- Run tests and iterate until they pass
- Capture SwiftUI previews as actual images to verify UI changes
- Search Apple's entire documentation corpus, including WWDC transcripts
- Manage files, directories, and project structure
And all of this is exposed over MCP, so it's not locked to Xcode's UI.
The Bridge: xcrun mcpbridge
The key binary here is mcpbridge, shipped with Xcode's command line tools. It acts as a translator between the MCP protocol and Xcode's internal XPC communication layer.
External Agent ↔ MCP Protocol ↔ mcpbridge ↔ XPC ↔ Xcode
Xcode must be running with a project open. Once it is, mcpbridge auto-detects the Xcode PID and connects — no manual configuration needed for the typical single-instance case.
Enabling the MCP Server
Before any external tool can connect, flip the switch inside Xcode:
- Open Xcode → Settings (
⌘,) - Go to the Intelligence section in the sidebar
- Under Model Context Protocol, toggle Xcode Tools to ON
That's it. Xcode will now accept incoming MCP connections and show a visual indicator whenever an external agent is connected — a useful security cue.
Setting Up Claude Code and Codex CLI
Apple provides official one-liners for both:
# Claude Code
claude mcp add --transport stdio xcode -- xcrun mcpbridge
# Codex
codex mcp add xcode -- xcrun mcpbridge
Verify with:
claude mcp list
codex mcp list
These work immediately because Apple co-designed the integrations directly with Anthropic and OpenAI, optimizing for token efficiency and stable tool interfaces.
Setting Up Cursor (and Other MCP Clients)
Cursor isn't officially mentioned in Apple's documentation, but it works — with a small caveat. You have three setup options:
Option 1: One-Click Deep Link
cursor://anysphere.cursor-deeplink/mcp/install?name=xcode-tools&config=eyJjb21tYW5kIjoieGNydW4iLCJhcmdzIjpbIm1jcGJyaWRnZSJdfQo=
Click this URL and Cursor will prompt you to confirm the install.
Option 2: Cursor GUI
Go to Cursor Settings → Features → MCP → Add New MCP Server. Set the transport to stdio, name it xcode-tools, and enter xcrun mcpbridge as the command.
Option 3: JSON Config
Add the following to ~/.cursor/mcp.json:
{
"mcpServers": {
"xcode-tools": {
"command": "xcrun",
"args": ["mcpbridge"]
}
}
}
The MCP Spec Issue (and the Fix)
There's a known limitation in Xcode 26.3 RC: mcpbridge returns data in the content field but not in structuredContent, which the MCP spec requires when a tool declares an outputSchema. Claude Code and Codex handle this gracefully because of their Apple co-designed integrations. Cursor follows the spec strictly and rejects non-compliant responses with an error like:
MCP error -32600: Tool XcodeListWindows has an output schema but did not return structured content
This is a bug on Apple's side and will likely be fixed in a future release. In the meantime, there's a working workaround — Rudrank Riyam has documented the full fix (a small Python wrapper script) in detail: Exploring AI Driven Coding: Using Xcode 26.3 MCP Tools in Cursor, Claude Code and Codex
After applying the fix, restart Cursor and all 20 tools will appear.
The 20 MCP Tools at a Glance
Once connected, you get full access to Xcode's native capabilities:
| Category | Tools |
|---|---|
| File System |
XcodeRead, XcodeWrite, XcodeUpdate, XcodeGlob, XcodeGrep, XcodeLS, XcodeMakeDir, XcodeRM, XcodeMV
|
| Build & Test |
BuildProject, GetBuildLog, RunAllTests, RunSomeTests, GetTestList
|
| Diagnostics |
XcodeListNavigatorIssues, XcodeRefreshCodeIssuesInFile
|
| Intelligence |
ExecuteSnippet, RenderPreview, DocumentationSearch
|
| Workspace | XcodeListWindows |
A few of these deserve special mention.
DocumentationSearch
This isn't just a basic API search. It queries Apple's entire documentation corpus and WWDC video transcripts using semantic search powered by "Squirrel MLX" — Apple's MLX-accelerated embedding system built for Apple Silicon. Ask about a framework, and it can surface relevant WWDC sessions you might have missed, covering iOS 15 through iOS 26.
RenderPreview
This returns actual screenshots of your SwiftUI previews. Your agent can literally see what your UI looks like. Change a color, verify visually, iterate — all without leaving the agent workflow. No other IDE offers this to external agents.
ExecuteSnippet
A Swift REPL environment. Validate logic, test API behaviors, or explore behavior without a full build cycle. Fast and useful for quick prototyping before committing to a file.
How the Agent Workflow Actually Runs
Most tools require a tabIdentifier to know which Xcode window to operate on. Agents handle this automatically. Here's what happens when you ask "build my project":
Agent: I'll first list open Xcode windows to get the tab identifier.
→ XcodeListWindows()
← { "message": "* tabIdentifier: windowtab1, workspacePath: /Users/you/MyApp.xcodeproj" }
Agent: Found MyApp.xcodeproj open. Building now.
→ BuildProject({ "tabIdentifier": "windowtab1" })
← { "buildResult": "The project built successfully.", "elapsedTime": 2.17, "errors": [] }
The agent discovers context, acts on it, and reports back — no manual tab management required.
Context Files: AGENTS.md and CLAUDE.md
Apple recommends adding project-level hints in the repository root to help agents understand your setup. These files (following conventions from Codex and Claude Code) provide project-specific context:
# Project Context
## Build System
- iOS 26 SwiftUI project
- Use `BuildProject` for compilation, not shell commands
- Previews available via `RenderPreview`
## Testing
- Use `RunAllTests` or `RunSomeTests`
- Target test class names are documented in Tests/README.md
## Documentation
- Use `DocumentationSearch` for Apple API questions
- WWDC transcripts are indexed and searchable
This dramatically improves agent performance on tasks that require project-specific knowledge.
Why This Matters for the Ecosystem
MCP has been quietly becoming the connective tissue of the AI development tooling world throughout 2025, with Google, Microsoft, and others releasing MCP servers for their platforms. Apple adopting it for Xcode is a significant signal.
By exposing Xcode's capabilities through an open standard rather than a proprietary API, Apple is betting that the ecosystem will build around it. That means design-to-code workflows connecting Figma MCP and Xcode MCP, CI/CD agents that can build and test locally before pushing, and custom agents tailored to specific iOS team workflows.
Xcode 26.3 is currently available as a Release Candidate for Apple Developer Program members, with a public App Store release expected soon.
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.