ai/ios-skills/ios-axiom-xcode-mcp-setup/SKILL.md
Xcode MCP setup — enable mcpbridge, per-client config, permission handling, multi-Xcode targeting, troubleshooting
npx skillsauth add kurko/dotfiles axiom-xcode-mcp-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Without this toggle, xcrun mcpbridge connects but returns no tools.
claude mcp add --transport stdio xcode -- xcrun mcpbridge
Verify: claude mcp list should show xcode server.
codex mcp add xcode -- xcrun mcpbridge
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"xcode": {
"command": "xcrun",
"args": ["mcpbridge"]
}
}
}
Cursor-specific note: Cursor is a strict MCP client. Xcode's mcpbridge omits structuredContent when tools declare outputSchema, which violates the MCP spec. If Cursor rejects responses, use XcodeMCPWrapper as a proxy:
{
"mcpServers": {
"xcode": {
"command": "/path/to/XcodeMCPWrapper",
"args": []
}
}
}
Create or edit .vscode/mcp.json:
{
"servers": {
"xcode": {
"type": "stdio",
"command": "xcrun",
"args": ["mcpbridge"]
}
}
}
gemini mcp add xcode -- xcrun mcpbridge
After configuration, call XcodeListWindows (no parameters). You should see:
tabIdentifier: <uuid>, workspacePath: /path/to/YourProject.xcodeproj
If you see an empty list, ensure a project is open in Xcode.
When an MCP client first connects, Xcode shows a permission dialog:
PID-based approval: Permission is granted per-process. If the client restarts (new PID), you'll see the dialog again. This is expected behavior.
When multiple Xcode instances are running:
mcpbridge auto-selects using this fallback:
xcode-selectSet MCP_XCODE_PID to target a specific instance:
# Find Xcode PIDs
pgrep -x Xcode
# Claude Code with specific PID
claude mcp add --transport stdio xcode -- env MCP_XCODE_PID=12345 xcrun mcpbridge
MCP_XCODE_SESSION_ID provides a stable UUID for tool sessions, useful when tracking interactions across reconnections.
digraph troubleshoot {
rankdir=TB;
"Connection failed?" [shape=diamond];
"tools/list empty?" [shape=diamond];
"Wrong project?" [shape=diamond];
"Repeated permission prompts?" [shape=diamond];
"Client rejects responses?" [shape=diamond];
"Check Xcode running + toggle on" [shape=box];
"Open a project in Xcode" [shape=box];
"Use MCP_XCODE_PID or check tab targeting" [shape=box];
"Expected: PID changes on restart" [shape=box];
"Use XcodeMCPWrapper proxy" [shape=box];
"Connection failed?" -> "Check Xcode running + toggle on" [label="refused/timeout"];
"Connection failed?" -> "tools/list empty?" [label="connects OK"];
"tools/list empty?" -> "Open a project in Xcode" [label="no tools"];
"tools/list empty?" -> "Wrong project?" [label="tools listed"];
"Wrong project?" -> "Use MCP_XCODE_PID or check tab targeting" [label="yes"];
"Wrong project?" -> "Repeated permission prompts?" [label="no"];
"Repeated permission prompts?" -> "Expected: PID changes on restart" [label="yes"];
"Repeated permission prompts?" -> "Client rejects responses?" [label="no"];
"Client rejects responses?" -> "Use XcodeMCPWrapper proxy" [label="strict client (Cursor)"];
}
| Symptom | Cause | Fix |
|---------|-------|-----|
| "Connection refused" | Xcode not running or MCP toggle off | Launch Xcode, enable MCP in Settings > Intelligence |
| tools/list returns empty | No project open, or permission not granted | Open a project, check for permission dialog in Xcode |
| Tools target wrong project | Multiple Xcode windows, wrong tab | Call XcodeListWindows, use correct tabIdentifier |
| Repeated permission prompts | Client restarted (new PID) | Expected behavior — approve each time |
| Cursor/strict client errors | Missing structuredContent in response | Use XcodeMCPWrapper as proxy |
| "No such command: mcpbridge" | Xcode < 26.3 | Update to Xcode 26.3+ |
| Slow/hanging tool calls | Large project indexing | Wait for Xcode indexing to complete |
Xcode also supports MCP servers for its built-in assistants. Config files live at:
~/Library/Developer/Xcode/CodingAssistant/codex
~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig
These are for configuring Xcode's internal assistant, separate from external MCP client setup.
Docs: /xcode/mcp-server
Skills: axiom-xcode-mcp-tools, axiom-xcode-mcp-ref
tools
Create a GitHub pull request from the current branch. Use when user asks to create a PR, open a PR, submit a PR, push and create PR, or similar pull request workflows. Activates for phrases like "create a PR", "open a pull request", "submit PR", "push and PR", "make a PR for this", "open a draft PR".
data-ai
Merge the current worktree branch into main and sync main back. Use when the user says "merge to main", "ship it", "merge and continue", or after completing a task in a worktree and wanting to continue with the next one.
tools
Synchronize AI agent skills, commands, configs, permissions, hooks, and instructions across Claude Code, Codex CLI, and other Agent Skills-compatible tools. Use when the user asks to pull skills from Claude into Codex, sync Codex work back to Claude, migrate agent commands, reconcile frontmatter, update permissions, or keep agent setup files in parity.
testing
Write or update UI-independent use cases for QA. Use when the user says "write use cases", "add use cases", "QA use cases", "update use cases", "compose use cases", or when starting implementation of a new feature (after plan approval). Also activates for "what should we test", "regression cases", or "use cases for QA".