Claude Code in Xcode: Claude Agent, MCP and Which Setup to Use

David IyaDavid Iya October 14, 2026 7 min read

Can you use Claude Code in Xcode?

Yes, and Apple has built it in. Xcode's Intelligence settings have an Agents section where Claude Agent installs with a click, and a Model Context Protocol section that lets agents running outside Xcode, Claude Code included, use Xcode's tools. Apple's own documentation gives the exact Claude Code command for the second route. So the real question is not whether it works, it is which of the two setups fits how you work.

This is the fifth entry in my editor series, after the Claude Code VS Code extension, the Claude Code JetBrains plugin, Claude Code in Zed and Claude Code in Cursor. Xcode is different from all of those. There is no extension to install from a marketplace. Apple ships the hooks, and you choose whether Claude lives inside Xcode or talks to it from outside.

Two ways to use Claude with Xcode, based on Apple's Xcode documentation

Claude Agent inside XcodeClaude Code outside Xcode over MCP
Where you typeXcode's coding assistantWherever you already run Claude Code
SetupIntelligence settings > Agents > GetOne toggle in Xcode plus one claude mcp add command
Xcode capabilitiesAutomatically, such as building and testingThrough the MCP server Xcode provides
ConfigurationIts own folder that only Xcode usesYour existing Claude Code setup
Best forPeople who work in Xcode all dayPeople who already have a Claude Code workflow

Route 1: turn on Claude Agent inside Xcode

  1. Choose Xcode > Settings and select Intelligence in the sidebar.
  2. Under Agents, click Get next to Claude Agent, then click Install in the dialog.
  3. In the agent's settings, click the More button (...) in the Account row and follow the sign-in steps, including the browser window if one opens.
  4. Open your project, open the coding assistant, choose the agent and start prompting.

Per Apple's docs, an agent you choose in the coding assistant automatically has access to Xcode capabilities such as building and testing your app. That is the big difference from pasting code into a chat window: Claude can make a change, build, see what broke and fix it, in the same place you would.

Xcode keeps agent downloads up to date automatically where it can. If Claude Agent is not listed where you expect, Apple's docs point to the Components area of Xcode's settings for managing agent downloads.

Plan mode, permissions and skills inside Xcode

A few things inside Xcode will feel familiar if you have used Claude Code anywhere else. Type / in the message field to see the skills Xcode offers. Use /plan to have the agent explore and propose an approach without touching your code, and /exit-plan to leave plan mode. Apple's docs say Xcode also enters plan mode on its own when your prompt asks for a plan. I start every non-trivial change this way, for the same reasons I cover in Claude Code plan mode.

  • Permissions: click the Permissions row under Agents to see the commands and tools you have allowed, add a command-line tool under Allowed Commands, or remove one you no longer want the agent to run.
  • Configuration: files for Claude Agent go in ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig. That is where you set things like a default model, extra MCP servers and your own skills. Apple notes these files only affect agents you launch inside Xcode.
  • Plug-ins: the Plug-ins row under Agents installs plug-ins that bundle subagents, MCP servers and skills.

Route 2: connect Claude Code to Xcode with MCP

  1. In Xcode, choose Xcode > Settings > Intelligence and, under Model Context Protocol, turn on "Allow external agents to use Xcode tools."
  2. Open Terminal and run: claude mcp add --transport stdio xcode -- xcrun mcpbridge
  3. Check it registered with: claude mcp list
  4. Open your project in Xcode first, then prompt Claude Code as usual.

This is the command straight from Apple's documentation. xcrun mcpbridge is the bridge Xcode provides, and the claude mcp add part registers it with Claude Code under the name xcode. Xcode shows an alert when an external agent connects and while it is active, so you will always know when Claude is working through it.

Two things trip people up. First, Claude Code adds MCP servers to the current project by default, so run the command from your project folder, or add --scope user if you want the Xcode tools available everywhere. Second, the project has to be open in Xcode before you prompt, because the bridge works through the open project. If Claude says it cannot see the Xcode tools, Claude Code MCP server not working walks through the fixes.

Apple also suggests adding hints about Xcode and your project to your CLAUDE.md. I would do it: a few lines on your scheme name, how you run tests and which simulator to use save Claude from guessing every session. The CLAUDE.md file covers what to put in it.

Which setup should you use?

Picking a route for Claude and Xcode

If you...Use
Work in Xcode all day and are new to agentsClaude Agent inside Xcode
Already use Claude Code with your own CLAUDE.md, skills and MCP serversClaude Code over Xcode's MCP server
Want to avoid the terminal completelyClaude Agent inside Xcode
Build mobile apps with React Native and Expo instead of SwiftThe Claude Code desktop app, no Xcode needed for most builds

My take: Route 1 is the easiest start for a native Swift app, because everything happens in Xcode with no terminal and the agent can build and test from day one. Route 2 is the better long-term setup if Claude Code is already part of how you work, because one setup follows you across every project instead of keeping a second copy just for Xcode. You can run both. Just do not point two agents at the same files at the same time.

If you are not tied to Swift, how to build a mobile app with Claude Code shows the Expo route, and the Claude Code desktop app is where I tell most people in the club to start. Claude Code day one setup covers the first hour either way.

Free Claude Code drops, straight to your inbox

Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.

Frequently asked questions

Does Claude Code work with Xcode?

Yes, two ways. You can turn on Claude Agent in Xcode's Intelligence settings and use it in Xcode's coding assistant, or connect Claude Code running outside Xcode to Xcode's MCP server with claude mcp add --transport stdio xcode -- xcrun mcpbridge.

What is the difference between Claude Agent and Claude Sonnet & Opus in Xcode?

Claude Agent sits under Agents in Intelligence settings and can act on your project, including building and testing. Claude Sonnet & Opus sits under Chat and is a chat model you sign in to. If you want Claude to make and verify changes, use the agent.

Does Claude Agent in Xcode use my CLAUDE.md and MCP servers?

Not automatically. Xcode keeps Claude Agent's configuration in ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig, and those files only affect agents launched in Xcode. To keep your existing Claude Code setup, connect Claude Code to Xcode over MCP instead.

Why can't Claude Code see my Xcode project over MCP?

Check three things: "Allow external agents to use Xcode tools" is on in Intelligence settings, claude mcp list shows the xcode server for the folder you are in, and the project is open in Xcode before you prompt.

Do I need Xcode to build an iPhone app with Claude Code?

For a native Swift app, yes. If you build with React Native and Expo, you can do most of the work in the Claude Code desktop app and preview on your phone with Expo Go, without opening Xcode.

Last reviewed by David Iya on October 14, 2026

David Iya

Written by

David Iya

Forbes 30 Under 30 · Y Combinator

Keep reading

Claude CodeGetting Started

Claude Code in Cursor: How to Set It Up and When It Makes Sense

You can use Claude Code inside Cursor. Anthropic's Claude Code extension installs in Cursor the same way it installs in VS Code, and Anthropic's docs give a direct Install for Cursor link. You sign in with your Claude plan, not your Cursor plan, and Claude works in its own panel next to Cursor's built-in AI. Here is how to set it up, how the extension and the claude command in Cursor's terminal fit together, and whether running both is worth it.

David Iya 7 min
Read article
Claude CodeGetting Started

Claude Code in Zed: Two Ways to Set It Up (and Which I'd Pick)

You can use Claude Code in the Zed editor two ways. Run the regular claude command in a Zed Terminal Thread, which gives you the full native Claude Code experience on your existing Claude login, or install the Claude Agent from Zed's ACP Registry, which puts Claude in Zed's own Agent Panel. Anthropic does not ship an official Zed plugin the way it does for VS Code and JetBrains, so both paths come from Zed's side. Here is how each one works, what you give up, and which I would start with.

David Iya 7 min
Read article

Ready to build it yourself?

Join Claude Code Club, the #1 community for learning claude code, for $9/month.

← Back to the blog